OpenFOAM-1.7.0 for CentOS/RHEL/SL 5.x 64bit released
Hi all
Just finished compiling/uploading 1.7.0 for CentOS/RHEL/SL 5.x 64bit based OS'es. As usual it can be found here Best Linnemann |
Thank you!
|
Hi Niels,
Any chance of making a 32 bit version? rgds Bjorn |
Hi Bjorn
I don't use 32bit and I do not know how many CFD guys really use 32bit. So I will have my focus on 64bit, but the manual instructions on the wiki page should apply to 32bit as well just strip the x86_64 from the yum packages. To compile 1.7.0 you need to do the following. as root Code:
yum install gcc gcc-c++ bison ncurses-devel tix glibc-devel flex flex-devel zlib-devel libXt-devel Code:
cd $HOME Code:
alias OF17=". $HOME/OpenFOAM/OpenFOAM-1.7.0/etc/bashrc" Then you need a couple of dependencies to compile gcc-4.4.4 Code:
mkdir $HOME/build Code:
wget ftp://ftp.gmplib.org/pub/gmp-5.0.1/gmp-5.0.1.tar.bz2 Code:
cd $HOME/build Code:
cd $HOME/build Code:
OF17 You will have to figure paraview out for yourself since I don't compile it in the ThirdParty folder. Hope this will get you somewhere. |
1 Attachment(s)
Hi, Niels
I got stuck after the command: ../configure --prefix=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/gcc-4.4.4 --with-gmp=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/gmp-5.0.1 --with-mpfr=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/mpfr-2.4.2 I got the error given in the attached screenshot. Any clue about what went wrong? rgds Bjorn |
Hi again,
Sorry, the above error came after the "make j2" command line rgds Bjorn |
Hi
It seems gcc cant find mpfr according to this http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35577 Did you remember to run OF17 before configuring else the path for gmp and mpfr cant be found You could try with the full path instead of --with-gmp=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/gmp-5.0.1 --with-mpfr=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/mpfr-2.4.2 use --with-gmp=$HOME/OpenFOAM/ThirdParty-1.7.0/platforms/linux/gmp-5.0.1 --with-mpfr=$HOME/OpenFOAM/ThirdParty-1.7.0/platforms/linux/mpfr-2.4.2 Or add gmp and mpfr to your LD_LIBRARY_PATH |
Hi,
I tried your suggestion but the same error occurred. rgds Bjorn |
Hi Bjorn,
Hope you are well :) I had the same problem when using gcc 4.1.2. I switched to openfoam-1.7.0 and started to compile gcc-4.4.4 with the system compiler and could not get it to work so before switching environment from 1.6 to 1.7, compile gcc-4.4.4 with the compiler from openfoam-1.6.x, which was gcc-4.3.3 for me. Then no problemo. N |
Hi Niklas & Niels,
I am not that good in linux commands, so I probably need a detailed cookbook recipe to get OF1.7 to work. Niels did a good job in doing so, but I got stuck. Niklas you also probably give good advise, but I am not able to use it (becuase of my lack of knowledge in linux). rgds Bjorn |
what does it say if you type
gcc -v |
1 Attachment(s)
Niklas,
the Attached screenshot show the result after gcc -v. This is however after I changed to 1.6.x Bjorn |
right,
but Im guessing that you didnt use that version when compiling gcc-4.4.4. However, if you stay in the 1.6.x environment you can compile gcc-4.4.4 with gcc-4.3.3 and that will probably work better using ../configure --prefix=$HOME/OpenFOAM/ThirdParty-1.7.0/platforms/$WM_ARCH$WM_COMPILER_ARCH/gcc-4.4.4 --with-gmp=$HOME/OpenFOAM/ThirdParty-1.7.0/platforms/$WM_ARCH$WM_COMPILER_ARCH/gmp-5.0.1 --with-mpfr=$HOME/OpenFOAM/ThirdParty-1.7.0/platforms/$WM_ARCH$WM_COMPILER_ARCH/mpfr-2.4.2 make make install ...assuming that the enviroment variables WM_ARCH and WM_COMPILER_ARCH are the same in 1.7.0 and 1.6.x and that your installation is under $HOME/OpenFOAM N |
Hi,
When I executed the command you propose I get the response: bash: ../configure: No such file or directory Any clue what might be wrong? Bjorn |
go to the gcc-4.4.4 directory and create a dir called...for instance build with 'mkdir build'
'cd build' and execute the command from there you should not run the configure script in the gcc-4.4.4 directory |
Niklas,
I feel stupid: in ThirdParty-1.6.x there is no gcc-4.4.4 only gcc-4.3.3. As I indicated in an earlier post I am not well adapted to linux commands. Bjorn |
The gcc-4.4.4 should reside in the ThirdParty-1.7.0 directory.
Just 'cd ~/OpenFOAM/ThirdParty-1.7.0' while still in the 1.6.3 environment. |
Niklas,
In OpenFOAM-1.7.0 there is no gcc folder, only: Allwmake bin doc README ReleaseNotes-1.7 src tutorials applications COPYING etc README.html ReleaseNotes-1.7.html test wmake Bjorn |
Niklas
I meant to say that in OpenFOAM ThirdParty-1.7.0 thre is no gcc flder, only: [user@OpenFOAM ThirdParty-1.7.0]$ ls Allclean makeParaView paraview-3.8.0 platforms wmakeFiles Allwmake metis-5.0pre2 ParMetis-3.1 scotch_5.1 AllwmakeLibccmio openmpi-1.4.1 ParMGridGen-1.0 tools Bjorn |
NIklas,
I found the gcc-4.4.4 under /home/user/OpenFOAM/ThirdParty-1.7.0/platforms/linux/gcc-4.4.4 But there were no files present. This is what I got when executing the command bash: ../configure: No such file or directory Bjorn |
OK, but then I dont understand from where you managed to run
the configure script when you got the error in the first place. N |
I just checked your error message and saw that its located in
/home/user/build/gcc-4.4.4/build which makes me wonder if your foam intallation is located under your home-catalog, because if it isnt the configure script needs to be adjusted accordingly. N |
Niklas,
Yes the gcc.4.4.4 is located as you saw also confirmed below. This became so after following the recipe from Niels. The OpenFOAM is located in: [user@OpenFOAM OpenFOAM]$ ls OpenFOAM-1.6 OpenFOAM-1.7.0.gtgz.1 ThirdParty-1.7.0 user-1.6 OpenFOAM-1.6.x OpenFOAM-1.7.x ThirdParty-1.7.0.gtgz OpenFOAM-1.7.0 ThirdParty-1.6 ThirdParty-1.7.0.gtgz.1 OpenFOAM-1.7.0.gtgz ThirdParty-1.6.x ThirdParty-1.7.x [user@OpenFOAM OpenFOAM]$ pwd /home/user/OpenFOAM Bjorn ___________________________________ checking for suffix of object files... configure: error: in `/home/user/build/gcc-4.4.4/build/i686-pc-linux-gnu/libgcc': configure: error: cannot compute suffix of object files: cannot compile See `config.log' for more details. make[2]: *** [configure-stage1-target-libgcc] Error 1 make[2]: Leaving directory `/home/user/build/gcc-4.4.4/build' make[1]: *** [stage1-bubble] Error 2 make[1]: Leaving directory `/home/user/build/gcc-4.4.4/build' make: *** [all] Error 2 [user@OpenFOAM build]$ pwd /home/user/build/gcc-4.4.4/build [user@OpenFOAM build]$ |
Hi
adding these lines to your $HOME/.bashrc file should make it possible to compile gcc-4.4.4 Code:
export LD_LIBRARY_PATH=$HOME/OpenFOAM/ThirdParty-1.7.0/platforms/linux/gmp-5.0.1/lib:$LD_LIBRARY_PATH Code:
ls -l $HOME/OpenFOAM/ThirdParty-1.7.0/platforms/linux/gmp-5.0.1/lib Code:
. $HOME/.bashrc |
Niels,
I tried your new scheme and it did not give any errors. I take that I should execute 'make install ' and follow your instructions from before. When I came to OpenFOAM OpenFOAM-1.7.0] and execute ./Allwmake I got these errors: + wmake libso OpenFOAM SOURCE=global/global.Cver ; sed -e 's/VERSION_STRING/1.7.0/' -e 's/BUILD_STRING/1.7.0-21131bcbd876/' $SOURCE > Make/linuxGccDPOpt/global.C; g++ -m32 -Dlinux -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/home/user/OpenFOAM/ThirdParty-1.7.0/zlib-1.2.3 -IlnInclude -I. -I/home/user/OpenFOAM/OpenFOAM-1.7.0/src/OpenFOAM/lnInclude -I/home/user/OpenFOAM/OpenFOAM-1.7.0/src/OSspecific/POSIX/lnInclude -fPIC -c Make/linuxGccDPOpt/global.C -o Make/linuxGccDPOpt/global.o SOURCE=global/argList/argList.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/home/user/OpenFOAM/ThirdParty-1.7.0/zlib-1.2.3 -IlnInclude -I. -I/home/user/OpenFOAM/OpenFOAM-1.7.0/src/OpenFOAM/lnInclude -I/home/user/OpenFOAM/OpenFOAM-1.7.0/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/argList.o lnInclude/dictionaryTemplates.C: In member function ‘T Foam::dictionary::lookupOrDefault(const Foam::word&, const T&, bool, bool) const [with T = Foam::Switch]’: global/argList/argList.C:396: instantiated from here lnInclude/dictionaryTemplates.C:44: error: call of overloaded ‘Switch(Foam::pTraits<Foam::Switch>)’ is ambiguous lnInclude/Switch.H:140: note: candidates are: Foam::Switch::Switch(int) lnInclude/Switch.H:134: note: Foam::Switch::Switch(bool) lnInclude/Switch.H:62: note: Foam::Switch::Switch(const Foam::Switch&) make: *** [Make/linuxGccDPOpt/argList.o] Error 1 Any guide for what went wrong? rgds Bjorn |
Hi
Did you remember to run Allwmake in the Thirdparty folder first? What is the output of Code:
OF17 If this is the case I have no idea what should be going on. |
Niels,
Yes, I did the procedure as you mention. When I issue the command which gcc I get /usr/bin/gcc This is not what you would expect? Any clue what is wrong? Bjorn |
Hi is there anything in the folder
$HOME/OpenFOAM/ThirdParty-1.7.0/platforms/linux/gcc-4.4.4 if not then the make install step did not install gcc-4.4.4 the right place. as a side note open the openFOAM/etc/settings and check that the compiler version is as below Code:
# Select compiler installation After changing run Code:
OF17 |
Niels,
That seemed to do the trick! I changed the settings.sh file to (in red): # compilerInstall = OpenFOAM | system : ${compilerInstall:=OpenFOAM} case "${compilerInstall:-OpenFOAM}" in OpenFOAM) case "$WM_COMPILER" in Gcc) # gcc_version=gcc-4.4.3 gcc_version=gcc-4.4.4 Now it compiles and probably will generate OF1.7.0 Bjorn |
Niels,
It compiled and passed the cavity check! Thank you very much for your help! My next task will be to tray to install paraFoam. Bjorn PS! There were some warnings during the compilation (unused variables). Is this something that you also found? Will it be a problem? |
Hi,
Following the successfull installation of OF1.7.0 on my 32 bit CentOS linux maschine I have now moved over to install paraFoam. The following error comes at the very end after the command ./makeParaView: ________________________________________ Linking CXX executable ../../../../bin/GraphicsCxxTests ../../../../bin/libvtkRendering.so.pv3.8: undefined reference to `QPainter::drawImage(QPointF const&, QImage const&)' ../../../../bin/libvtkRendering.so.pv3.8: undefined reference to `QTextDocument::setDocumentMargin(double)' collect2: ld returned 1 exit status make[2]: *** [bin/GraphicsCxxTests] Error 1 make[1]: *** [VTK/Graphics/Testing/Cxx/CMakeFiles/GraphicsCxxTests.dir/all] Error 2 make: *** [all] Error 2 --- Installation complete for paraview-3.8.0 Set environment variables: export ParaView_DIR=/home/user/OpenFOAM/ThirdParty-1.7.0/platforms/linuxGcc/paraview-3.8.0 export PATH=$ParaView_DIR/bin:$PATH export PV_PLUGIN_PATH=$FOAM_LIBBIN/paraview-3.8 --- Done _____________________________ Anybody out there that migth help me? rgds Bjorn |
Didn't work at all.
Hi everyone
I tried to compile OF17, but got problems, then I saw this thread. I want to install it on a RHEL 5.0 64bit. I don't have access to root, so I couldn't run the Yum command in post #4. Then I went through gcc part, and got the same error as post #5 and #6. Right now I have gcc 4.3.3 under OpenFoam 1.6 third parties, and my OF16 works perfectly. But when I want to make gcc 4.4.4 I get error. under OF17 environment, My Gcc is /usr/bin/gcc and under 1.6 its ~/OpenFOAM/ThirdParty-1.6/gcc-4.3.3/platforms/linux64/bin/gcc |
question
Guys, I have a question:
I have a cluster with 64bit RHEL 5.0, and previously I have installed OpenFoam 1.6 on it. Can I replace all the source code for 1.7 with all the source code for 1.6 and wmake it? does this work? |
Hi
@ SAHM you need to edit the OpenFOAM settings.sh file to reflect where gcc is installed lige Bjorn did. With the compilation of GCC try and export the library path for mpfr and gmp in your .bashrc file like so. Code:
export LD_LIBRARY_PATH=/pathToGmp/lib:$LD_LIBRARY_PATH Code:
. $HOME/.bashrc Quote:
I do not think that is possible. you can use the ThirdParty stuff from my binary release and then get the sources for OF and then do wmake. If you do it this way remember to change the settings.sh file like above. Otherwise download both my packages and you are ready to run. 1.6 and 1.7 will live happily alongside each other on the same system and a good way to keep them seperate is to use aliases for them in your $HOME/.bashrc file like so. Code:
alias OF16=". $HOME/OpenFOAM/OpenFOAM-1.6.x/etc/bashrc" |
Hello Linneman,
I am trying to install CentFOAM and I am getting the following errors when ./centFOAMInstall yum all " No package ncurses-devel available. No package libXt-devel available. Nothing to do" Thanks D |
Quote:
sometimes I wish I could just disappear into one of those cracks on the walls. |
Dear All,
is it possible to install the here cited version of CentFOAM on RHEL 4.1.2-46 (I do not know what SL 5.x stands for) on a cluster to which I do not have the root rights? I know the installation requires the "yum" command, which needs root rights that I do not have... Thanks! Andreas |
Hi
No that will not be possible. It is possible to get OF working on RHEL 4.x releases it will although take some time and will be somewhat more difficult if you cant install packages as root. SL-5.x is Scientific Linux 5.x where x can be 0,1,2,3,4 or 5. Best |
Hi Linnemann,
thanks for the quick reply. More difficult but thankfully not impossible. According to other threads (http://www.cfd-online.com/Forums/ope...linux-5-a.html) it is possible to install gcc4.3.3 from OF1.6ThridParty and then use OF1.7.1 ... do you agree with that? Thanks, Andreas |
Hi
If only you were that lucky, I've installed OF-1.5 on a RHEL 4 release and it was not the most trivial task :-) and 1.6 and 1.7 are most likely not easier. There are some libraries in rhel 4 that are to old for gcc-4.3.x so you need to compile new ones of those and a whole lot of other stuff I cant remember. But again Google is your friend http://cheminsilico.blogspot.com/200...-on-rhel4.html From here on you are on your own I'm afraid, unless some other member has a cluster/workstation with rhel/centos 4 on it. |
All times are GMT -4. The time now is 06:52. |