CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Error making a new utility code: "cyclicAMILduInterface.H: No such file or directory" (https://www.cfd-online.com/Forums/openfoam-programming-development/160718-error-making-new-utility-code-cyclicamilduinterface-h-no-such-file-directory.html)

phsieh2005 October 12, 2015 10:46

Error making a new utility code: "cyclicAMILduInterface.H: No such file or directory"
 
Dear OF experts,

I wrote a small utility that compute alpha fields of an interMixingFoam case. This worked under OpenFOAM-2.3.x. However, I am getting errors when compiled in OpenFOAM-2.4.x. It will be appreciated if someone can shed some light on this?

The error messages are attached:

Pei-Ying
-------------
Making dependency list for source file computeAlpha.C
could not open file cyclicAMILduInterface.H for source file computeAlpha.C due to No such file or directory
could not open file cyclicAMIPolyPatch.H for source file computeAlpha.C due to No such file or directory
SOURCE=computeAlpha.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/home/phsieh/OpenFOAM/OpenFOAM-2.4.x/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/phsieh/OpenFOAM/OpenFOAM-2.4.x/src/OpenFOAM/lnInclude -I/home/phsieh/OpenFOAM/OpenFOAM-2.4.x/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/computeAlpha.o
In file included from /home/phsieh/OpenFOAM/OpenFOAM-2.4.x/src/finiteVolume/lnInclude/ddtScheme.C:30:0,
from /home/phsieh/OpenFOAM/OpenFOAM-2.4.x/src/finiteVolume/lnInclude/ddtScheme.H:325,
from /home/phsieh/OpenFOAM/OpenFOAM-2.4.x/src/finiteVolume/lnInclude/fvcDdt.C:28,
from /home/phsieh/OpenFOAM/OpenFOAM-2.4.x/src/finiteVolume/lnInclude/fvcDdt.H:199,
from /home/phsieh/OpenFOAM/OpenFOAM-2.4.x/src/finiteVolume/lnInclude/fvc.H:44,
from /home/phsieh/OpenFOAM/OpenFOAM-2.4.x/src/finiteVolume/lnInclude/fvCFD.H:8,
from computeAlpha.C:34:
/home/phsieh/OpenFOAM/OpenFOAM-2.4.x/src/finiteVolume/lnInclude/cyclicAMIFvPatch.H:39:35: fatal error: cyclicAMILduInterface.H: No such file or directory
#include "cyclicAMILduInterface.H"
^
compilation terminated.
computeAlpha.dep:620: recipe for target 'Make/linux64GccDPOpt/computeAlpha.o' failed
make: *** [Make/linux64GccDPOpt/computeAlpha.o] Error 1:(

alexeym October 12, 2015 15:33

Hi,

Since location of both cyclicAMILduInterface.H and cyclicAMIPolyPatch.H did not change between 2.3.x. and 2.4.x

Code:

alexey at daphne in OpenFOAM-2.3.x$ find . -name 'cyclicAMILduInterface.H'
./src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMILduInterfaceField/cyclicAMILduInterface.H
./src/meshTools/lnInclude/cyclicAMILduInterface.H
alexey at daphne in OpenFOAM-2.3.x$ cd ../OpenFOAM-2.4.x/
alexey at daphne in OpenFOAM-2.4.x$ find . -name 'cyclicAMILduInterface.H'
./src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMILduInterfaceField/cyclicAMILduInterface.H
./src/meshTools/lnInclude/cyclicAMILduInterface.H
alexey at daphne in OpenFOAM-2.4.x$ find . -name 'cyclicAMIPolyPatch.H'
./src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.H
./src/meshTools/lnInclude/cyclicAMIPolyPatch.H
alexey at daphne in OpenFOAM-2.4.x$ cd ../OpenFOAM-2.3.x/
alexey at daphne in OpenFOAM-2.3.x$ find . -name 'cyclicAMIPolyPatch.H'
./src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.H
./src/meshTools/lnInclude/cyclicAMIPolyPatch.H

guess, problem is elsewhere.

Surely it would be much easier if you post a link to your code but it you can not, do you have

Code:

-I$(LIB_SRC)/meshTools/lnInclude
line in your Make/options.

phsieh2005 October 12, 2015 19:16

Hi, Alexeym,


Thanks a lot for the reply!

Yes, I did more digging and found exactly what you said. The AMI areas have not changed between of-24x and of-23x. I then looked at some option file in utilities. I was able to compile successfully by adding a couple links.

I have not used the utility code for quite some time now. I thought that time I used it was of-23x. I guess I was wrong.

Best regards,

Pei-Ying

Antimony February 5, 2016 05:29

Hi All,

To anyone else who is still facing this problem (like I did for a couple of hours recently), please note that the solution given works, provided it is the first one included.

That is, if you have (for example)

EXE_INC = \
-I$(LIB_SRC)/someLibrary

Change it to this:
EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/someLibrary

The reason I type this is because I distinctly remember putting the original hint into the options file, but I still had errors. However, when I changed the order, it seemed to work.

Again, it might have been a one-off, but if anyone else faced the same issue, give this method a shot as well.

Thanks alexeym for the original solution!

Cheers,
Antimony

lisa_china February 28, 2016 06:33

Hi, Antimony.
I'm not familiar with Linux, but I encountered this problem, too. And I tried your suggestion, but it didn't work. So could you tell me what's the meaning of -I?

Antimony February 28, 2016 07:51

Hi,

Can you please explain/post the error that you are encountering?

Cheers,
Antimony

lisa_china February 29, 2016 02:42

Hi,Antimony.
thanks for your reply. I solved it:)

vipin1431 May 10, 2016 05:45

Quote:

Originally Posted by lisa_china (Post 587304)
Hi,Antimony.
thanks for your reply. I solved it:)

hi lisa,
I got similar error like yours. can you please tell me how did u solve that?

lisa_china May 22, 2016 06:53

hi vipin,
have you solved it?
could you show your error information to us? then more people can help you.

R.Mah November 25, 2016 11:09

Hi LIisa

I still have the same problem would you tell me how you managed to solve it (I tried the solution given above about switching the lib order but I still have the same problem)

this is my error message:
In file included from /home/student/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude/ddtScheme.C:30:0,
from /home/student/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude/ddtScheme.H:325,
from /home/student/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude/fvcDdt.C:28,
from /home/student/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude/fvcDdt.H:199,
from /home/student/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude/fvc.H:44,
from /home/student/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude/fvCFD.H:8,
from matlabFPVtablesToFoam.C:35:
/home/student/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude/cyclicAMIFvPatch.H:39:35: fatal error: cyclicAMILduInterface.H: Aucun fichier ou dossier de ce type
#include "cyclicAMILduInterface.H"
^
compilation terminated.
matlabFPVtablesToFoam.dep:648: recipe for target 'Make/linux64GccDPOpt/matlabFPVtablesToFoam.o' failed
make: *** [Make/linux64GccDPOpt/matlabFPVtablesToFoam.o] Error 1
+ wmake ./applications/solver/FPVFoam
Making dependency list for source file FPVFoam.C
SOURCE=FPVFoam.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/home/student/OpenFOAM/FPVFoam/src/turbulenceModels/compressible/turbulenceModel -I/home/student/OpenFOAM/FPVFoam/src/thermophysicalModels/specie/lnInclude -I/home/student/OpenFOAM/FPVFoam/src/thermophysicalModels/reactionThermo/lnInclude -I/home/student/OpenFOAM/FPVFoam/src/thermophysicalModels/basic/lnInclude -I/home/student/OpenFOAM/OpenFOAM-2.4.0/src/meshTools/lnInclude -I/home/student/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude -I/home/student/OpenFOAM/OpenFOAM-2.4.0/src/sampling/lnInclude -I/home/student/OpenFOAM/FPVFoam/src/thermophysicalModels/chemistryModel -I/home/student/OpenFOAM/FPVFoam/src/combustionModels/lnInclude -IlnInclude -I. -I/home/student/OpenFOAM/OpenFOAM-2.4.0/src/OpenFOAM/lnInclude -I/home/student/OpenFOAM/OpenFOAM-2.4.0/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/FPVFoam.o
In file included from FPVFoam.C:73:0:
/home/student/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude/rhoEqn.H: In function ‘int main(int, char**)’:
/home/student/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude/rhoEqn.H:38:22: error: ‘fvOptions’ was not declared in this scope
fvOptions(rho)
^
In file included from pEqn.H:88:0,
from FPVFoam.C:85:
/home/student/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude/rhoEqn.H:38:22: error: ‘fvOptions’ was not declared in this scope
fvOptions(rho)
^
In file included from FPVFoam.C:54:0:
/home/student/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude/readTimeControls.H:38:8: warning: unused variable ‘maxDeltaT’ [-Wunused-variable]
scalar maxDeltaT =
^
FPVFoam.dep:715: recipe for target 'Make/linux64GccDPOpt/FPVFoam.o' failed
make: *** [Make/linux64GccDPOpt/FPVFoam.o] Error 1






Many thanks

R.Mah November 28, 2016 02:44

Any help would be great, I am still looking how to solve the problem

cavida April 26, 2017 11:52

Quote:

Originally Posted by phsieh2005 (Post 567760)
Dear OF experts,

I wrote a small utility that compute alpha fields of an interMixingFoam case. This worked under OpenFOAM-2.3.x. However, I am getting errors when compiled in OpenFOAM-2.4.x. It will be appreciated if someone can shed some light on this?

The error messages are attached:

Pei-Ying
-------------
Making dependency list for source file computeAlpha.C
could not open file cyclicAMILduInterface.H for source file computeAlpha.C due to No such file or directory
could not open file cyclicAMIPolyPatch.H for source file computeAlpha.C due to No such file or directory
SOURCE=computeAlpha.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/home/phsieh/OpenFOAM/OpenFOAM-2.4.x/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/phsieh/OpenFOAM/OpenFOAM-2.4.x/src/OpenFOAM/lnInclude -I/home/phsieh/OpenFOAM/OpenFOAM-2.4.x/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/computeAlpha.o
In file included from /home/phsieh/OpenFOAM/OpenFOAM-2.4.x/src/finiteVolume/lnInclude/ddtScheme.C:30:0,
from /home/phsieh/OpenFOAM/OpenFOAM-2.4.x/src/finiteVolume/lnInclude/ddtScheme.H:325,
from /home/phsieh/OpenFOAM/OpenFOAM-2.4.x/src/finiteVolume/lnInclude/fvcDdt.C:28,
from /home/phsieh/OpenFOAM/OpenFOAM-2.4.x/src/finiteVolume/lnInclude/fvcDdt.H:199,
from /home/phsieh/OpenFOAM/OpenFOAM-2.4.x/src/finiteVolume/lnInclude/fvc.H:44,
from /home/phsieh/OpenFOAM/OpenFOAM-2.4.x/src/finiteVolume/lnInclude/fvCFD.H:8,
from computeAlpha.C:34:
/home/phsieh/OpenFOAM/OpenFOAM-2.4.x/src/finiteVolume/lnInclude/cyclicAMIFvPatch.H:39:35: fatal error: cyclicAMILduInterface.H: No such file or directory
#include "cyclicAMILduInterface.H"
^
compilation terminated.
computeAlpha.dep:620: recipe for target 'Make/linux64GccDPOpt/computeAlpha.o' failed
make: *** [Make/linux64GccDPOpt/computeAlpha.o] Error 1:(

I think this error arises when one wants to compile solver files in a different version (For me in newer version: OpenFoam 4.x) which those files had a successful compilation in the older versions.
For solving this error, you must edit Make/Options file into this:

EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude

EXE_LIBS = \
-lfiniteVolume \
-lmeshTools

red-colored codes are not available in older versions.

But after this correction, you may face with other errors!

I recommend you to copy the solver from (your newer version):

OpenFOAM (your target/newer version)/applications/solvers

and edit your codes within the new files and then compile; because the header files are changed a bit in newer versions!

alimea May 13, 2017 10:44

Hi

I tried all of the ways that are mentioned in this page, but the problem is not solved yet!
Is there any suggestion?

svramana August 21, 2018 06:31

Thanks a lot cavida. I made these correction and now I'm able to compile code.

Gbaz September 23, 2018 05:01

Hello,

I can't figure out the issue of

cyclicAMILduInterface.H: No such file or directory
#include "cyclicAMILduInterface.H"


Even with Cavadia's advise as

Make/Options:

EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude

EXE_LIBS = \
-lfiniteVolume \
-lmeshTools



Any help please?

Thanks

Gbaz September 23, 2018 05:04

Svramana !
May I ask which version of OF do you use?

y_jiang October 10, 2018 10:05

Koby,


I got the same error message too. Have you got this issue fixed?
I am using OF 5.0.

Gbaz October 10, 2018 10:11

Thanks for your reply. No I didn't fix it.

hyFoam October 10, 2018 14:23

Could you please post more information? Cavida's answer should work in OF 5 as well. And please use CODE tags.


Thanks,
Vince

y_jiang October 10, 2018 14:36

Yes, I got the problem fixed by adding the line of meshTools in my options file.
But there still some other errors. I am trying to make a utility to calculate heat transfer coefficient based on the wallHeatFlux. However I found OpenFOAM has been changed since last time I used it. The wallHeatFlux is no longer a independent utility in $FOAM_APP. Instead, it is a function of postProcess. I can still find wallHeatFlux.C and .H in $FOAM_SRC. But when I try to copy and modify it, I got a lot of compilation errors ...


All times are GMT -4. The time now is 08:52.