I copied icoFoam solver folder from /opt/openfoam222/applications/solvers/incompressible/icoFoam and placed it in my working directory. I made following changes:
1.) Renamed icoFoam folder to micoFoam
2.) Renamed icoFoam.C to micoFoam.C
3.) In Make/files changed icoFoam.C to micoFoam.C
and also changed FOAM_APPBIN/icoFoam to FOAM_USER_APPBIN/micoFoam
I went inside micoFoam directory and typed wmake. I got the following error:
Making dependency list for source file micoFoam.C
SOURCE=micoFoam.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -I/usr/local/apps/OpenFOAM/gcc454-2.2.2/OpenFOAM-2.2.2/src/finiteVolume/lnInclude -I/usr/local/apps/OpenFOAM/gcc454-2.2.2/OpenFOAM-2.2.2/src/sampling/lnInclude -IlnInclude -I. -I/usr/local/apps/OpenFOAM/gcc454-2.2.2/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude -I/usr/local/apps/OpenFOAM/gcc454-2.2.2/OpenFOAM-2.2.2/src/OSspecific/POSIX/lnInclude -I/usr/local/apps/foam/gnu44ThirdParty-2.1.1/ParaView-3.14.1-Linux-64bit/bin/include/paraview- -fPIC -c $SOURCE -o Make/linux64Gcc45DPOpt/micoFoam.o
/usr/local/apps/OpenFOAM/gcc454-2.2.2/OpenFOAM-2.2.2/src/finiteVolume/lnInclude/readPISOControls.H: In function ‘int main(int, char**)’:
/usr/local/apps/OpenFOAM/gcc454-2.2.2/OpenFOAM-2.2.2/src/finiteVolume/lnInclude/readPISOControls.H:3:15: warning: unused variable ‘nOuterCorr’
/usr/local/apps/OpenFOAM/gcc454-2.2.2/OpenFOAM-2.2.2/src/finiteVolume/lnInclude/readPISOControls.H:12:16: warning: unused variable ‘momentumPredictor’
/usr/local/apps/OpenFOAM/gcc454-2.2.2/OpenFOAM-2.2.2/src/finiteVolume/lnInclude/readPISOControls.H:15:16: warning: unused variable ‘transonic’
mkdir: `': No such file or directory
make: *** [/micoFoam] Error 1
I don't understand the last two line:
mkdir: `': No such file or directory
make: *** [/micoFoam] Error 1
when i compiled above 'micoFoam' on my laptop it compiled. Now I am compiling it on cluster and it is giving me above error. Any ideas what is lacking?
I'm guessing your compiler might be problematic?
I haven't seen the error before, but from the path you have I assume you have gcc 4.5.4, and according to the OF website,
"The GCC compiler may need to be upgraded to version 4.7 or higher, a requirement for OpenFOAM. "
It might be that when you compiled OF on the cluster, it had some errors making relevant parts of the wmake system? I'm not sure, just a thought.
Thanks Christian. I was also thinking on the same lines. I will get the compiler version updated and let you know.
I guess compiler is not the problem on the link you provided if you scroll down, you will find following lines written under 'CHECKING THE SYSTEM':
"The default compiler for OpenFOAM is GCC. OpenFOAM v2.2 series will only compile with versions of GCC above 4.5.0."
I have GCC-4.5.4 so compiler version should not be a problem.
Any other ideas?
What do you have in your Make/files file?
In particular, where is it trying to put your application?
My next guess is that you're trying to compile it as/to $FOAM_USER_APPBIN/micoFoam, and that if you type
So whilst I'm not very confident this is your issue, it's possible that your user directories for the output of your compilation doesn't exist, and then mkdir can't make the relevant directory to store it because it is multiple directories down a non-existent hierarchy.
As a quick check, try using
I solved the problem. I dunno how OF-2.2.2 was installed on the cluster by the administrator, it was not recognizing the environment variable "FOAM_USER_APPBIN". As soon as I realized this, I set the environment variable as below:
But now I have a new problem.......although the micoFoam.C has compiled but when I tried running it on cavity tutorial from my home directory ' /share/mvaish/OpenFOAM/mvaish-2.2.2/run/cavity' I got the error message:
Add it to your $PATH :)
relog into your cluster :)
I'm guessing you source the OF bashrc file through some sort of .profile file?
etc/bashrc will add the $FOAM_USER_APPBIN to your $PATH, but if you didn't set $FOAM_USER_APPBIN before bashrc was sourced, it won't be on your $PATH.
As such, you need to make sure you set the environment variable $FOAM_USER_APPBIN, and then source the bashrc file afterwards. (Comparable instructions for whatever the csh/ksch files are - I haven't used these but I'm guessing you might be from your setenv command.)
A relative newbie to OpenFoam here, but -
I am having the same problem as initially reported in this thread.
Making dependency list 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/opt/openfoam222/src/finiteVolume/lnInclude -I/opt/openfoam222/src/sampling/lnInclude -IlnInclude -I. -I/opt/openfoam222/src/OpenFOAM/lnInclude -I/opt/openfoam222/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/myIcoFoam.o
In file included from myIcoFoam.C:53:0:
/opt/openfoam222/src/finiteVolume/lnInclude/readPISOControls.H: In function ‘int main(int, char**)’:
/opt/openfoam222/src/finiteVolume/lnInclude/readPISOControls.H:3:15: warning: unused variable ‘nOuterCorr’ [-Wunused-variable]
/opt/openfoam222/src/finiteVolume/lnInclude/readPISOControls.H:12:16: warning: unused variable ‘momentumPredictor’ [-Wunused-variable]
/opt/openfoam222/src/finiteVolume/lnInclude/readPISOControls.H:15:16: warning: unused variable ‘transonic’ [-Wunused-variable]
mkdir: cannot create directory ‘’: No such file or directory
make: *** [/myIcoFoam] Error 1 "
After following the original advice i also found my $FOAM_USER_APPBIN to be non-existent.
I created then created the folder
:~/OpenFOAM/gareth-2.2.2$ cd platforms/linux64GccDPOpt/bin
and went back to my folder to re use wmake...
this gave me the same error
Any help on this would greatly help.
Greetings to all!
I'll need a bit more information, in order to deduce what the problem might be:
To answer your questions:
1) I am on ubuntu 13.04
2) The installation is .. well i cant recall exactly, as i installed it a while back, but i dont recall deviating from the instructions. I used the install instructions from this site http://www.openfoam.org/download/ubuntu.php
(side - i can run the tuts, have run my own models, and it all works...)
3)when i sheck $SHELL the reply is /bin/bash,
4) as to the content of "make/files"
EXE = $(FOAM_USER_APPBIN)/myIcoFoam"
Sorry my knowledge of linux is limited and i am basically picking things up as i go
OK, try the following steps:
I had the right folder in place.. but deleted it and started again with the mkdir command as you suggested. I cant explain it but, it worked fine.. thanks :)
Not sure on the difference but it works and i can work on.
|All times are GMT -4. The time now is 07:39.|