|
[Sponsors] |
OF-1.6.x applications don't compile, although rest does |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 11, 2010, 12:21 |
OF-1.6.x applications don't compile, although rest does
|
#1 |
Senior Member
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 18 |
Dear all,
I am compiling OpenFOAM-1.6.x on a cluster with Scientific Linux 4 (64 bit). After some effort things seemed to work as ThirdParty compiled (except parMGridGen, but I don't think I need it), openmpi-1.3.3 compiled, Pstream compiled, OpenFOAM-1.6.x/src compiled, so I thought I was all set. But now applications need to be compiled and I get an error. When the script goes to Code:
wmake all solvers Code:
+ wmake all solvers + wmake laplacianFoam Making dependency list for source file laplacianFoam.C make[1]: Entering directory `/homelth/wierink_g/OpenFOAM/OpenFOAM-1.6.x/applications/solvers/basic/laplacianFoam' SOURCE=laplacianFoam.C ; g++ -m64 -Dlinux -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -I/homelth/wierink_g/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude -I/homelth/wierink_g/OpenFOAM/OpenFOAM-1.6.x/src/OpenFOAM/lnInclude -IlnInclude -I. -I/homelth/wierink_g/OpenFOAM/OpenFOAM-1.6.x/src//homelth/wierink_g/OpenFOAM/OpenFOAM-1.6.x/lnInclude -I/homelth/wierink_g/OpenFOAM/OpenFOAM-1.6.x/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/laplacianFoam.o /homelth/wierink_g/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude/readSIMPLEControls.H: In function ‘int main(int, char**)’: /homelth/wierink_g/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude/readSIMPLEControls.H:6: warning: unused variable ‘momentumPredictor’ /homelth/wierink_g/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude/readSIMPLEControls.H:9: warning: unused variable ‘fluxGradp’ /homelth/wierink_g/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude/readSIMPLEControls.H:12: warning: unused variable ‘transonic’ g++ -m64 -Dlinux -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -I/homelth/wierink_g/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude -I/homelth/wierink_g/OpenFOAM/OpenFOAM-1.6.x/src/OpenFOAM/lnInclude -IlnInclude -I. -I/homelth/wierink_g/OpenFOAM/OpenFOAM-1.6.x/src//homelth/wierink_g/OpenFOAM/OpenFOAM-1.6.x/lnInclude -I/homelth/wierink_g/OpenFOAM/OpenFOAM-1.6.x/src/OSspecific/POSIX/lnInclude -fPIC Make/linux64GccDPOpt/laplacianFoam.o -L/homelth/wierink_g/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt \ -lfiniteVolume -l/homelth/wierink_g/OpenFOAM/OpenFOAM-1.6.x -liberty -ldl -lm -o /homelth/wierink_g/OpenFOAM/OpenFOAM-1.6.x/applications/bin/linux64GccDPOpt/laplacianFoam /usr/bin/ld: cannot find -l/homelth/wierink_g/OpenFOAM/OpenFOAM-1.6.x collect2: ld returned 1 exit status Thank you in advance!
__________________
Regards, Gijs |
|
June 11, 2010, 13:02 |
|
#2 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
I haven't used 1.6 myself, but this looks odd to me. "/homelth/wierink_g/OpenFOAM/OpenFOAM-1.6.x" is not a library, so it doesn't seem surprising ld would complain. From the output I get using 1.5 I'd expect to see "-lOpenFOAM" there instead. Hope this helps.
- Anton |
|
June 11, 2010, 13:34 |
|
#3 | |
Senior Member
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 18 |
Hi Anton,
Quote:
__________________
Regards, Gijs |
||
June 11, 2010, 18:46 |
|
#4 | ||
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings Gijsbert,
If I interpreted correctly, Scientific Linux is based on Enterprise Linux... which I can only assume it's Red Hat Enterprise Linux. And Fedora is somewhat based on Red Hat Linux, sooo... You probably need the following solution (from OpenFOAM-1.5-dev SVN15xx with gcc-4.4.2): Quote:
I say this solution (and it's strange that the building procedure didn't break sooner) is because there is more then one miss-definition in the output that you posted... more specifically this: Code:
-I/homelth/wierink_g/OpenFOAM/OpenFOAM-1.6.x/src//homelth/wierink_g/OpenFOAM/OpenFOAM-1.6.x/lnInclude If you want instructions on how to build OpenFOAM 1.6.x in Fedora type Linux... er, Red Hat Linux type I suppose, here it is: Quote:
Bruno
__________________
|
|||
June 12, 2010, 14:32 |
|
#5 |
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36 |
I would think it depends on the system myself. I do not have this problem on SUSE Linux Enterprise or openSUSE (gcc 4.4.1).
__________________
Alberto Passalacqua GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541) OpenQBMM - An open-source implementation of quadrature-based moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. |
|
June 14, 2010, 08:03 |
|
#6 | ||
Senior Member
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 18 |
Dear Anton, Bruno, and Alberto,
Many thanks for your replies! Quote:
I changed the WM_PROJECT environment variable to "OpenFOAM", as Anton mentioned, so the Quote:
I also added the -P flag, as Bruno suggested. I recompiled the whole lot, including ThirdParty, but still get an error when compiling lalacianFoam (that's just the random solver I started compiling first): Code:
[wierink_g@lclth01 basic]$ wmake laplacianFoam Making dependency list for source file laplacianFoam.C SOURCE=laplacianFoam.C ; g++ -m64 -Dlinux -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -I/homelth/wierink_g/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude -I/homelth/wierink_g/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt -IlnInclude -I. -I/homelth/wierink_g/OpenFOAM/OpenFOAM-1.6.x/src/OpenFOAM/lnInclude -I/homelth/wierink_g/OpenFOAM/OpenFOAM-1.6.x/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOptOPENMPI/laplacianFoam.o /homelth/wierink_g/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude/readSIMPLEControls.H: In function ‘int main(int, char**)’: /homelth/wierink_g/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude/readSIMPLEControls.H:6: warning: unused variable ‘momentumPredictor’ /homelth/wierink_g/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude/readSIMPLEControls.H:9: warning: unused variable ‘fluxGradp’ /homelth/wierink_g/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude/readSIMPLEControls.H:12: warning: unused variable ‘transonic’ g++ -m64 -Dlinux -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -I/homelth/wierink_g/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude -I/homelth/wierink_g/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt -IlnInclude -I. -I/homelth/wierink_g/OpenFOAM/OpenFOAM-1.6.x/src/OpenFOAM/lnInclude -I/homelth/wierink_g/OpenFOAM/OpenFOAM-1.6.x/src/OSspecific/POSIX/lnInclude -fPIC Make/linux64GccDPOptOPENMPI/laplacianFoam.o -L/homelth/wierink_g/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOptOPENMPI \ -lfiniteVolume -lOpenFOAM -liberty -ldl -lm -o /homelth/wierink_g/OpenFOAM/OpenFOAM-1.6.x/applications/bin/linux64GccDPOpt/laplacianFoam /usr/bin/ld: cannot find -lfiniteVolume collect2: ld returned 1 exit status make: *** [/homelth/wierink_g/OpenFOAM/OpenFOAM-1.6.x/applications/bin/linux64GccDPOpt/laplacianFoam] Error 1 Would anyone have any idea? Thanks in advance!
__________________
Regards, Gijs |
|||
June 14, 2010, 08:13 |
|
#7 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
Are you sure OpenFOAM compiled properly with no errors?
Check if the finite volume library is present in (I'm assuming the library path didnt change from 1.5 here): OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libfiniteVolume.so If it is there, the system doesn't know where to find the OpenFOAM libraries. There might be another $WM variable you have to set, and appending LD_LIBRARY_PATH might also be worth a try. |
|
June 15, 2010, 03:14 |
|
#8 |
Senior Member
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 18 |
Dear friends,
Thank you for your support. The problem got solved. It turned out that some ThirdParty things (openmpi in particular) seemed to compile ok, but didn't link. I then compiled openmpi "by hand" (as in not by script) and it worked. Also, I had a typo in bashrc , if that isn't embarrassing, I don't know what is ... After some fiddling, it works!
__________________
Regards, Gijs |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM | Rizwan | Fluent UDF and Scheme Programming | 40 | March 18, 2018 07:05 |
PV3FoamReader compile error.... | PEM_GUY | OpenFOAM Installation | 6 | April 5, 2010 18:22 |
Error compile file udf | czfluent | Fluent UDF and Scheme Programming | 24 | September 26, 2009 14:24 |
Can someone PLEASE document the development version installation | bernd | OpenFOAM Installation | 76 | November 14, 2008 22:51 |
compile the UDF | Li Jingping | FLUENT | 2 | April 14, 2003 22:18 |