|
[Sponsors] |
July 20, 2012, 12:56 |
How to install two versions of OpenFoam
|
#1 |
Member
Join Date: Jan 2010
Posts: 44
Rep Power: 16 |
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?
|
|
July 20, 2012, 16:56 |
|
#2 |
Senior Member
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,267
Blog Entries: 1
Rep Power: 25 |
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' |
|
July 20, 2012, 18:21 |
|
#3 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
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
__________________
|
|
July 23, 2012, 19:02 |
|
#4 | |
Member
Join Date: Jan 2010
Posts: 44
Rep Power: 16 |
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 |
||
July 23, 2012, 19:23 |
|
#5 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
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
__________________
|
||
July 23, 2012, 19:52 |
|
#6 |
Member
Join Date: Jan 2010
Posts: 44
Rep Power: 16 |
||
July 24, 2012, 17:18 |
|
#7 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
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
__________________
|
||
July 25, 2012, 14:43 |
|
#8 | |
Member
Join Date: Jan 2010
Posts: 44
Rep Power: 16 |
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 |
||
July 25, 2012, 14:53 |
|
#9 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Argen,
Ah HA! OK, simple enough: Code:
sudo apt-get install libc6-dev Bruno
__________________
|
|
July 25, 2012, 15:46 |
|
#10 | |
Member
Join Date: Jan 2010
Posts: 44
Rep Power: 16 |
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]? |
||
July 25, 2012, 15:57 |
|
#11 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
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
__________________
|
|
July 25, 2012, 20:15 |
|
#12 | |
Member
Join Date: Jan 2010
Posts: 44
Rep Power: 16 |
Quote:
Last edited by Argen; July 25, 2012 at 20:35. |
||
July 26, 2012, 04:43 |
|
#13 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
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
__________________
|
|
July 30, 2012, 02:36 |
|
#14 |
Member
Join Date: Jan 2010
Posts: 44
Rep Power: 16 |
||
July 30, 2012, 06:19 |
|
#15 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
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
__________________
|
|
July 30, 2012, 16:42 |
|
#16 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
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 cd wmake/rules sed -i -e 's=/lib/cpp $(GFLAGS)=cpp -traditional-cpp $(GFLAGS)=' linuxGcc43/general sed -i -e 's=/lib/cpp $(GFLAGS)=cpp -traditional-cpp $(GFLAGS)=' linux64Gcc43/general Code:
cd $WM_THIRD_PARTY_DIR (cd metis-5.0pre2 && make realclean) (cd ParMetis-3.1 && make clean) (cd ParMGridGen-1.0 && make realclean) ./Allwmake > 3rdmake_1ststage.log 2>&1 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 ./Allwmake > make.log 2>&1 Best regards, Bruno
__________________
Last edited by wyldckat; July 30, 2012 at 17:29. Reason: see "edit:" |
|
August 6, 2012, 13:39 |
|
#17 | |
Member
Join Date: Jan 2010
Posts: 44
Rep Power: 16 |
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:
|
||
August 7, 2012, 07:26 |
|
#18 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Argen,
I see that gmake came back to haunt us Here's what I wrote about it and respective fix several months ago: Quote:
Bruno
__________________
|
||
August 8, 2012, 19:28 |
|
#19 | |
Member
Join Date: Jan 2010
Posts: 44
Rep Power: 16 |
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 ======================================== |
||
August 9, 2012, 06:55 |
|
#20 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Argen,
Nothing to worry about. As I described in the script: Quote:
Best regards, Bruno
__________________
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Can't get older versions of OpenFOAM | fabioc | OpenFOAM Installation | 4 | February 7, 2012 10:13 |
for every member help me please to install OpenFOAM | dima133 | OpenFOAM Installation | 1 | January 8, 2012 17:36 |
how to install openfoam on ubuntu 1.4 ? | seyedashraf | OpenFOAM Installation | 8 | August 23, 2011 06:50 |
OpenFoam install script Error during paraFoam installation | SePe | OpenFOAM Installation | 10 | June 19, 2010 16:15 |
Install openFOAM 1.6 on debian 32bit - blockMesh: command not found | fossy | OpenFOAM Installation | 1 | August 28, 2009 05:06 |