|
[Sponsors] |
April 8, 2014, 16:52 |
Compilation error
|
#1 |
Member
India
Join Date: Oct 2012
Posts: 84
Rep Power: 13 |
Hi Foamers,
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? Regards, Mayank |
|
April 8, 2014, 20:56 |
|
#2 |
Member
Christian Butcher
Join Date: Jul 2013
Location: Japan
Posts: 85
Rep Power: 12 |
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. " http://www.openfoam.org/download/source.php 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. |
|
April 9, 2014, 00:02 |
|
#3 |
Member
India
Join Date: Oct 2012
Posts: 84
Rep Power: 13 |
Thanks Christian. I was also thinking on the same lines. I will get the compiler version updated and let you know.
|
|
April 9, 2014, 16:23 |
|
#4 |
Member
India
Join Date: Oct 2012
Posts: 84
Rep Power: 13 |
Hi Christian,
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? |
|
April 10, 2014, 00:51 |
|
#5 |
Member
Christian Butcher
Join Date: Jul 2013
Location: Japan
Posts: 85
Rep Power: 12 |
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 Code:
echo $FOAM_USER_APPBIN 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 Code:
EXE = $(FOAM_APPBIN)/micoFoam Best, Christian |
|
April 10, 2014, 01:59 |
|
#6 |
Member
India
Join Date: Oct 2012
Posts: 84
Rep Power: 13 |
Hey Christian,
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: Code:
setenv FOAM_USER_APPBIN /share/mvaish/OpenFOAM/mvaish-2.2.2/platforms/linux64GccDPOpt/bin 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: Code:
micoFoam: Command not found Best, Mayank |
|
April 10, 2014, 02:19 |
Add it to your $PATH :)
|
#7 |
Member
Christian Butcher
Join Date: Jul 2013
Location: Japan
Posts: 85
Rep Power: 12 |
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.) Best, Christian |
|
May 9, 2014, 16:28 |
|
#8 |
Member
Gareth
Join Date: Jun 2010
Posts: 56
Rep Power: 16 |
Hi Guys
A relative newbie to OpenFoam here, but - I am having the same problem as initially reported in this thread. "~/OpenFOAM/gareth-2.2.2/applications/myIcoFoam$ wmake 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. Thanks |
|
May 10, 2014, 06:29 |
|
#9 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Greetings to all!
@Gareth: I'll need a bit more information, in order to deduce what the problem might be:
Best regards, Bruno
__________________
|
|
May 10, 2014, 06:45 |
info
|
#10 |
Member
Gareth
Join Date: Jun 2010
Posts: 56
Rep Power: 16 |
Hi Bruno
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" "myIcoFoam.C EXE = $(FOAM_USER_APPBIN)/myIcoFoam" Sorry my knowledge of linux is limited and i am basically picking things up as i go Thanks Gareth |
|
May 10, 2014, 07:05 |
|
#11 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Hi Gareth,
OK, try the following steps:
Bruno |
|
May 10, 2014, 07:09 |
|
#12 |
Member
Gareth
Join Date: Jun 2010
Posts: 56
Rep Power: 16 |
@Bruno
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. hehe |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[blockMesh] blockMesh with double grading. | spwater | OpenFOAM Meshing & Mesh Conversion | 92 | January 12, 2019 09:00 |
Pressure outlet boundary condition | rolando | OpenFOAM Running, Solving & CFD | 62 | September 18, 2017 06:45 |
[OpenFOAM] Native ParaView Reader Bugs | tj22 | ParaView | 270 | January 4, 2016 11:39 |
OpenFOAM on MinGW crosscompiler hosted on Linux | allenzhao | OpenFOAM Installation | 127 | January 30, 2009 19:08 |
Compiling problems with hello worldC | fw407 | OpenFOAM Installation | 21 | January 6, 2008 17:38 |