How to install two versions of OpenFoam
I am trying to install a older version of OpenFOAM 1.5 to my cluster where OpenFOAM 1.7 was already installed. But I found that compiling OF 1.5 could ruin the existing OF 1.7. Any suggestion for installing OF1.5 correctly in this case?
|
you can compile both versions and differ them by "alias" in bashrc:
example: alias of16x='. /usr/lib/OpenFOAM-1.6-ext/etc/bashrc' alias of211='. /opt/openfoam211/etc/bashrc' alias of210='. /opt/openfoam210/etc/bashrc' alias of201='. /opt/openfoam201/etc/bashrc' |
Greetings to all!
For more information about multiple versions: Advanced tips for working with the OpenFOAM shell environment As for OpenFOAM 1.5: Blast from the past: installing OpenFOAM 1.5 in modern Linux boxes Best regards, Bruno |
1 Attachment(s)
Quote:
/home/maa/OpenFOAM/ThirdParty-1.5/platforms/linux64/gcc-4.3.3/x86_64-unknown-linux-gnu/bin/ranlib libgcc.a /home/maa/OpenFOAM/ThirdParty-1.5/platforms/linux64/gcc-4.3.3/x86_64-unknown-linux-gnu/bin/ld: cannot find -lc collect2: ld returned 1 exit status make[3]: *** [libgcc_s.so] Error 1 make[3]: Leaving directory `/nfs/rachel03/home01/maa/OpenFOAM/ThirdParty-1.5/platforms/build-linux64Gcc43/gcc-4.3.3/x86_64-unknown-linux-gnu/libgcc' make[2]: *** [all-stage1-target-libgcc] Error 2 make[2]: Leaving directory `/nfs/rachel03/home01/maa/OpenFOAM/ThirdParty-1.5/platforms/build-linux64Gcc43/gcc-4.3.3' make[1]: *** [stage1-bubble] Error 2 make[1]: Leaving directory `/nfs/rachel03/home01/maa/OpenFOAM/ThirdParty-1.5/platforms/build-linux64Gcc43/gcc-4.3.3' make: *** [all] Error 2 |
Hi Argen,
I'm already too sleepy to remember where I've seen this error before and how it was fixed back then... But still, what's the Linux distribution and version you are using on the cluster? I've taken a look at my blog and this might be of help: Quote:
Bruno |
Quote:
|
Hi Argen,
OK, I'm guessing then that you are using CentOS or RHEL 6.x. The error you're getting seems to be the one explained here: http://www.cyberciti.biz/faq/centos-...-findlc-error/ The fix seems to be: Quote:
Bruno |
Quote:
It didn't work. Even yum couldn't be found as, "-bash: yum: command not found". Sorry to give your wrong version information in the previous reply. It actually is DISTRIB_ID=Ubuntu DISTRIB_RELEASE=11.04 DISTRIB_CODENAME=natty DISTRIB_DESCRIPTION="Ubuntu 11.04" In this case, how can I sort it out? Thanks, Argen |
Hi Argen,
Ah HA! OK, simple enough: Code:
sudo apt-get install libc6-dev Bruno |
Quote:
~# sudo apt-get install libc6-dev Reading package lists... Done Building dependency tree Reading state information... Done libc6-dev is already the newest version. libc6-dev set to manually installed. 0 upgraded, 0 newly installed, 0 to remove and 30 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Do you want to continue [Y/n]? |
:eek: Now I remember, I saw this before while I was trying to build Gcc 4.3.3 on Ubuntu 11.10. Things changed so much that a new few hacks are necessary. One such hack is this for 64bit platforms:
Code:
export LIBRARY_PATH=/usr/lib/x86_64-linux-gnu The reason why this was added is because the library moved from the usual "/usr/lib" folder. To see where the required "libc.a" is located, run: Code:
dpkg-query -S libc.a |
2 Attachment(s)
Quote:
|
Hi Argen,
I'll have to look into this myself. This weekend I should be able to see what I can do on my Ubuntu 11.10. Best regards, Bruno |
Quote:
Have you figured it out? Thanks, Argen |
Hi Argen,
Sorry, I haven't had the time to look into this yet. I'll see if later today I can test this myself. Best regards, Bruno |
Hi Argen,
OK, I've managed to find the issue for the "ThirdParty-1.5" folder, but I haven't checked yet how the main "OpenFOAM-1.5" folder is going to behave. Anyway, the fix is this: Code:
foam Code:
cd $WM_THIRD_PARTY_DIR I'll test the main OpenFOAM-1.5 next and update this post (or post a new one) when it finishes. edit: OK, tested it successfully! I've added another version of the shell script that helps with the whole process, back in my blog post Blast from the past: installing OpenFOAM 1.5 in modern Linux boxes If you don't want to use the script, then I advise you to update the environment variables once before each Allwmake you execute. Example for the main build: Code:
of15 Best regards, Bruno |
Thanks a lot, Bruno. When I cleaned ParMGridGen-1.0, I got the following error. Anything I missed?
:~/OpenFOAM/ThirdParty-1.5$ cd ParMGridGen-1.0 && make realclean (cd MGridGen ; make realclean ) make[1]: Entering directory `~/OpenFOAM/ThirdParty-1.5/ParMGridGen-1.0/MGridGen' (cd IMlib ; gmake realclean ) /bin/sh: gmake: not found make[1]: *** [realclean] Error 127 make[1]: Leaving directory `~/OpenFOAM/ThirdParty-1.5/ParMGridGen-1.0/MGridGen' make: *** [realclean] Error 2 Quote:
|
Hi Argen,
I see that gmake came back to haunt us :D Here's what I wrote about it and respective fix several months ago: Quote:
Bruno |
Quote:
======================================== Start ThirdParty Allwmake ======================================== ======================================== Compile specific mpi libraries have OPENMPI shared library ======================================== Build Scotch decomposition library have scotch shared libraries ======================================== Build PTScotch decomposition library (requires MPI) have ptscotch shared libraries ======================================== Build Metis decomposition + cd metis-5.0pre2 + cpMakeFiles metis + set +x + wmake libso GKlib g++: no input files make: *** [libNULL.so] Error 1 + wmake libso libmetis g++: no input files make: *** [libNULL.so] Error 1 ======================================== Build ParMetis decomposition. Requires MPI. + cd ParMetis-3.1 + cpMakeFiles ParMetis + set +x + wmake libso METISLib g++: no input files make: *** [libNULL.so] Error 1 + wmake libso ParMETISLib g++: no input files make: *** [libNULL.so] Error 1 ======================================== Build ParMGridGen + cd ParMGridGen-1.0 + cpMakeFiles ParMGridGen + set +x + wmake libso MGridGen/IMlib g++: no input files make: *** [libNULL.so] Error 1 + wmake libso MGridGen/Lib g++: no input files make: *** [libNULL.so] Error 1 ======================================== Done ThirdParty Allwmake ======================================== |
Hi Argen,
Nothing to worry about. As I described in the script: Quote:
Best regards, Bruno |
1 Attachment(s)
Quote:
|
This is very strange... OK, try these commands:
Code:
cd $WM_THIRD_PARTY_DIR |
1 Attachment(s)
Quote:
|
Quote:
Code:
sudo apt-get install build-essential flex bison cmake zlib1g-dev qt4-dev-tools libqt4-dev gnuplot libreadline-dev libncurses-dev libxt-dev |
Quote:
|
I've been reviewing the previous posts on this threads... are you certain this is active in your shell:
Code:
export LIBRARY_PATH=/usr/lib/x86_64-linux-gnu |
All times are GMT -4. The time now is 09:10. |