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

Error: Could not open file XX.h for source file YY.C

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   April 16, 2013, 18:01
Default Error: Could not open file XX.h for source file YY.C
  #1
New Member
 
Anirban Jana
Join Date: Apr 2010
Location: Pittsburgh, PA, USA
Posts: 19
Rep Power: 7
jans is on a distinguished road
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 is offline   Reply With Quote

Old   April 16, 2013, 19:34
Default
  #2
New Member
 
Anirban Jana
Join Date: Apr 2010
Location: Pittsburgh, PA, USA
Posts: 19
Rep Power: 7
jans is on a distinguished road
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
jans is offline   Reply With Quote

Old   March 19, 2014, 15:32
Default
  #3
Senior Member
 
Vishal Nandigana
Join Date: Mar 2009
Location: Champaign, Illinois, U.S.A
Posts: 206
Rep Power: 9
nandiganavishal is on a distinguished road
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
nandiganavishal is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
swak4foam building problem GGerber OpenFOAM Installation 54 April 24, 2015 16:02
wmake compiling new solver mksca OpenFOAM Programming & Development 13 August 18, 2014 22:26
interFoam & decomposition method: scotch MacGyver OpenFOAM Running, Solving & CFD 2 May 23, 2012 07:00
2.0.x on Mac OSX niklas OpenFOAM Installation on Windows, Mac and other Unsupported Platforms 74 March 28, 2012 16:46
openfoam 1.6 on debian etch romant OpenFOAM Installation 9 May 6, 2010 02:26


All times are GMT -4. The time now is 05:55.