|
[Sponsors] |
Please help: Installing OpenFOAM-1.5-dev on Ubuntu 9.04 |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 27, 2009, 20:47 |
Please help: Installing OpenFOAM-1.5-dev on Ubuntu 9.04
|
#1 |
New Member
Join Date: Oct 2009
Posts: 15
Rep Power: 17 |
Hello everyone:
Would you be able to help me install OpenFOAM-1.5-dev on my machine? This machine runs Ubuntu 9.04 (64 bit) and is a quad-core machine. Background: I am very new to using OpenFOAM, but I have compiled and used OpenFOAM 1.6.x using the installation script by MadsR (Thank you MadS!!). I want to install the 1.5 dev version in order to use GGI and also the alternateChemistry package. I am hoping that alternateChemistry module is more robust than the OpenFOAM-1.6.x version, also GGI is a HUGE plus) Steps taken: 1. I downloaded the ThirdParty package from www.opencfd.co.uk and untarred it in ~/OpenFOAM 2. In the directory ~/OpenFOAM/ThirdParty/openmpi-1.2.6, I ran: ./configure make all sudo make install (Note: As first attempt, I had tried to run ./Allwmake in ~/OpenFOAM/OpenFOAM-1.5-dev, but got repeated mpi related errors, one of them stating the system was not able to find mpi.h. After running make install in openmpi-1.2.6, I do not get this error) 3. settings.sh uses the System compiler (gcc (Ubuntu 4.3.3-5ubuntu4) 4.3.3) and "which gcc" reports /usr/bin/gcc 4. sourced ~/OpenFOAM/OpenFOAM-1.5-dev/etc/bashrc 5 sourced ~/.bashrc 6. Ran the Allwmake script in OpenFOAM-1.5-dev directory (via ./Allwmake) The compilation runs and then while creating executables in the .../OpenFOAM-1.5-dev/applications/bin directory, it reports errors for all. I have pasted the tail of the compiler messages here: Making dependency list for source file equilibriumCO.C SOURCE=equilibriumCO.C ; g++ -m64 -Dlinux64 -DDP -DFOAM_DEV_REVISION_NUMBER=exported -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I/home/amish/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/specie/lnInclude -IlnInclude -I. -I/home/amish/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude -I/home/amish/OpenFOAM/OpenFOAM-1.5-dev/src/OSspecific/Unix/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/equilibriumCO.o g++ -m64 -Dlinux64 -DDP -DFOAM_DEV_REVISION_NUMBER=exported -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I/home/amish/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/specie/lnInclude -IlnInclude -I. -I/home/amish/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude -I/home/amish/OpenFOAM/OpenFOAM-1.5-dev/src/OSspecific/Unix/lnInclude -fPIC Make/linux64GccDPOpt/equilibriumCO.o -L/home/amish/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt \ -lspecie -lOpenFOAM -liberty -ldl -lm -o /home/amish/OpenFOAM/OpenFOAM-1.5-dev/applications/bin/linux64GccDPOpt/equilibriumCO /home/amish/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/openmpi-1.2.6/libPstream.so: undefined reference to `ompi_mpi_op_sum' /home/amish/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/openmpi-1.2.6/libPstream.so: undefined reference to `ompi_mpi_byte' /home/amish/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/openmpi-1.2.6/libPstream.so: undefined reference to `ompi_mpi_packed' /home/amish/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/openmpi-1.2.6/libPstream.so: undefined reference to `ompi_mpi_comm_world' /home/amish/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/openmpi-1.2.6/libPstream.so: undefined reference to `ompi_mpi_double' collect2: ld returned 1 exit status make[2]: *** [/home/amish/OpenFOAM/OpenFOAM-1.5-dev/applications/bin/linux64GccDPOpt/equilibriumCO] Error 1 make[1]: *** [equilibriumCO] Error 2 make[1]: Target `application' not remade because of errors. make: *** [thermophysical] Error 2 g++ -m64 -Dlinux64 -DDP -DFOAM_DEV_REVISION_NUMBER=exported -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I/home/amish/OpenFOAM/OpenFOAM-1.5-dev/src/decompositionAgglomeration/decompositionMethods/lnInclude -I/home/amish/OpenFOAM/OpenFOAM-1.5-dev/src/finiteVolume/lnInclude -I/home/amish/OpenFOAM/OpenFOAM-1.5-dev/src/meshTools/lnInclude -I/home/amish/OpenFOAM/OpenFOAM-1.5-dev/src/dynamicMesh/lnInclude -IlnInclude -I. -I/home/amish/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude -I/home/amish/OpenFOAM/OpenFOAM-1.5-dev/src/OSspecific/Unix/lnInclude -fPIC Make/linux64GccDPOpt/redistributeMeshPar.o -L/home/amish/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt \ -lfiniteVolume -ldecompositionMethods -lmeshTools -ldynamicMesh -L/home/amish/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/openmpi-1.2.6 -lparMetisDecompositionMethod -lOpenFOAM -liberty -ldl -lm -o /home/amish/OpenFOAM/OpenFOAM-1.5-dev/applications/bin/linux64GccDPOpt/redistributeMeshPar /usr/bin/ld: cannot find -ldecompositionMethods collect2: ld returned 1 exit status make[2]: *** [/home/amish/OpenFOAM/OpenFOAM-1.5-dev/applications/bin/linux64GccDPOpt/redistributeMeshPar] Error 1 make[1]: *** [redistributeMeshPar] Error 2 make[1]: Target `application' not remade because of errors. make: *** [parallelProcessing] Error 2 make: Target `application' not remade because of errors. + '[' '' = doc ']' Summary: From the error messages, it appears that the libPstream.o file is not built correctly, or perhaps I am missing some important step in this process. I have looked at previous posts, notably by Hy Yu on installing the dev version on Ubuntu 9.04, where he was asked to compile Metis, but the error messages looked different at first glance. Sorry for the long post! Any help is most appreciated! -AAT |
|
November 27, 2009, 21:34 |
|
#2 |
Super Moderator
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,097
Rep Power: 34 |
Hi ATT,
I'm not an expert at OpenFOAM but I have compiled a few different versions and experienced many errors but it's usually something small (or many small things). When you run the Allwmake script in OpenFOAM-1.5-dev directory, you need to find the first error (the first error will cause other errors and it propagates). I usually do it bit by bit: Starting in the 'OpenFOAM-1.5-dev' directory, do this: (cd wmake/src && make) And then make sure it reports no errors. Then: (cd $WM_THIRD_PARTY_DIR && ./Allwmake) And check again to make sure there are no errors. Then: (cd src && ./Allwmake) ...check again for errors (it seems decompositionMethods hadn't compiled before for you) Then assuming no errors up to now the apps can be compiled with: (cd applications && ./Allwmake) The first error you get, you can post here. Hope this helps, Philip C |
|
November 27, 2009, 23:29 |
|
#3 |
New Member
Join Date: Oct 2009
Posts: 15
Rep Power: 17 |
Hello Philip:
Many thanks! I started with fresh copies of OpenFOAM-1.5-dev and ThirdParty (untarred the OpenFOAM-1.5-dev.tar.gz and ThirdParty-1.6.General.gtgz) and followed your suggestions after sourcing etc/bashrc and $HOME/.bashrc 1. (cd wmake/src && make) make: Nothing to be done for `all'. 2. (cd $WM_THIRD_PARTY_DIR && ./Allwmake) >log.allmake1 2>&1 Looking over the log, I saw this error: In file included from hoard-371/src/libhoard.cpp:164: lnInclude/wrapper.cpp: In function ‘void* memalign(size_t, size_t)’: lnInclude/wrapper.cpp:137: error: declaration of ‘void* memalign(size_t, size_t)’ throws different exceptions lnInclude/wrapper.cpp:116: error: from previous declaration ‘void* memalign(size_t, size_t) throw ()’ make: *** [Make/linux64GccDPOpt/libhoard.o] Error 1 and a bit further along, I see: ++ case "$WM_MPLIB" in ++ '[' -r /home/amish/OpenFOAM/ThirdParty/openmpi-1.2.6/platforms/linux64GccDPOpt/lib/libmpi.so ']' ++ '[' -r /home/amish/OpenFOAM/ThirdParty/openmpi-1.2.6/platforms/linux64GccDPOpt/lib/libmpi.a ']' ++ cd /home/amish/OpenFOAM/ThirdParty/openmpi-1.2.6 ./Allwmake: line 58: cd: /home/amish/OpenFOAM/ThirdParty/openmpi-1.2.6: No such file or directory I am guessing this means my ThirdParty libraries *may* be broken, so I have not run steps 3 and 4. I have attached the entire log file, in case it helps. Re. error#1: I have no clue what this means!! Re. error 2: I cannot understand: why is Allwmake in $WM_THIRD_PARTY_DIR looking for openmpi-1.2.6? This directory seems to have a newer openmpi version, v1.3.3 now. Kindly, -AAT |
|
November 27, 2009, 23:40 |
|
#4 |
New Member
Join Date: Oct 2009
Posts: 15
Rep Power: 17 |
Sorry to be answering my own post.
Per this cfd-online exchange: http://www.cfd-online.com/Forums/ope...llochoard.html it seems that the error in compiling the hoard library in $WM_THIRD_PARTY_DIR/malloc has been reported before but it is not a show-stopping error. Philip, I will try steps 3 and 4 next. Kindly, -AAT |
|
November 28, 2009, 13:39 |
|
#5 |
Super Moderator
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,097
Rep Power: 34 |
AAT,
hmmnn... not sure about the first error. But for the second, check in the 'OpenFOAM-1.5-dev/etc/settings.sh' file on line 161, that: mpi_version=openmpi-1.3.3 I think yours is set to 1.2.6, so change it and re-source the bash and try compile THIRD_PARTY again. Philip EDIT: BTW where did you download your OpenFOAM-1.5-dev from? I use http://powerlab.fsb.hr/ped/kturbo/openfoam/release/ I use OpenSUSE so possibly the first error is Ubuntu related. |
|
November 30, 2009, 08:37 |
|
#6 |
New Member
Julius
Join Date: Mar 2009
Posts: 27
Rep Power: 17 |
Hello together,
I had the same problem with the openmpi version on a 64bit Ubuntu 9.10 and 8.04 but my error looked more like this: ... libOpenFOAM.so: undefined reference to `Foam::Pstream ... I finally downloaded the ThirdParty files from OpenFOAM-1.6 and copied the openmpi-1.3.3 folder into my ThirdParty folder. It was not necessary to compile ThirdParty again. Besides the newer openmpi version I'm using the ThirdParty binaries from the "normal" OpenFOAM-1.5 release. Until now I did not experienced any problems. Good Luck |
|
December 2, 2009, 01:03 |
|
#7 |
New Member
Join Date: Oct 2009
Posts: 15
Rep Power: 17 |
Thank you Julius and Philip!
SUCCESS! I was able to install OpenFOAM-1.5-dev finally, thanks to the suggestions you had provided. Philip, I started with the dev and thirdparty tar archives from the powerlab website as you pointed to, and Julius, I just copied over the openmpi-1.3.3 version. I had to play with the env variables to locate paraview after I had compiled it, and now it works fine. I ran some serial and parallel tutorials to confirm. After doing this, I was also able to compile the alternateChemistry models; this took a lot more work to install cantera (along with sundials) correctly. I still have not been able to compile groovyBC, that's next... Thank you once again for your help! -AAT |
|
December 2, 2009, 06:37 |
|
#8 |
Super Moderator
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,097
Rep Power: 34 |
Great!
Philip |
|
December 2, 2009, 12:02 |
|
#9 |
New Member
Julius
Join Date: Mar 2009
Posts: 27
Rep Power: 17 |
Hello aat,
nice to hear that the installation finally worked. About the paraview topic: There is just another small "bug" in the bashrc of paraview ($WM_PROJECT_DIR/etc/apps/paraview3/bashrc) which leads to a wrong folder. In my version I had to delete a "-" in the reference to the paraFoam folder. In line 45 you find: export ParaView_INST_DIR=$WM_THIRD_PARTY_DIR/ParaView-$ParaView_VERSION deleting the "-" between Paraview and $ParaView_VERSION leads to export ParaView_INST_DIR=$WM_THIRD_PARTY_DIR/ParaView$ParaView_VERSION what finally works. I hope this helped a bit. |
|
June 4, 2010, 11:35 |
|
#10 |
Senior Member
Join Date: Apr 2010
Posts: 151
Rep Power: 16 |
Hello,
I am also trying to install OpenFOAM-1.5-dev and experiencing problems that are partly the same as yours. I changed line 161 in settings.sh as suggested. I copied the openmpi-1.3.3 folder form version 1.6 and recompiled ThirdParty succesfully. Then I followed the steps in post nr. 2. The first two went well, but at the third one, namely (cd src && ./Allwmake), errors occurred. For clarity, I am in OpenFOAM/OpenFOAM-1.5-dev/src and I command ./Allwmake The last lines of the output in the terminal are: /home/jmatthei/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.3.1/../../../../include/c++/4.3.1/x86_64-unknown-linux-gnu/bits/c++locale.h:77: error: ‘__gnu_cxx::__uselocale’ cannot be used as a function /home/jmatthei/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.3.1/../../../../include/c++/4.3.1/x86_64-unknown-linux-gnu/bits/c++locale.h:102: error: ‘__gnu_cxx::__uselocale’ cannot be used as a function make: *** [Make/linux64GccDPOpt/autoLayerDriverShrink.o] Error 1 make: *** Waiting for unfinished jobs.... make: *** [Make/linux64GccDPOpt/autoLayerDriver.o] Error 1 + wmake libso errorEstimation /usr/bin/ld: cannot find -lfiniteVolume collect2: ld returned 1 exit status make: *** [/home/jmatthei/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/liberrorEstimation.so] Error 1 The part about "uselocale" occurs very often in the output. I think the error is in here, but I do not understand it. Do I use the wrong version of gcc? |
|
June 4, 2010, 12:14 |
|
#11 |
Super Moderator
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,097
Rep Power: 34 |
Hi,
You need to find the first error that occurs when you ./Allwmake in the src directory, I notice that the errors you posted contain "cannot find -lfiniteVolume" which suggests that the finiteVolume library was not compiled. So I would suggest compiling the src bit-by-bit to see where the error is, so if you open the Allwmake script in the src directory (using a text editor of your choice eg emacs), and then copy the first compilation line of the script (it should be "(cd OpenFOAM && wmakeLnInclude . )" ) then paste this line into the terminal and hit return. If there are no errors then repeat this process with the next line of the script, and so on... until you find where the first error is, then you can post it here and see if I/someone can help. Hopefully, my explaination wasn't too confusing but basically whilst in the src directory, execute this: ( cd OpenFOAM && wmakeLnInclude . ) then check for errors, then if none execute this: ( cd Pstream && ./Allwmake ) then check for errors, then if none execute this: wmake libso OSspecific/$WM_OS and continue this through all the lines of the Allwmake script until you find the error. Let me know how you get on, Philip C |
|
June 8, 2010, 03:56 |
|
#12 |
Senior Member
Join Date: Apr 2010
Posts: 151
Rep Power: 16 |
Thank you Phil,
Now I understand how to locate errors better. I ran the lines of src/Allwmake one by one. The first one caused no problems. When executing the second one ( cd Pstream && ./Allwmake ), I got a long list of output. Then I entered the src/Pstream folder and executed the first line of the src/Pstream/Allwmake file (wmake libso dummy). The output can be found in the attached log.txt file. I do not really understand what it means, but I have the impression that my gcc compiler is the wrong one, though I set it to compilerInstall=openFOAM in the ect/settings.sh and etc/settings.csh files. |
|
June 8, 2010, 06:42 |
|
#13 |
Super Moderator
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,097
Rep Power: 34 |
OK,
I am not sure what the error means or what is causing it, so if anybody else would like to jump in with some suggestions please feel free. In the meantime flowris, you could check there was definitely no previous errors earlier on in the compilation. Compile line-by-line from the Allwmake script in the 'OpenFOAM-1.5-dev' directory. This will direct you to the ThirdParty directory too, so in the same way as before you should check for any errors as you compile each line. The reason for your error may be an earlier error, but as I said I am unsure. Another thing you could try is to set your compiler to the system compiler instead of the OpenFOAM compiler, it might help. This involves commenting/uncommenting the relevant lines in the 'OpenFOAM-1.5-dev/etc/settings.sh' file, should be about line 113. Philip C |
|
June 9, 2010, 03:37 |
|
#14 |
Senior Member
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 18 |
Hi Flowris,
It could be that there are some headers missing. What distribution are you using? In Ubuntu, do you have build-essential (and all the dev stuff), or in OpenSUSE, do you have the C/C++ pattern (also the whole dev stuff) installed? Also, you may have to compile gcc, that can help. But of course, depending on whether this is the first error, as Phillip mentioned above ...
__________________
Regards, Gijs |
|
June 9, 2010, 09:33 |
|
#15 |
Senior Member
Join Date: Apr 2010
Posts: 151
Rep Power: 16 |
Hello,
Thank for your replies. I am using Ubuntu-10.04 and have build essentail installed. I tried to compile the 1.5-dev that I downloaded from http://powerlab.fsb.hr/ped/kturbo/openfoam/release/. Now I downloaded a more recent version from http://openfoam-extend.svn.sourcefor...nFOAM-1.5-dev/ I did the same as before, namely cd to src/Pstream and execute wmake libso dummy The output was now very short: + wmake libso dummy make: *** No rule to make target `/home/jmatthei/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude/error.H', needed by `OPwrite.dep'. Stop. |
|
June 10, 2010, 05:26 |
|
#16 |
Senior Member
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 18 |
Hi Flowris,
Did you clean before running Allwmake again? I.e. Code:
wcleanLnIncludeAll
__________________
Regards, Gijs |
|
February 3, 2011, 14:04 |
|
#17 |
New Member
Join Date: Apr 2010
Posts: 18
Rep Power: 16 |
Hello,
I am trying to install OpenFOAM-1.5-dev and I get this error message: make: Target `application' not remade because of errors. This error seems to be associated with this message: /usr/bin/ld: cannot find -liberty I am using Scientific Linux Version 5.4. Can anyone help resolving this error? Thank you for your time. Nam
__________________
Nam |
|
February 3, 2011, 17:56 |
|
#18 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings Nam,
This is one of those really old questions and common issues... "libiberty.so" is a library needed for building OpenFOAM. The package you're looking for that has this library is named "binutils-devel", so use the package manager that comes with your Linux distribution to install it Or you can try running as root: Code:
yum install binutils-devel Bruno
__________________
|
|
February 4, 2011, 13:11 |
|
#19 |
New Member
Join Date: Apr 2010
Posts: 18
Rep Power: 16 |
Thank you, Bruno. I am just about to update my post. Indeed, the mising binutils-dev is the issues.
__________________
Nam |
|
June 6, 2011, 09:55 |
|
#20 |
New Member
Zeljko Smiljcic
Join Date: Jun 2011
Posts: 1
Rep Power: 0 |
Hey guys,
I had installed OF 1.7 on ubuntu 11.04. It worked fine. Finally I realized that openfoam 1.5-dev is the version I need. I than removed the previous version and tried to install openfoam 1.5-dev following the suggestions in this thread. This means I already replaced the openmpi 1.2.6 by openmpi 1.3.3. As soon as I execute the second step phil suggested: (cd $WM_THIRD_PARTY_DIR && ./Allwmake) I get the following error message: lnInclude/wrapper.cpp:137:27: error: declaration of ‘void* memalign(size_t, size_t)’ throws different exceptions lnInclude/wrapper.cpp:116:27: error: from previous declaration ‘void* memalign(size_t, size_t) throw ()’ make: *** [Make/linuxGccDPOpt/libhoard.o] Fehler 1 Thank you for your help in advance. greetz jko |
|
Tags |
installation, openfoam 1.5-dev |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to Install OpenFOAM on 64 Ubuntu 9.04 | hansel | OpenFOAM Installation | 62 | March 19, 2010 15:43 |
OpenFoam 1.6 Permissions in Ubuntu 9.04 | AlanR | OpenFOAM Installation | 14 | December 28, 2009 20:45 |
Trouble with installing OpenFOAM on Ubuntu | Milos | OpenFOAM Installation | 16 | November 16, 2009 03:44 |
Problem installing OpenFOAM 1.5 installation on RHEL 4. | vwsj84 | OpenFOAM Installation | 4 | April 23, 2009 05:48 |
Adventure of fisrst openfoam installation on Ubuntu 710 | jussi | OpenFOAM Installation | 0 | April 24, 2008 15:25 |