CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums

could not open file ** for ** when compiling

Register Blogs Community New Posts Updated Threads Search

Rate this Entry

could not open file ** for ** when compiling

Posted March 31, 2017 at 12:46 by kindle

if the problem is :
could not open file ** for xx due to No such file or directory. Maybe it's that after option -I you have a blank space before the INC directory.

Code:
-I$(LIB_USER_SRC)/viscoelasticFluidFoam-1.0-OpenFOAM-2.1.x/src/transportModels/viscoelastic/lnInclude
will do but
Code:
-I $(LIB_USER_SRC)/viscoelasticFluidFoam-1.0-OpenFOAM-2.1.x/src/transportModels/viscoelastic/lnInclude
may not.

Quote:
Originally Posted by Artur View Post
Hi,

I've just built OF 2.2.2 from source on my University's cluster. Everything went much smoother than expected, foamInstallationTest returned no problems, I ran the cavity tutorial OK, echo'ed most of the environment variables and they seem OK too.

When I try recompiling icoFoam as myIcoFoam I get the following:

Code:
Making dependency list for source file myIcoFoam.C
could not open file SubListI.H for source file myIcoFoam.C
could not open file intersection.H for source file myIcoFoam.C
could not open file pointHit.H for source file myIcoFoam.C
could not open file ListListOps.H for source file myIcoFoam.C
could not open file faceI.H for source file myIcoFoam.C
could not open file faceTemplates.C for source file myIcoFoam.C
could not open file cellList.H for source file myIcoFoam.C
could not open file cellShapeList.H for source file myIcoFoam.C
could not open file boolList.H for source file myIcoFoam.C
could not open file HashSet.H for source file myIcoFoam.C
could not open file Map.H for source file myIcoFoam.C
could not open file primitiveMeshI.H for source file myIcoFoam.C
could not open file pointIOField.H for source file myIcoFoam.C
could not open file faceIOList.H for source file myIcoFoam.C
could not open file labelIOList.H for source file myIcoFoam.C
could not open file polyBoundaryMesh.H for source file myIcoFoam.C
could not open file boundBox.H for source file myIcoFoam.C
could not open file pointZoneMesh.H for source file myIcoFoam.C
could not open file faceZoneMesh.H for source file myIcoFoam.C
could not open file cellZoneMesh.H for source file myIcoFoam.C
could not open file lduMesh.H for source file myIcoFoam.C
could not open file fvBoundaryMesh.H for source file myIcoFoam.C
could not open file surfaceInterpolation.H for source file myIcoFoam.C
could not open file fvSchemes.H for source file myIcoFoam.C
could not open file fvSolution.H for source file myIcoFoam.C
could not open file data.H for source file myIcoFoam.C
could not open file DimensionedField.H for source file myIcoFoam.C
could not open file volFieldsFwd.H for source file myIcoFoam.C
could not open file surfaceFieldsFwd.H for source file myIcoFoam.C
could not open file pointFieldsFwd.H for source file myIcoFoam.C
could not open file slicedVolFieldsFwd.H for source file myIcoFoam.C
could not open file slicedSurfaceFieldsFwd.H for source file myIcoFoam.C
could not open file fvPatchFvMeshTemplates.C for source file myIcoFoam.C
could not open file fvc.H for source file myIcoFoam.C
could not open file fvMatrices.H for source file myIcoFoam.C
could not open file fvm.H for source file myIcoFoam.C
could not open file linear.H for source file myIcoFoam.C
could not open file uniformDimensionedFields.H for source file myIcoFoam.C
could not open file calculatedFvPatchFields.H for source file myIcoFoam.C
could not open file fixedValueFvPatchFields.H for source file myIcoFoam.C
could not open file adjustPhi.H for source file myIcoFoam.C
could not open file findRefCell.H for source file myIcoFoam.C
could not open file constants.H for source file myIcoFoam.C
could not open file argList.H for source file myIcoFoam.C
could not open file timeSelector.H for source file myIcoFoam.C
could not open file setRootCase.H for source file myIcoFoam.C
could not open file createTime.H for source file myIcoFoam.C
could not open file createMesh.H for source file myIcoFoam.C
could not open file createFields.H for source file myIcoFoam.C
could not open file initContinuityErrs.H for source file myIcoFoam.C
could not open file readPISOControls.H for source file myIcoFoam.C
could not open file CourantNo.H for source file myIcoFoam.C
could not open file continuityErrs.H for source file myIcoFoam.C
SOURCE=myIcoFoam.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -I/home/akl1g09/OpenFOAM/OpenFOAM-2.2.2/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/akl1g09/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude -I/home/akl1g09/OpenFOAM/OpenFOAM-2.2.2/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/myIcoFoam.o
In file included from myIcoFoam.C:53:0:
/home/akl1g09/OpenFOAM/OpenFOAM-2.2.2/src/finiteVolume/lnInclude/readPISOControls.H: In function ‘int main(int, char**)’:
/home/akl1g09/OpenFOAM/OpenFOAM-2.2.2/src/finiteVolume/lnInclude/readPISOControls.H:3:15: warning: unused variable ‘nOuterCorr’ [-Wunused-variable]
     const int nOuterCorr =
               ^
/home/akl1g09/OpenFOAM/OpenFOAM-2.2.2/src/finiteVolume/lnInclude/readPISOControls.H:12:16: warning: unused variable ‘momentumPredictor’ [-Wunused-variable]
     const bool momentumPredictor =
                ^
/home/akl1g09/OpenFOAM/OpenFOAM-2.2.2/src/finiteVolume/lnInclude/readPISOControls.H:15:16: warning: unused variable ‘transonic’ [-Wunused-variable]
     const bool transonic =
                ^
g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -I/home/akl1g09/OpenFOAM/OpenFOAM-2.2.2/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/akl1g09/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude -I/home/akl1g09/OpenFOAM/OpenFOAM-2.2.2/src/OSspecific/POSIX/lnInclude   -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPOpt/myIcoFoam.o -L/home/akl1g09/OpenFOAM/OpenFOAM-2.2.2/platforms/linux64GccDPOpt/lib \
         -lfiniteVolume -lOpenFOAM -ldl   -lm -o /home/akl1g09/OpenFOAM/akl1g09-2.2.2/platforms/linux64GccDPOpt/bin/myIcoFoam
The reason I recompiled OF in the first place to prevent these from happening on the build that I have already available on the cluster. It seems that files from $FOAM_SRC/OpenFOAM/lnInclude cannot be accessed for some reason (I checked, they are all there physically). I tried adding that directory explicitly in Make/options for the compiler but that didn't help.

Strangely enough, the compiled utility works. I ran the cavity tutorial with it successfully. Hence I am not sure whether I should just ignore these warnings or will they cause problems for me in the future?

Any advice will be much appreciated,

A

EDIT: I didn't say that it's the "cannot open file" that I'm worried about, not the "unused variable" warnings...
Views 944 Comments 0 Edit Tags Email Blog Entry
« Prev     Main     Next »
Total Comments 0

Comments

 

All times are GMT -4. The time now is 14:40.