OpenFoam 1.7.0 on RHEL 4.6
Hi All,
I need to install OF 1.7.0 (or higher) on a cluster with following specs: OS: Red Hat Enterprise Linux ES release 4 (Nahant Update 6) gcc: 3.4.6 cmake: command not found (cmake --version command output) flex: 2.5.4 bison: 1.875c qmake: 1.07a using Qt 3.3.3 I know OF1.7.0 needs higher version of gcc. Is it possible to use ThirdParty's gcc version? I guess gcc version in ThirdParty will need some libraries which are outdated in RHEL4.x and it might be tough to use gcc of ThirdParty. Has anyone installed OF1.7.0 on RHEL4.x? I can try somethings on my own but as the cluster is being used by many other users so i want to skip experimenting. Regards Pankaj |
Greetings Pankaj,
I have no experience with RHEL myself, but as of yesterday, I've made available two build scripts for gcc 4.4.x and 4.5.x customized to work with OpenFOAM: Automated scripts for building gcc 4.4.x and 4.5.x for using with OpenFOAM 1.7 series On that blog post you should find some additional information on what extra stuff is needed. As for some more details about RHEL + OpenFOAM, you can also look in this thread: http://www.cfd-online.com/Forums/ope...linux-5-a.html You might also want to look at the CentFOAM project page (http://www.cfd-online.com/Forums/ope...-released.html) for some more tips on how to build in RHEL. Best regards, Bruno |
Hi Bruno,
Thanks a lot for your suggestions. I was able to use your script gccbuild-4.5.0 and installed gcc-4.5.0 successfully. which gcc gives: /home/pankaj/OpenFOAM/ThirdParty-1.7.0/platforms/linux64/gcc-4.5.0/bin/gcc gcc--version gives gcc (OpenFOAM) 4.5.0 So, am sure gcc4.5.0 was successfully installed. I was buliding OF-1.7.0 on OpenSuse 11.1. Later when compiling OF-1.7.0 i got following errors: First error occurence text is: Code:
make[1]: Entering directory `/home/pankaj/OpenFOAM/OpenFOAM-1.7.0/applications/solvers/basic' I terminated the compilation in between when saw many of such errors. I should mention that i was able to successfully build OF1.7.0 with system version of gcc (4.3.2) Thanks again for your time. Regards Pankaj |
Hi Pankaj,
Hold it! Lets go in steps:
Bruno |
Hi Bruno,
I downloaded OF1.7.1 and used your buildgcc-4.5.0 script for using gcc4.5.0 But i got same error as mentioned in my last post. That error happens with almost all of the solvers. I then tried using OpenFOAM's gcc4.4.4 (installed from your script) on OF1.7.1. But got same error. Both times, gcc4.5.0 and gcc4.4.4 got installed properly. I saw log files generated by your script and there wasnt any error. Also the commands "which gcc" and "gcc --version" point to gcc installed in ThirdParty Folder. I have noticed that if i use "system" gcc compiler, with OpenSuse 11.1, things work fine. But if i want to use OpenFOAM gcc compiler (4.5.0 or 4.4.4) i get errors. Additionally, libz.so.1, libnsl.so.1, libutil.so.1, libpthread.so.0 not found are existing in my root /lib and /lib64. So seems this installation of gcc4.5.0 and 4.4.4 in ThirdParty ddin't install these missing libraries properly in ThirdParty/platforms/gcc.... Any clues Bruno? Regards Pankaj |
Hi Pankaj,
OK, now I've read the output properly. The problem you are having is related to a simple issue: you didn't clean up the builds you have from building with OpenSUSE's gcc 4.3.2. The system's gcc 4.3.2 made OpenMPI be dependent of old system libraries that are no longer compatible with gcc 4.4.4 and 4.5.0. You will have to at least remove the build OpenMPI: Code:
rm -rf $WM_THIRD_PARTY_DIR/platforms/linux64Gcc/openmpi-1.4.1 Code:
cd $WM_THIRD_PARTY_DIR Best regards, Bruno |
Hi Bruno,
Thanks again for responding. I did that "wclean all" and "rm -rf" stuff but i still get same errors. Earlier I missed the first instance of error which happened during building of Scotch decomposition library. Error is as follows: Code:
======================================== Later i get many errors (all while building various solvers like icoFoam, laplacianFoam etc) which basically complain about libz.so.1, libnsl.so.1, libutil.so.1, libpthread.so.0 not found. Error log for such errors is as under: Code:
make[2]: Entering directory `/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/applications/solvers/combustion/dieselFoam' OS: OpenSuse 11.1 gcc: 4.4.4 (Using your script files) cmake: 2.8.2 qmake: 2.01a Using Qt 4.6.2 flex: 2.5.35 bison: 2.3 Just to make sure that when i am not using OpenFOAM's gcc compiler (4.4.4) i tried using "System" compiler (gcc 4.3.2) and everything works fine. So i think our forcing OpenFOAM to use new gcc compiler 4.4.4 foced these errors and while building ti wasnt able to found above said libraries in ThirdParty installation of gcc 4.4.4 (while when using System compiler, these libraries are found and no error is reported). Bruno, did you test your gcc-build-scripts with OpenSuse 11.1. Do we have to use LD_LIBRARY_PATH for those libraries? But i read somehwere using "LD" is not a good thing and instead some runtime path for these libraries should be given. How do we do that? Waiting for your reply Bruno :-) Thanks a lot and Regards Pankaj |
Hi Pankaj,
No, I haven't had the time to test the build-gcc scripts in older systems :( But I'll have a go at it this weekend with OpenSUSE 11.1 :) In the mean time, when your environment is setup to work with gcc 4.4.4, what does your LD_LIBRARY_PATH look like? Code:
echo $LD_LIBRARY_PATH Additionally, the errors seem to me, by what I've read from your outputs, to be more related to the applications/libraries built with make instead of wmake (wmake is only for OpenFOAM libraries and applications). But like I said, I'll have a go at it with OpenSUSE 11.1 and try to figure out what is going wrong. And yes, LD_LIBRARY_PATH can be considered a security risk in itself, but it's usually the quickest way to tell programs where the libraries they need are. Best regards, Bruno |
Hi Bruno,
After gcc is being set up, my LD_LIBRARY_PATH is: Code:
/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/openmpi-1.4.1 I think i should give a try to append system library path (/lib64) of libz.so.1, libnsl.so.1, libutil.so.1, libpthread.so.0 to current LD_LIBRARY_PATH. Thanks again Bruno :-) Regards Pankaj |
Hi Bruno,
After adding Quote:
Warning messages are regarding "Unused Variable" for following parameters: transonic, nOuterCorr, nCorr, nNonOrthCorr, momentumPredictor etc... I saw a fix at http://www.openfoam.com/mantisbt/pri....php?bug_id=15 but wanted to confirm if i should do same?? Please have a look Bruno. Another thing i wanted to ask is regarding parallel installation. I am using tcsh, and as described in OF's site i did following for parallel installation: setenv WM_SCHEDULER wmakeScheduler setenv WM_HOSTS "IP_ADDRESS:10" setenv WM_NCOMPPROCS 10 setenv WM_COLOURS "black blue green cyan red magenta yellow" I have manually entered value of WM_NCOMPPROCS to 10. Because if i do setenv WM_NCOMPPROCS=$($WM_SCHEDULER -count) i get error: "Illegal Variable name" I just wanted to ask, if what am doing is correct? (I tried running and it felt like installation is pretty fast :-) ) Thanks and Regards Pankaj |
Hi Pankaj,
I'm glad the lib issues are fixed. I've taken a few shots at OpenSUSE 11.1 in a virtual machine and never got past getting gcc to be built successfully. OpenSUSE 11.1 seems to contradict my notions of reality :rolleyes: LD_LIBRARY_PATH had no effect in gcc building, always resulting in not finding libc.so. Anyway, I've already got a battle plan drawn for upgrading my build-gcc44/5 scripts and include libc in the building process. This hopefully will help in situations were the OS is far too old for gcc 4.4.x or 4.5.x. Quote:
As for that bug report, it's not related to that; it's related to an issue where Fedora 13 demands that link libraries are explicitly defined. Quote:
Code:
setenv WM_NCOMPPROCS $($WM_SCHEDULER -count) Code:
setenv WM_NCOMPPROCS `($WM_SCHEDULER -count)` Quote:
Like I've said before, I've already got plans for upgrading the build scripts. If for some reason things later on don't go well with RHEL, hopefully I'll have the updated build scripts up and running by the end of today or tomorrow. Good luck! Best regards, Bruno |
Thanks a lot Bruno for all your help and patient replies :-)
Quote:
libc.so exists in my /usr/lib64, so i would add: Code:
setenv LD_LIBRARY_PATH /usr/lib64:$LD_LIBRARY_PATH I had same problems with libz.so.1, libnsl.so.1, libutil.so.1, libpthread.so.0 libraries not being found while OF buliding. After adding them to LD_LIBRARY_PATH, things worked fine for me. May be you too can try same :-) And ofcourse a new gcc-build script that by default installs libc.so etc into ThirdParty will be great. Am looking forward for your new script :-) Quote:
About parallel installation i did this but it gives same error of Illegal Variable name. Code:
setenv WM_NCOMPPROCS $($WM_SCHEDULER -count) Code:
setenv WM_NCOMPPROCS `($WM_SCHEDULER -count)` Thanks again Bruno :-) Regards Pankaj |
Hi Pankaj,
Quote:
Spolier alert: I didn't manage to get it working :( Which may look bad, but probably it's for the best... Nonetheless, a version 2 of the scripts has been released in the same page as before, with some more improvements. The old version was left there, just in case the new version has more bugs then the previous version :D Best regards, Bruno |
All times are GMT -4. The time now is 01:40. |