CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Error: Could not open file XX.h for source file YY.C (http://www.cfd-online.com/Forums/openfoam-programming-development/116303-error-could-not-open-file-xx-h-source-file-yy-c.html)

jans April 16, 2013 18:01

Error: Could not open file XX.h for source file YY.C
 
Hi,
I am trying to test the compilation process for user-written OpenFOAM utilities on a Cray XT5 supercomputer (Kraken at NICS, Tennessee, USA). To begin with, I just made a copy of pisoFoam and tried to compile it:

Code:

 
  mkdir -p $WM_PROJECT_USER_DIR/applications/solvers/pisoFoamAJ
  cd $WM_PROJECT_USER_DIR/applications/solvers/pisoFoamAJ
  cp -r $FOAM_SOLVERS/incompressible/pisoFoam/* .
  wclean
  mv pisoFoam.C pisoFoamAJ.C

Then I edited Make/files to have the foll:
Code:

pisoFoamAJ.C
EXE = $(FOAM_USER_APPBIN)/pisoFoamAJ

Then from the directory pisoFoamAJ, when I run
Code:

wmake
I get the foll errors:
Code:


make: Warning: File `linux64GccDPOpt/dependencyFiles' has modification time 0.00083 s in the future
make: warning:  Clock skew detected.  Your build may be incomplete.
Making dependency list for source file pisoFoamAJ.C
could not open file cpuTime.H for source file pisoFoamAJ.C
could not open file fileMonitor.H for source file pisoFoamAJ.C
could not open file sigWriteNow.H for source file pisoFoamAJ.C
could not open file sigStopAtWriteNow.H for source file pisoFoamAJ.C
could not open file regExp.H for source file pisoFoamAJ.C
could not open file sigFpe.H for source file pisoFoamAJ.C
could not open file sigInt.H for source file pisoFoamAJ.C
could not open file sigQuit.H for source file pisoFoamAJ.C
could not open file sigSegv.H for source file pisoFoamAJ.C
SOURCE=pisoFoamAJ.C ;  CC -m64 -Dlinux64Gcc -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -I/lustre/scratch/proj/sw/openfoam/2.1.1/cnl3.1_gnu4.6.2/OpenFOAM-2.1.1/src/turbulenceModels/incompressible/turbulenceModel -I/lustre/scratch/proj/sw/openfoam/2.1.1/cnl3.1_gnu4.6.2/OpenFOAM-2.1.1/src/transportModels -I/lustre/scratch/proj/sw/openfoam/2.1.1/cnl3.1_gnu4.6.2/OpenFOAM-2.1.1/src/transportModels/incompressible/singlePhaseTransportModel -I/lustre/scratch/proj/sw/openfoam/2.1.1/cnl3.1_gnu4.6.2/OpenFOAM-2.1.1/src/finiteVolume/lnInclude -IlnInclude -I. -I/lustre/scratch/proj/sw/openfoam/2.1.1/cnl3.1_gnu4.6.2/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude -I/lustre/scratch/proj/sw/openfoam/2.1.1/cnl3.1_gnu4.6.2/OpenFOAM-2.1.1/src/OSspecific//lnInclude  -fPIC -c $SOURCE -o Make/linux64GccDPOpt/pisoFoamAJ.o
In file included from /lustre/scratch/proj/sw/openfoam/2.1.1/cnl3.1_gnu4.6.2/OpenFOAM-2.1.1/src/finiteVolume/lnInclude/fvCFD.H:6:0,
                from pisoFoamAJ.C:34:
/lustre/scratch/proj/sw/openfoam/2.1.1/cnl3.1_gnu4.6.2/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/Time.H:46:21: fatal error: cpuTime.H: No such file or directory
compilation terminated.
make: *** [Make/linux64GccDPOpt/pisoFoamAJ.o] Error 1

Any idea why? Is it because of the clock skew? Or perhaps something in the OpenFOAM environment is screwed up? Below are the FOAM_ and WM_ environment variables for this machine:

Code:


env | grep FOAM_
FOAM_SOLVERS=/lustre/scratch/proj/sw/openfoam/2.1.1/cnl3.1_gnu4.6.2/OpenFOAM-2.1.1/applications/solvers
FOAM_EXT_LIBBIN=/lustre/scratch/proj/sw/openfoam/2.1.1/cnl3.1_gnu4.6.2/ThirdParty-2.1.1/platforms/linux64GccDPOpt/lib
FOAM_APPBIN=/lustre/scratch/proj/sw/openfoam/2.1.1/cnl3.1_gnu4.6.2/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/bin
FOAM_TUTORIALS=/lustre/scratch/proj/sw/openfoam/2.1.1/cnl3.1_gnu4.6.2/OpenFOAM-2.1.1/tutorials
FOAM_JOB_DIR=/lustre/scratch/proj/sw/openfoam/2.1.1/cnl3.1_gnu4.6.2/jobControl
FOAM_SITE_APPBIN=/lustre/scratch/proj/sw/openfoam/2.1.1/cnl3.1_gnu4.6.2/site/2.1.1/platforms/linux64GccDPOpt/bin
OPENFOAM_LIB=-L /lustre/scratch/proj/sw/openfoam/2.1.1/cnl3.1_gnu4.6.2/OpenFOAM-2.1.1/lib
FOAM_APP=/lustre/scratch/proj/sw/openfoam/2.1.1/cnl3.1_gnu4.6.2/OpenFOAM-2.1.1/applications
FOAM_SITE_LIBBIN=/lustre/scratch/proj/sw/openfoam/2.1.1/cnl3.1_gnu4.6.2/site/2.1.1/platforms/linux64GccDPOpt/lib
FOAM_SRC=/lustre/scratch/proj/sw/openfoam/2.1.1/cnl3.1_gnu4.6.2/OpenFOAM-2.1.1/src
FOAM_SIGFPE=
FOAM_UTILITIES=/lustre/scratch/proj/sw/openfoam/2.1.1/cnl3.1_gnu4.6.2/OpenFOAM-2.1.1/applications/utilities
FOAM_USER_LIBBIN=/nics/c/home/janirban/OpenFOAM/janirban-2.1.1/platforms/linux64GccDPOpt/lib
OPENFOAM_INC=-I /lustre/scratch/proj/sw/openfoam/2.1.1/cnl3.1_gnu4.6.2/OpenFOAM-2.1.1/include
FOAM_INST_DIR=/lustre/scratch/proj/sw/openfoam/2.1.1/cnl3.1_gnu4.6.2
FOAM_MPI=mpich2-system
FOAM_LIBBIN=/lustre/scratch/proj/sw/openfoam/2.1.1/cnl3.1_gnu4.6.2/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/lib
FOAM_SETTINGS=
FOAM_RUN=/nics/c/home/janirban/OpenFOAM/janirban-2.1.1/run
OPENFOAM_DIR=/lustre/scratch/proj/sw/openfoam/2.1.1/cnl3.1_gnu4.6.2/OpenFOAM-2.1.1
FOAM_USER_APPBIN=/nics/c/home/janirban/OpenFOAM/janirban-2.1.1/platforms/linux64GccDPOpt/bin

and

Code:


env | grep WM_
WM_LINK_LANGUAGE=c++
WM_ARCH=linux64Gcc
WM_PROJECT_VERSION=2.1.1
WM_CXXFLAGS=-m64 -fPIC
WM_CFLAGS=-m64 -fPIC
WM_COMPILER_LIB_ARCH=64
WM_PROJECT_INST_DIR=/lustre/scratch/proj/sw/openfoam/2.1.1/cnl3.1_gnu4.6.2
WM_PROJECT_DIR=/lustre/scratch/proj/sw/openfoam/2.1.1/cnl3.1_gnu4.6.2/OpenFOAM-2.1.1
WM_CXX=g++
WM_PROJECT=OpenFOAM
WM_LDFLAGS=-m64
WM_MPLIB=MPICH
WM_CC=gcc
WM_COMPILE_OPTION=Opt
WM_DIR=/lustre/scratch/proj/sw/openfoam/2.1.1/cnl3.1_gnu4.6.2/OpenFOAM-2.1.1/wmake
WM_PROJECT_USER_DIR=/nics/c/home/janirban/OpenFOAM/janirban-2.1.1
WM_OPTIONS=linux64GccDPOpt
WM_PRECISION_OPTION=DP

BTW the compiler is
gcc version 4.6.2 20111026 (Cray Inc.) (GCC)

Thanks much in anticipation of your help
Anirban

jans April 16, 2013 19:34

I have narrowed down the reason. In the compilation command, the following include is incorrect:
Code:

-I/lustre/scratch/proj/sw/openfoam/2.1.1/cnl3.1_gnu4.6.2/OpenFOAM-2.1.1/src/OSspecific//lnInclude
It should be
Code:

-I/lustre/scratch/proj/sw/openfoam/2.1.1/cnl3.1_gnu4.6.2/OpenFOAM-2.1.1/src/OSspecific/POSIX/lnInclude
Note: "POSIX" was missing

When I correct this and run the compilation command manually, it works. Looks to me like some script somewhere is corrupted that is causing this broken include. Can someone let me know what?

Thanks much
Anirban

nandiganavishal March 19, 2014 15:32

Hi Anirban,

I am facing the same problem while trying to compile icoFoam in Kraken cluster. Could you let me know if you were able to resolve this issue ?

Thanks

Regards,
Vishal Nandigana


All times are GMT -4. The time now is 04:21.