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/)
-   -   wmake new solver (https://www.cfd-online.com/Forums/openfoam-programming-development/140821-wmake-new-solver.html)

imani August 24, 2014 02:08

wmake new solver
 
hi formers
i have a problem in wmake a new solver that i write it
when i want wmake it, i have this error:
make: *** No rule to make target `/opt/openfoam211/src/OpenFOAM/lnInclude/debugName.H', needed by `buoyantBoussinesqCO2SimpleFoam.dep'. Stop.

hk318i August 24, 2014 06:09

It is linking problem,
You can fixed by adding -I$(LIB_SRC)/OpenFOAM/lnInclude to the solver options file. Then clean and recompile again.

imani August 24, 2014 06:24

thanks alot
should i add comment "-I$(LIB_SRC" to solver?

hk318i August 24, 2014 06:45

Quote:

Originally Posted by imani (Post 507512)
thanks alot
should i add comment "-I$(LIB_SRC" to solver?

What do you mean? You have to add it in Make/options.

Code:

EXE_INC = \
              -I$(LIB_SRC)/path to linked headers \
              -I$(LIB_SRC)/OpenFOAM/lnInclude
LIB_LIBS = \
    -lOpenFOAM \
    -l(used libraries names)

You shouldn't change anything inside your source code (solver.C or solver.H). It is linking problem.

imani August 24, 2014 08:31

hi again and thanks for your response
i add it but now i have this problem


dell@ubuntu:~$ cd Desktop/imani-Solver/
dell@ubuntu:~/Desktop/imani-Solver$ of211
dell@ubuntu:~/Desktop/imani-Solver$ wmake
linux64GccDPOpt/options:7: *** missing separator. Stop.
Make/linux64GccDPOpt/options:7: *** missing separator. Stop.
dell@ubuntu:~/Desktop/imani-Solver$

hk318i August 24, 2014 08:41

Quote:

Originally Posted by imani (Post 507522)
hi again and thanks for your response
i add it but now i have this problem


dell@ubuntu:~$ cd Desktop/imani-Solver/
dell@ubuntu:~/Desktop/imani-Solver$ of211
dell@ubuntu:~/Desktop/imani-Solver$ wmake
linux64GccDPOpt/options:7: *** missing separator. Stop.
Make/linux64GccDPOpt/options:7: *** missing separator. Stop.
dell@ubuntu:~/Desktop/imani-Solver$

could you please post a copy of your options file?

imani August 24, 2014 09:00

thanks alot
now i have another problem

dell@ubuntu:~/Desktop/imani-Solver$ wclean
dell@ubuntu:~/Desktop/imani-Solver$ wmake
Making dependency list for source file buoyantBoussinesqCO2SimpleFoam.C
SOURCE=buoyantBoussinesqCO2SimpleFoam.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/home/dell/OpenFOAM/OpenFOAM-2.3.0/src/finiteVolume/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.3.0/src/sampling/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.3.0/src/meshTools/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.3.0/src/fvOptions/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.3.0/src/turbulenceModels -I/home/dell/OpenFOAM/OpenFOAM-2.3.0/src/turbulenceModels/incompressible/RAS/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.3.0/src/transportModels -I/home/dell/OpenFOAM/OpenFOAM-2.3.0/src/transportModels/incompressible/singlePhaseTransportModel -I/home/dell/OpenFOAM/OpenFOAM-2.3.0/src/thermophysicalModels/radiationModels/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.3.0/src/path to linked headers -I/home/dell/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude -IlnInclude -I. -I/home/dell/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.3.0/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/buoyantBoussinesqCO2SimpleFoam.o
g++: error: to: No such file or directory
g++: error: linked: No such file or directory
g++: error: headers: No such file or directory
make: *** [Make/linux64GccDPOpt/buoyantBoussinesqCO2SimpleFoam.o] Error 1

imani August 24, 2014 09:02

yeah ....it is my option file

EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
-I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \
-I$(LIB_SRC)/path to linked headers \
-I$(LIB_SRC)/OpenFOAM/lnInclude

EXE_LIBS = \
-lfiniteVolume \
-lsampling \
-lmeshTools \
-lfvOptions \
-lincompressibleTurbulenceModel \
-lincompressibleRASModels -u incompressibleRASModelsLoad \
-lincompressibleTransportModels \
-lradiationModels \
-lOpenFOAM \
-l(used libraries names)

hk318i August 24, 2014 09:34

EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
-I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude
-I$(LIB_SRC)/OpenFOAM/lnInclude

EXE_LIBS = \
-lfiniteVolume \
-lsampling \
-lmeshTools \
-lfvOptions \
-lincompressibleTurbulenceModel \
-lincompressibleRASModels -u incompressibleRASModelsLoad \
-lincompressibleTransportModels \
-lradiationModels \
-lOpenFOAM




Try this as your options but review this line
-lincompressibleRASModels -u incompressibleRASModelsLoad \
I think it is wrong

imani August 24, 2014 09:46

now i add it but i have this error

dell@ubuntu:~/Desktop/imani-Solver$ wmake
linux64GccDPOpt/options:7: *** missing separator. Stop.
wmake error: file 'Make/linux64GccDPOpt/objectFiles' could not be created in /home/dell/Desktop/imani-Solver

imani August 24, 2014 09:53

oooh thanks that error was about "/"
when i put it and wmake again i for of230 it was correctly wmake
but for of211 i have these error
dell@ubuntu:~/Desktop/imani-Solver$ wmake
Making dependency list for source file buoyantBoussinesqCO2SimpleFoam.C
could not open file basicThermo.H for source file buoyantBoussinesqCO2SimpleFoam.C
could not open file fvIOoptionList.H for source file buoyantBoussinesqCO2SimpleFoam.C
could not open file createIncompressibleRadiationModel.H for source file buoyantBoussinesqCO2SimpleFoam.C
could not open file createFvOptions.H for source file buoyantBoussinesqCO2SimpleFoam.C
SOURCE=buoyantBoussinesqCO2SimpleFoam.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/finiteVolume/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/sampling/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/meshTools/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/fvOptions/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/turbulenceModels -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/turbulenceModels/incompressible/RAS/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/transportModels -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/transportModels/incompressible/singlePhaseTransportModel -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/radiationModels/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude -IlnInclude -I. -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/buoyantBoussinesqCO2SimpleFoam.o
In file included from buoyantBoussinesqCO2SimpleFoam.C:51:0:
/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/radiationModels/lnInclude/radiationModel.H:48:25: fatal error: basicThermo.H: No such file or directory
compilation terminated.
make: *** [Make/linux64GccDPOpt/buoyantBoussinesqCO2SimpleFoam.o] Error 1

hk318i August 24, 2014 20:35

Quote:

Originally Posted by imani (Post 507540)
oooh thanks that error was about "/"
when i put it and wmake again i for of230 it was correctly wmake
but for of211 i have these error
dell@ubuntu:~/Desktop/imani-Solver$ wmake
Making dependency list for source file buoyantBoussinesqCO2SimpleFoam.C
could not open file basicThermo.H for source file buoyantBoussinesqCO2SimpleFoam.C
could not open file fvIOoptionList.H for source file buoyantBoussinesqCO2SimpleFoam.C
could not open file createIncompressibleRadiationModel.H for source file buoyantBoussinesqCO2SimpleFoam.C
could not open file createFvOptions.H for source file buoyantBoussinesqCO2SimpleFoam.C
SOURCE=buoyantBoussinesqCO2SimpleFoam.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/finiteVolume/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/sampling/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/meshTools/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/fvOptions/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/turbulenceModels -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/turbulenceModels/incompressible/RAS/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/transportModels -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/transportModels/incompressible/singlePhaseTransportModel -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/radiationModels/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude -IlnInclude -I. -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/buoyantBoussinesqCO2SimpleFoam.o
In file included from buoyantBoussinesqCO2SimpleFoam.C:51:0:
/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/radiationModels/lnInclude/radiationModel.H:48:25: fatal error: basicThermo.H: No such file or directory
compilation terminated.
make: *** [Make/linux64GccDPOpt/buoyantBoussinesqCO2SimpleFoam.o] Error 1

It seams that you included basicThermo.H in your solver but you didn't link it in your options file. You have to add -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude
and -lfluidThermophysicalModels

You have to make sure that each header file you included in your code is linked in your options file thus the compiler will be able to see it.

chrisb2244 August 24, 2014 23:26

Not sure if this is related to your problem, but some of the OpenFOAM dependencies changed between OF-2.3.0 and OF-2.2.2 etc, so try using wclean before wmake, or alternatively manually removing the .dep files.

imani August 25, 2014 01:48

hi
thanks for your attention
i add it but now i have error

dell@ubuntu:~/Desktop/imani-Solver$ wmake
options:11:53: warning: backslash and newline separated by space [enabled by default]
Making dependency list for source file buoyantBoussinesqCO2SimpleFoam.C
could not open file fvIOoptionList.H for source file buoyantBoussinesqCO2SimpleFoam.C
could not open file createIncompressibleRadiationModel.H for source file buoyantBoussinesqCO2SimpleFoam.C
could not open file createFvOptions.H for source file buoyantBoussinesqCO2SimpleFoam.C
SOURCE=buoyantBoussinesqCO2SimpleFoam.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/finiteVolume/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/sampling/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/meshTools/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/fvOptions/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/turbulenceModels -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/turbulenceModels/incompressible/RAS/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/transportModels -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/transportModels/incompressible/singlePhaseTransportModel -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/radiationModels/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/basic/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude -IlnInclude -I. -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/buoyantBoussinesqCO2SimpleFoam.o
buoyantBoussinesqCO2SimpleFoam.C:52:28: fatal error: fvIOoptionList.H: No such file or directory
compilation terminated.
make: *** [Make/linux64GccDPOpt/buoyantBoussinesqCO2SimpleFoam.o] Error 1
dell@ubuntu:~/Desktop/imani-Solver$ wmake
SOURCE=buoyantBoussinesqCO2SimpleFoam.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/finiteVolume/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/sampling/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/meshTools/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/fvOptions/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/turbulenceModels -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/turbulenceModels/incompressible/RAS/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/transportModels -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/transportModels/incompressible/singlePhaseTransportModel -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/radiationModels/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/basic/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude -IlnInclude -I. -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/buoyantBoussinesqCO2SimpleFoam.o
buoyantBoussinesqCO2SimpleFoam.C:52:28: fatal error: fvIOoptionList.H: No such file or directory
compilation terminated.
make: *** [Make/linux64GccDPOpt/buoyantBoussinesqCO2SimpleFoam.o] Error 1
dell@ubuntu:~/Desktop/imani-Solver$ wclean
dell@ubuntu:~/Desktop/imani-Solver$ wmake
options:11:53: warning: backslash and newline separated by space [enabled by default]
Making dependency list for source file buoyantBoussinesqCO2SimpleFoam.C
could not open file fvIOoptionList.H for source file buoyantBoussinesqCO2SimpleFoam.C
could not open file createIncompressibleRadiationModel.H for source file buoyantBoussinesqCO2SimpleFoam.C
could not open file createFvOptions.H for source file buoyantBoussinesqCO2SimpleFoam.C
SOURCE=buoyantBoussinesqCO2SimpleFoam.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/finiteVolume/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/sampling/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/meshTools/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/fvOptions/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/turbulenceModels -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/turbulenceModels/incompressible/RAS/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/transportModels -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/transportModels/incompressible/singlePhaseTransportModel -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/radiationModels/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/basic/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude -IlnInclude -I. -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude -I/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/buoyantBoussinesqCO2SimpleFoam.o
buoyantBoussinesqCO2SimpleFoam.C:52:28: fatal error: fvIOoptionList.H: No such file or directory
compilation terminated.
make: *** [Make/linux64GccDPOpt/buoyantBoussinesqCO2SimpleFoam.o] Error 1

chrisb2244 August 25, 2014 02:09

So your problem is not related to wmake looking for files in the wrong places, it is instead as hk318i already mentioned for one of your other files.

The lines you need to consider are near the top of your error message:

Quote:

Originally Posted by imani (Post 507588)
Making dependency list for source file buoyantBoussinesqCO2SimpleFoam.C
could not open file fvIOoptionList.H for source file buoyantBoussinesqCO2SimpleFoam.C
could not open file createIncompressibleRadiationModel.H for source file buoyantBoussinesqCO2SimpleFoam.C
could not open file createFvOptions.H for source file buoyantBoussinesqCO2SimpleFoam.C


You need to find where these files are located, and include them in your 'Make/options' file. Also note, you can avoid the message about backslash and newline by removing the whitespace at the end of the lines, after the backslashes (\).

imani August 25, 2014 03:16

thanks
now i addd them
i add fvoption to option file
but now i have this error yet....

buoyantBoussinesqCO2SimpleFoam.C:52:28: fatal error: fvIOoptionList.H: No such file or directory
compilation terminated.
make: *** [Make/linux64GccDPOpt/buoyantBoussinesqCO2SimpleFoam.o] Error 1


fvIOoptionList.H file was in fvoptionfile that was added in option file

chrisb2244 August 25, 2014 03:30

So then I guess two questions - the first is, can you paste your current options file again?And secondly (and I'm sure you do, but just to check...), is your OF-2.1.1 installation in fact in /home/dell/OpenFOAM/OpenFOAM-2.1.1/ , and is it complete? You don't think you could possibly have deleted some files etc?

imani August 25, 2014 03:42

my openfoam installation is complete and i dont delete anything



EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude -I$(LIB_SRC)/sampling/lnInclude -I$(LIB_SRC)/meshTools/lnInclude -I$(LIB_SRC)/fvOptions/lnInclude -I$(LIB_SRC)/turbulenceModels -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/lnInclude -I$(LIB_SRC)/transportModels -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel -I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude -I$(LIB_SRC)/OpenFOAM/lnInclude

EXE_LIBS = \
-lfiniteVolume \
-lsampling \
-lmeshTools \
-lfvOptions \
-lincompressibleTurbulenceModel \
-lincompressibleRASModels -u incompressibleRASModelsLoad \
-lincompressibleTransportModels \
-lradiationModels \
-lfluidThermophysicalModels \
-lOpenFOAM

chrisb2244 August 25, 2014 04:02

So typing in a terminal
Code:

ls /home/dell/OpenFOAM/OpenFOAM-2.1.1/src/fvOptions/lnInclude/fvIO*

returns something like
Code:

/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/fvOptions/lnInclude/fvIOoptionList.C
/home/dell/OpenFOAM/OpenFOAM-2.1.1/src/fvOptions/lnInclude/fvIOoptionList.H

?


If so, I'm sorry but I have no idea as to where the problem is.

imani August 25, 2014 04:29

excuse me
if i have problem in my openFoam. should i install it again or i can repair it?
thanks alot


All times are GMT -4. The time now is 22:37.