|
[Sponsors] |
April 27, 2010, 07:59 |
OpenFOAM updates
|
#1 |
Senior Member
Join Date: Feb 2010
Posts: 213
Rep Power: 17 |
I have some questions about git repository, I'm not so expert of linux. I have OpenFOAM 1.6 installed on Ubuntu 9.10. Have I to remove it, before installing 1.6.x, or can I update 1.6 directly? Is there a step-by-step guide for beginners? I read this and this thread, but maybe are about a first installation.
I'm afraid to not be able to update my OpenFOAM version, but I'd like to improve omega wall functions and other stuff. Thank you for your help. |
|
April 27, 2010, 09:19 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,980
Blog Entries: 45
Rep Power: 128 |
Greetings vaina74,
Technically you can use either scripts in those threads. Nonetheless, the script indicated in the second thread is more powerful and can make use of already existing packages you've downloaded previously. If you want to use the 1st script, you could just steal the lines of code and run only those lines that will help you get and build the 1.6.x version. OpenFOAM 1.6 and 1.6.x are designed to live side by side. Both scripts take this into account and keep a single ThirdParty folder shared between the two versions. An additional tip: by concept, the first script only allows the 1.6.x to be active at the start of a new terminal window. The second script allows you to choose an alias method to start the OpenFOAM environment. In other words, after you've installed OpenFOAM 1.6.x, you could set-up in your $HOME/.bashrc script the following two lines of code: Code:
alias startFoam16='. $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc' alias startFoam16x='. $HOME/OpenFOAM/OpenFOAM-1.6.x/etc/bashrc' I hope this wasn't too much information in one post, but this way it should answer a few questions you could have had in the near future Best regards, Bruno
__________________
|
|
April 27, 2010, 09:56 |
|
#3 |
Senior Member
Join Date: Feb 2010
Posts: 213
Rep Power: 17 |
Thank you very much for your exhaustive explanation. I'm going to download and run the second script. It'll be interesting compare the same case with two different version of OpenFOAM. I'll keep track of my success (ora failure) in updating the code.
|
|
April 27, 2010, 13:50 |
|
#4 |
Senior Member
Join Date: Feb 2010
Posts: 213
Rep Power: 17 |
* Sigh *
I had an error (look at the attached file). I'm a newbie, I can't fix a gcc version conflict Can you help me, please? |
|
April 27, 2010, 16:38 |
|
#5 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,980
Blog Entries: 45
Rep Power: 128 |
Hello vaina74,
OK, two things first:
It seems to have built everything, although for some strange reason, it is set to use gcc 4.3.3 although it used the system's version 4.4.1. Basically, in order for it not to complain, you have to edit the settings.sh file that exists in OpenFOAM/OpenFOAM-1.6.x/etc and change where it says something like use compiler=OpenFOAM to =System... Best regards, Bruno
__________________
|
|
April 27, 2010, 17:12 |
|
#6 |
Senior Member
Join Date: Feb 2010
Posts: 213
Rep Power: 17 |
1. I downloaded your post (n° 18) attached file, I thought it was the last one. Should I launch again the lastest version in openfoam-ubuntu?
2. So, do you want this script to also upgrade the packages? yes Build code documentation? yes Use Ubuntu's gcc compiler (will use OpenFOAM's otherwise)? yes [I'm not so sure] Do you want the OpenFOAM environment to be set as default whenever you start a new terminal? no [Later I can edit $HOME/.bashrc script] Should I do again all the procedure with another script and others settings? I attach settings.sh. Cheers, Maurizio |
|
April 27, 2010, 19:47 |
|
#7 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,980
Blog Entries: 45
Rep Power: 128 |
Greetings Maurizio,
Well, I think it's all working fine, so no need to use the latest script version. It seems a bit odd that there is a collision of gcc 4.3.3 vs 4.4.1, but my guess is that it's possible that there was something left over from OpenFOAM's 1.6 environment that remained even after the installOF.sh had started its own OpenFOAM 1.6.x environment. Quote:
My advice now is to edit $HOME/.bashrc and do as I said on the #2 post: setup the two "alias", one for each OpenFOAM version. Then start the 1.6.x environment in a new terminal (by running startFoam16x) and run foamInstallationTest again to see if it still complains about version collisions! If I'm right, it now shouldn't complain again. You should do a few tests with the usual OpenFOAM solvers and utilities on tutorial cases that you know well, and compare results between versions, to make sure that everything is OK. I completely forgot to tell you to disable OpenFOAM's 1.6 environment before running the install script Hopefully no damage was done. I can only assume that there aren't any issues, since using the pre-built OpenFOAM 1.6 libraries and applications work just fine in Ubuntu 9.10 Best regards, Bruno
__________________
|
||
April 28, 2010, 04:13 |
|
#8 | |
Senior Member
Join Date: Feb 2010
Posts: 213
Rep Power: 17 |
In my $HOME/.bashrc I see
Code:
source $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc alias startFoam=". ~/OpenFOAM/OpenFOAM-1.6.x/etc/bashrc" Code:
alias startFoam16=". $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc" alias startFoam16x=". $HOME/OpenFOAM/OpenFOAM-1.6.x/etc/bashrc" Quote:
Code:
source $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc Code:
source $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc source $HOME/OpenFOAM/OpenFOAM-1.6.x/etc/bashrc alias startFoam16=". $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc" alias startFoam16x=". $HOME/OpenFOAM/OpenFOAM-1.6.x/etc/bashrc" Code:
alias startFoam16=". $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc" alias startFoam16x=". $HOME/OpenFOAM/OpenFOAM-1.6.x/etc/bashrc" Thank you again, best regards. Maurizio |
||
April 28, 2010, 06:07 |
|
#9 | ||
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,980
Blog Entries: 45
Rep Power: 128 |
Greetings Maurizio,
Quote:
Quote:
The other solution with "source" would activate OF 1.6 environment, and then OF 1.6.x and then set-up the alias... which would be a bit redundant and the OF 1.6.x would always be active. Additionally, that dot after the first quote does the same as the command "source"... or at least it should. So you can choose either one. In other words, this is the same as the last quoted code: Code:
alias startFoam16="source $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc" alias startFoam16x="source $HOME/OpenFOAM/OpenFOAM-1.6.x/etc/bashrc" And you're welcome Best regards, Bruno
__________________
|
|||
April 28, 2010, 07:15 |
|
#10 |
Senior Member
Join Date: Feb 2010
Posts: 213
Rep Power: 17 |
1. I edited $HOME/.bashrc, it'all ok.
2. Out of curiosity, I replaced compilerInstall=System with OpenFOAM in settings.sh and ran foamInstallationTest: no critical errors, but obviously simple actions as decomposePar don't work. I chose again System: gcc conflict critical error but decomposePar works. 3. I think something in OpenFOAM1.6.x (or ThirdParty-1.6.x) went wrong (gcc conflict?). I launched my case (simpleFoam on a airfoil) and forces libraries included in my controlDict don't work anymore: Code:
Starting time loop --> FOAM Warning : From function void forces::read(const dictionary& dict) in file forces/forces.C at line 278 Could not find U, p or rho in database. De-activating forces. --> FOAM Warning : From function void forces::read(const dictionary& dict) in file forces/forces.C at line 278 Could not find U, p or rho in database. De-activating forces |
|
April 28, 2010, 08:07 |
|
#11 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,980
Blog Entries: 45
Rep Power: 128 |
Hi Maurizio,
I forgot to mention at my first post, but I though it was a bit obvious: always make a backup before doing serious changes OK, before doing the following steps, can you firstly describe what force libraries are you using? Are they the ones from OpenFOAM or your own, or from some tutorial case from OpenFOAM 1.6? In other words, did you have to build the force libraries yourself, or you just used it after building OpenFOAM 1.6? Where is the specific force library located? Now that I think about it, it makes more sense that you should have built OpenFOAM 1.6.x also with gcc 4.3.3. So, if I'm not mistaken, you don't need to remove anything. But keep in mind that the following steps are only to increase compatibility between libraries from OpenFOAM 1.6 and 1.6.x. For example, if you are using a custom solver, library or utility, you might not need to rebuild them for them to work with both versions. The steps should be something along these lines:
Bruno
__________________
|
|
April 28, 2010, 08:55 |
|
#12 |
Senior Member
Join Date: Feb 2010
Posts: 213
Rep Power: 17 |
To evaluate forces on my airfoil I use libforces.so, a standard library included in OpenFOAM-1.6(.x)/lib/linuxGccDPOpt. If I understand you correctly, I must rebuild OpenFOAM, as you described in the previous post.
|
|
April 28, 2010, 09:01 |
|
#13 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,980
Blog Entries: 45
Rep Power: 128 |
Quote:
Hopefully the steps I wrote are enough to get things going correctly. And don't forget to make backups once in a while
__________________
|
||
April 29, 2010, 05:59 |
|
#14 |
Senior Member
Join Date: Feb 2010
Posts: 213
Rep Power: 17 |
I rebuild OpenFOAM1.6.x and it's ok, no critical errors. But forces library still doesn't work, I have the same error. My case in OpenFOAM1.6 works instead, I don't understand that. And I notice ThirdParty-1.6 is a folder, ThirdParty-1.6.x is a link to the ThirdParty-1.6 folder: is it correct?
I can work with 1.6 but I'd like to fix 1.6.x. What should I do? Is there a procedure to fully reinstall the '1.6.x suite'? |
|
April 29, 2010, 06:47 |
|
#16 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,980
Blog Entries: 45
Rep Power: 128 |
Greetings Maurizio,
It's normal to have ThirdParty-1.6.x linked to 1.6. This way you don't have an exact replica of the same folder, occupying space! Well, this is very strange It should have worked fine like this NOTE: I forgot it could be a version issue... some things change along time OK, if that doesn't turn out well in adapting the case (I think the post #7 on that thread should work well), here is the steps you can follow: You can install a new clean instance of OpenFOAM. Currently the script at "openfoam-ubuntu" has a simple glitch, that although it asks you where you want to install OpenFOAM, it doesn't change the path in bashrc... rendering it a bit misleading This weekend I hope to have it fixed. So, for now, you can do the following steps:
Best regards, Bruno
__________________
|
|
April 29, 2010, 11:36 |
|
#17 |
Senior Member
Join Date: Feb 2010
Posts: 213
Rep Power: 17 |
First, thank you very much for your time and your help. I'm testing some tips, other users experienced forces problems. Maybe somewhat changed in libforces.so and I have to edit the code in controlDict and the initial conditions.
If it works, I'll ask your pardon. If it doesn't work, I'll follow your last suggestions. If even it doesn't work, I keep on using 1.6 (and I'll wait for 1.7 ). I'm sure your script is fantastic, anyway |
|
April 29, 2010, 12:33 |
|
#18 |
Senior Member
Join Date: Feb 2010
Posts: 213
Rep Power: 17 |
Another stupid question of mine. I read on the terminal that your installation script notices the 2 cores. When I open a new terminal and set Openfoam-1.6.x environment, I read building on 2 cores. Now I'm in doubt: I usually use
Code:
decomposePar Code:
foamJob -p -s simpleFoam Code:
mpirun noticed that process rank 1 with PID [4 digits] on node xxx-laptop exited on signal 11 (segmentation fault) If I launch a simple simpleFoam, my case runs without problem (yes, the problem was in calling libforces.so, somewhat changed in the library or in using it). |
|
April 29, 2010, 17:43 |
|
#19 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,980
Blog Entries: 45
Rep Power: 128 |
Hi Maurizio,
Uhm, "building on 2 cores" should not affect solver execution. It should only affect the building process, namely Allwmake and wmake! Quote:
The true reason for the crash should be related to some misconfiguration of OpenMPI. Does it work with OpenFOAM 1.6? There is a test application in OpenFOAM that you can build for testing with OpenFOAM+OpenMPI. Run: Code:
cd $WM_PROJECT_DIR wmake applications/test/parallel NOTE: when using OpenFOAM 1.6, there is a glitch that has been fixed in OpenFOAM 1.6.x; before running wmake, you will need to edit the file $WM_PROJECT_DIR/applications/test/parallel/parallelTest.C, search for the following lines (non lines contiguous):Then, go to your case that has the decomposePar already done and run: Code:
foamJob -p -s parallelTest Code:
Create time [1] Starting transfers [1] [1] slave sending to master 0 [1] slave receiving from master 0 [0] Starting transfers [0] [0] master receiving from slave 1 [0] (0 1 2) [0] master sending to slave 1 End [1] (0 1 2) Finalising parallel run Although you said you usually use foamJob... something is amiss By what I can vaguely remember, last time I ran it in Linux (Ubuntu and OpenSUSE), I didn't need to edit anything for it to work properly, but my memory isn't all that good lately On the other hand, didn't foamJob return any other useful information? It should have created a file named log with something in it... wait, probably has the same text that you posted... Is there a tutorial case in OpenFOAM that uses libforces that I could test with? Best regards, Bruno
__________________
Last edited by wyldckat; May 4, 2010 at 18:31. Reason: missed a bold... and added a NOTE about OpenFOAM's 1.6 parallelTest glitch |
||
April 30, 2010, 07:41 |
|
#20 |
Senior Member
Join Date: Feb 2010
Posts: 213
Rep Power: 17 |
Here I am
Everything is (almost) ok. I had no problems with parallel running in OpenFOAM-1.6 but I ran the parallel test. Or rather, I tried: Code:
giulia@giulia-laptop:~$ cd $WM_PROJECT_DIR giulia@giulia-laptop:~/OpenFOAM/OpenFOAM-1.6$ wmake applications/test/parallel SOURCE=parallelTest.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -IlnInclude -I. -I/home/giulia/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude -I/home/giulia/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/parallelTest.o parallelTest.C: In function ‘int main(int, char**)’: parallelTest.C:63: error: no matching function for call to ‘Foam::OPstream::OPstream(int)’ /home/giulia/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/OPstream.H:88: note: candidates are: Foam::OPstream::OPstream(Foam::Pstream::commsTypes, int, Foam::label, Foam::IOstream::streamFormat, Foam::IOstream::versionNumber) /home/giulia/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/OPstream.H:56: note: Foam::OPstream::OPstream(const Foam::OPstream&) parallelTest.C:69: error: no matching function for call to ‘Foam::IPstream::IPstream(int)’ /home/giulia/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/IPstream.H:89: note: candidates are: Foam::IPstream::IPstream(Foam::Pstream::commsTypes, int, Foam::label, Foam::IOstream::streamFormat, Foam::IOstream::versionNumber) /home/giulia/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/IPstream.H:56: note: Foam::IPstream::IPstream(const Foam::IPstream&) parallelTest.C:84: error: no matching function for call to ‘Foam::IPstream::IPstream(int&)’ /home/giulia/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/IPstream.H:89: note: candidates are: Foam::IPstream::IPstream(Foam::Pstream::commsTypes, int, Foam::label, Foam::IOstream::streamFormat, Foam::IOstream::versionNumber) /home/giulia/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/IPstream.H:56: note: Foam::IPstream::IPstream(const Foam::IPstream&) parallelTest.C:98: error: no matching function for call to ‘Foam::OPstream::OPstream(int&)’ /home/giulia/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/OPstream.H:88: note: candidates are: Foam::OPstream::OPstream(Foam::Pstream::commsTypes, int, Foam::label, Foam::IOstream::streamFormat, Foam::IOstream::versionNumber) /home/giulia/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/OPstream.H:56: note: Foam::OPstream::OPstream(const Foam::OPstream&) make: *** [Make/linuxGccDPOpt/parallelTest.o] Errore 1 OpenFOAM-1.6.x output seems to be better: Code:
giulia@giulia-laptop:~/OpenFOAM/giulia-1.6.x/run/hydrofoil$ foamJob -p -s parallelTest Parallel processing using OPENMPI with 2 processors Executing: mpirun -np 2 /home/giulia/OpenFOAM/OpenFOAM-1.6.x/bin/foamExec parallelTest -parallel | tee log Building on 2 cores Building on 2 cores /*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.6.x | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : 1.6.x-069803848c44 Exec : parallelTest -parallel Date : Apr 30 2010 Time : 12:42:54 Host : giulia-laptop PID : 5601 [0] Starting transfers [0] [0] master receiving from slave 1 Case : /home/giulia/OpenFOAM/giulia-1.6.x/run/hydrofoil nProcs : 2 Slaves : 1 ( giulia-laptop.5602 ) Pstream initialized with: floatTransfer : 0 nProcsSimpleSum : 0 commsType : nonBlocking SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time [1] Starting transfers [1] [1] slave sending to master 0 [1] slave receiving from master 0 [0] (0 1 2) [0] master sending to slave 1 End Finalising parallel run [1] (0 1 2) If I am correct, to periodically update OF-1.6.x. I have to type: Code:
cd $WM_PROJECT_DIR git pull ./Allwmake >make.log 2>&1 |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Superlinear speedup in OpenFOAM 13 | msrinath80 | OpenFOAM Running, Solving & CFD | 18 | March 3, 2015 05:36 |
Modified OpenFOAM Forum Structure and New Mailing-List | pete | Site News & Announcements | 0 | June 29, 2009 05:56 |
64bitrhel5 OF installation instructions | mirko | OpenFOAM Installation | 2 | August 12, 2008 18:07 |
Adventure of fisrst openfoam installation on Ubuntu 710 | jussi | OpenFOAM Installation | 0 | April 24, 2008 14:25 |
OpenFOAM Debian packaging current status problems and TODOs | oseen | OpenFOAM Installation | 9 | August 26, 2007 13:50 |