|
[Sponsors] |
November 19, 2009, 05:36 |
OpenFOAM-1.6 installation script !!
|
#1 |
Member
sayed
Join Date: Nov 2009
Posts: 30
Rep Power: 17 |
hello people
i'm new in the world of simulation ,, i have chose openfoam cause it is opensource and it is completely free , i'm also new in the world of linux ,, i use mandriva 2010 on my computer ,, and i tried to install OpenFOAM many times , i really lose much time , and i can't install the software cause it may want an expert in linux ,, so i wish some expert in linux and in openfoam write installation script to be excited using bash shell directly ,, for the beginners users like me (i think it is a common problem) thank you very much .. |
|
November 20, 2009, 07:24 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Greetings sayed,
If you can change from Mandriva 2010 to Ubuntu 9.04, then you have two scripts available here. If you can't change, use that script as a reference! Best regards, Bruno |
|
November 20, 2009, 07:46 |
|
#3 |
Senior Member
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 18 |
If you just want to perform some calculations with OpenFoam download the Binary Packs for your plattform (linux 32bit or linux64bit) and enjoy. Read the documentation carefully because after downloading and unpacking there are some steps necessary to add OpenFoam to your system environment.
If you download the Source Packs for OpenFoam there is a script called Allwmake. But this is all documented in the documentation. And by the way ... a basic linux knowlege is always neccesary. Even if there are scripts which helps you with the installation and even if they might work without any problems, for using OpenFoam you must be used to Linux basics. Have a look here, this is for my opinion a very nice introduction: www.it.uom.gr/project/sysadm/unix.pdf kind regards, Fabian |
|
November 20, 2009, 11:57 |
|
#4 |
Member
sayed
Join Date: Nov 2009
Posts: 30
Rep Power: 17 |
thanks Bruno ,,
it seem that i have to download Ubuntu 9.04 and install it even if it may take much time to download 4.5 GB ,, it may be the only solution until now ! regards |
|
November 20, 2009, 13:41 |
|
#5 |
Member
sayed
Join Date: Nov 2009
Posts: 30
Rep Power: 17 |
hey Fabian ,
thanks for your advices and for the book i really tried to learn some shell commands , i tried to use this commands as the README file says , i will say what i did exactilly in steps : 1) i make a new directory i called it "OpenFOAM" in that location "/root" 2) using the command tar i extract both "OpenFOAM-1.6.General.gtgz" and "ThirdParty-1.6.General.gtgz" on "OpenFOAM" ,, i now have on my "/root/OpenFOAM" two other directorys "OpenFOAM-1.6" and "ThirdParty-1.6" 3) because i don't have ".bashrc" on the home directory i just copy the ".bashrc" which is on "/root" directory into "/home" directory ,, and i opened it using vi editor and i added that statement "/root/OpenFOAM/OpenFOAM-1.6/etc/bashrc" on the last line . 4) i sourced the "/home/.bashrc" file using the command "source /home/.bashrc" 5) i got that on the screen [root@localhost home]# source .bashrc bash: TMOUT: readonly variable Warning in /root/OpenFOAM/OpenFOAM-1.6/etc/settings.sh: Cannot find /root/OpenFOAM/ThirdParty-1.6/gcc-4.3.3/platforms/linux installation. Please install this compiler version or if you wish to use the system compiler, change the 'compilerInstall' setting to 'System' in this file that is all ,, any one have away to fix this nightmare problem may i have problem , may i do something wrong , or may be i must install some other packages in windows i just take 5 min to install the most largest software just next next , blah blah blah and i'm now in linux spend 7 days to install openfoam and i failed till now ! thanks every body |
|
November 20, 2009, 14:54 |
|
#6 |
Member
Join Date: Jun 2009
Location: Germany
Posts: 38
Rep Power: 17 |
why dont you use mads cookbook?
http://www.cfd-online.com/Forums/ope...-cookbook.html its quite easy with it, i just had some problems with it under ubuntu. so i tried it under opensuse by manuell installing the libs with yast and got it working. good luck |
|
November 20, 2009, 20:52 |
T'is the season...
|
#7 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Hello Sayed,
That error message indicated that you should edit "OpenFOAM/OpenFOAM-1.6/settings.sh" and change OpenFOAM to System... But since it would just lead you to reach another stand still, well, I decided to take the Man-driven Linux... pardon, Mandriva Linux for a spin. So here is an early Christmas gift (or favorite gift giving season) over a month early. Attached to this post is mads cookbook with a little tweaking of my own, to get it running in Mandriva 2010 32bit. I tweaked it to Mandriva's gurmpi instead of Ubuntu's apt-get. It now uses Mandriva's gcc-4.4.1 and Paraview and OpenMPI comes already built, as the cookbook script already defined it, so it's one less hassle of a build tour. Oh, and it sets the multi-processor variable to use the maximum number of cores possible in your machine So, if you've got dual, triple, quad or even octopus core, it'll build in no time NOTE: You don't need to use the root account to run this. Just run it in your normal user account. Download and unpack and run with: Code:
tar -xzf installOF.tar.gz ./installOF Just to give you a head's up: the function patchItUp changes the files bashrc and settings.sh to: use 32bit and maximum number of cores; and use the Mandriva's gcc-4.4.1 ("System" in settings.sh). Just a final note... I haven't finish building OpenFOAM with this script, so I still don't know if all goes well. Oh, and if you want to know how your OpenFOAM is coming along during the build, open a new terminal and do: Code:
cd ~/OpenFOAM/OpenFOAM-1.6 tail -f make.log Best Regards, Bruno |
|
November 21, 2009, 02:33 |
|
#8 |
Member
sayed
Join Date: Nov 2009
Posts: 30
Rep Power: 17 |
thanks Bruno for your kindly help ,, i did run your scipt on my mandriva 2010 , and it donlowd the packages and do a good stuff ,, but a problem occur and i don't think the installation happened, scince it may takes 3 hours , i got this message :
Compiling OpenFOAM...output is in make.log THIS CAN TAKE HOURS ------------------------------------------------------ ------------------------------------------------------ Checking installation - you should see NO criticals... ------------------------------------------------------ Executing homesayedghribOpenFOAMOpenFOAM-1.6.xbinfoamInstallationTest Checking basic setup... ------------------------------------------------------------------------------- Shell bash Host localhost OS Linux version 2.6.31.5-server-1mnb ------------------------------------------------------------------------------- Checking main OpenFOAM env variables... ------------------------------------------------------------------------------- Environment_variable Set_to_file_or_directory Valid Crit ------------------------------------------------------------------------------- $WM_PROJECT_INST_DIR homesayedghribOpenFOAM yes yes $WM_PROJECT_USER_DIR ...sayedghribOpenFOAMsayedghrib-1.6.x no no $WM_THIRD_PARTY_DIR ...sayedghribOpenFOAMThirdParty-1.6.x yes yes ------------------------------------------------------------------------------- Checking the OpenFOAM env variables set on the PATH... ------------------------------------------------------------------------------- Environment_variable Set_to_file_or_directory Valid Path Crit ------------------------------------------------------------------------------- $WM_PROJECT_DIR homesayedghribOpenFOAMOpenFOAM-1.6.x yes yes yes $FOAM_APPBIN ...1.6.xapplicationsbinlinuxGccDPOpt no yes $FOAM_SITE_APPBIN ...penFOAMsite1.6.xbinlinuxGccDPOpt no no $FOAM_USER_APPBIN ...1.6.xapplicationsbinlinuxGccDPOpt no no $WM_DIR ...dghribOpenFOAMOpenFOAM-1.6.xwmake yes yes yes ------------------------------------------------------------------------------- Checking the OpenFOAM env variables set on the LD_LIBRARY_PATH... ------------------------------------------------------------------------------- Environment_variable Set_to_file_or_directory Valid Path Crit ------------------------------------------------------------------------------- $FOAM_LIBBIN ...OAMOpenFOAM-1.6.xliblinuxGccDPOpt no yes $FOAM_SITE_LIBBIN ...penFOAMsite1.6.xliblinuxGccDPOpt no no $FOAM_USER_LIBBIN ...Msayedghrib-1.6.xliblinuxGccDPOpt no no $MPI_ARCH_PATH ...penmpi-1.3.3platformslinuxGccDPOpt yes yes yes ------------------------------------------------------------------------------- Third party software ------------------------------------------------------------------------------- Software Version Location ------------------------------------------------------------------------------- WARNING gcc version does not match gcc supplied with this release of OpenFOAM Supplied version 4.3.3 User version Minimum required 4.3.1 gcc WARNING Conflicting installations OpenFOAM settings bingcc current path CRITICAL ERROR gzip 1.3.12 usrbingzip tar 1.22 bintar icoFoam WARNING Conflicting installations OpenFOAM settings homesayedghribOpenFOAMOpenFOAM-1.6.xapplicationsbinlinuxGccDPOpticoFoam current path CRITICAL ERROR ------------------------------------------------------------------------------- Summary ------------------------------------------------------------------------------- Base configuration ok. The foam installation contains 2 critical error(s). Review the output for warning messages and consult the installation guide for trouble shooting. done. regards sayed Last edited by sayed; November 21, 2009 at 04:37. |
|
November 21, 2009, 03:51 |
|
#9 |
Member
sayed
Join Date: Nov 2009
Posts: 30
Rep Power: 17 |
by the way , can you tell me which linux i should install for perfect performance of openfoam , and have all packages that it needs ,, i see that almost no one here use mandriva ,, so i must change ?
i completed download of Open Suse 11.2 is it fit the bill ? i'm now downloading Ubuntu 9.04 it is now 1% it may take 1 day for complete downloading and i'm ready to download any edition of linux that recommended for openfoam ,, i'm really want to began my real simulation issues (mathematical and numerical solutions of NSE's , and put my geometry boundary conditions ... etc ) i want to began fun cause i lost much time thanks regards sayed Last edited by sayed; November 21, 2009 at 04:35. |
|
November 21, 2009, 06:27 |
|
#10 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Hello Sayed,
You have CD versions of ubuntu 9.04 here, so you won't need to download the whole DVD. OpenSUSE should be ok too. As for the script, like I said, I hadn't yet run it to the end. I finally did, and it's still missing a few miserable packages. The attached file is the same script, with the missing packages included. The script is missing something that can only be done with the root account... login to your root account, and do: Code:
ln -s /usr/bin/gcc /bin/gcc ln -s /usr/bin/c++ /bin/c++ Now, to salvage the build already done so far, do this:
If at the end of foamInstallationTest you get one critical error, and it is this: Code:
gcc 4.4.1 WARNING: Conflicting installations: OpenFOAM settings : /bin/gcc current path : /usr/bin/gcc CRITICAL ERROR Now try following the User guide available online or the local one "OpenFOAM-1.6.x/doc/Guides-a4/UserGuide.pdf". I hope that solves it. At least for me it did the trick. Best regards, Bruno |
|
November 21, 2009, 07:33 |
|
#11 |
Member
sayed
Join Date: Nov 2009
Posts: 30
Rep Power: 17 |
hi bruno
i got that message urpmi database is locked, process 6224 is already using it (/usr/bin/perl /usr/sbin/urpmi.update Non-free Backports) when i typed that command gurpmi libbinutils2-devel libxrandr2-devel libxcursor-devel libxinerama1-devel it firist asked me if i want to install those packages ,, then asked for the root password ,, that is in a user graphical interface i tried to kill the so called process 6224 by using the command "kill 6224" then retype the command ,, it give me the same error but with a different process number ! " like it plays with me " :d |
|
November 21, 2009, 08:40 |
|
#12 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Quote:
Try using the graphical user interface "Install & Remove Software", and on that new window, to the left of the search box, set both dropdowns to "All". Then search for each of the packages I told on the last post, and pick them and Apply when you've picked the ones I said. This graphical interface might be able to get priorities to install the packages! |
||
November 21, 2009, 09:50 |
|
#13 |
Member
sayed
Join Date: Nov 2009
Posts: 30
Rep Power: 17 |
i'm now on Open Suse 11.2 ,, what script should i use now
Open Suse 11.2 is excelent ,, mandriva makes me sick , really a very big difference Last edited by sayed; November 21, 2009 at 10:35. |
|
November 21, 2009, 15:44 |
|
#14 |
Senior Member
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 18 |
Oh man what the hell are you doing It is not like windows, just clicking next, next, next and so on. By the way, clicking next until a loadbar apears isnt the right way to install software under windows.
1) For my opinion the Linux version is equal. Use the one you like. The most popular is Suse and Ubuntu. 2) Understand the difference between a root and a user. The system administrator is root and nobody could access anything which is owned by root until he enters a passwort. So if you install OpenFoam as root und put it into the root/ directory you will never have access to it as a user. This is quite different to windows were most people work als system administor and could access anything to anytime. 3) Go to the OpenFoam page and download the Binary Packs for OpenFoam and Thirdparty. I assume you have a 64bit system so you have to choose "Linux 64bits" as plattform. Download them and remember the path where you have downloaded them. 4) Open a terminal. If you have Suse click on the green Button in you task bar and look for system or something like this. If you have opened a terminal you should be in your home. Type: "mkdir Source" This will create a Source directory. Again type "mkdir Source/OpenFoam" and this will create a new directory called OpenFoam. Then copy the downloaded files to this OpenFoam directory ("cp <path to your download files> ~/Source/OpenFoam"). 5) Go into your Source/OpenFoam directory ("cd Source/OpenFoam") and type "tar -xzf OpenFOAM-1.6.linux64GccDPOpt.gtgz" and "tar -xzf ThirdParty-1.6.linux64Gcc.gtgz" This will unpack your OpenFoam. This will take a while. 6) type "cd" to go back to your home directory. I hope you have installed an editor. I would not recommend "vi" for beginners but e.g. "kate" is very nice and easy to install (use yast2 if you use Suse oder synaptic if you use Ubuntu to install). type "kate .bashrc" (note the dot in front of bashrc this is important!) to your terminal and kate will inform you that he will create a new file. Just enter the following line to your new .bashrc: . $HOME/Source/OpenFoam/OpenFOAM-1.6/etc/bashrc and close the file. Type "bash" and try e.g. "channelFoam". If you get an error somewhere post the steps you have performed successfully and the error message. Fabian |
|
November 21, 2009, 16:44 |
|
#15 |
Member
sayed
Join Date: Nov 2009
Posts: 30
Rep Power: 17 |
hey Fabian ,, i did what you say and i got this message
sayedghrib@linux-kxey:~> bash Warning in /home/sayedghrib/OpenFOAM/OpenFOAM-1.6/etc/settings.sh: Cannot find /home/sayedghrib/OpenFOAM/ThirdParty-1.6/gcc-4.3.3/platforms/linux installation. Please install this compiler version or if you wish to use the system compiler, change the 'compilerInstall' setting to 'System' in this file regards sayed |
|
November 21, 2009, 17:29 |
|
#16 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Hello Sayed,
Quote:
By the way, there is already a few posts about installing OpenFOAM in openSUSE 11.2! Use the search link in this forum Best regards, Bruno |
||
November 22, 2009, 07:17 |
|
#17 |
Senior Member
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 18 |
I am sorry I think I know the error. Editing setting.sh or compailing wouldn't help. It is my fault, because the environment variable FOAM_INST_DIR is wrong. Depending on this variable OpenFoam knows were it its installed and where he have to look for files. So please go back to your .bashrc (type "kate ~/.bashrc) and remove the line:
. $HOME/Source/OpenFoam/OpenFOAM-1.6/etc/bashrc If you have done so please enter this lines: export FOAM_INST_DIR=$HOME/Source/OpenFoam foamDotFile=$FOAM_INST_DIR/OpenFOAM-1.6/etc/bashrc . $foamDotFile save and close kate and type "bash" in your terminal. Do you still get errors please let me know :-D Fabian |
|
November 25, 2009, 10:14 |
|
#18 |
Member
sayed
Join Date: Nov 2009
Posts: 30
Rep Power: 17 |
hey guys ,
i compiled openfoam successfully after dayes of tries thank you Bruno and Fabian for your help and replies i have question ,, is it not easy to learn simulation using openfoam and how long to be professional in it , also how can i start to explore the program and check the examples |
|
November 25, 2009, 10:20 |
|
#19 |
Senior Member
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 18 |
Allright sounds good. But you didnt compile OpenFoam. If you have done it my way, you only installed a binary package which is allready compiled. What you have done is to tell your SUSE where it could find the new program. If you want to compile it you have to download the source pack and type ./Allwmake in your OpenFoam directory. But this is much more complicated and I would recommend to start with the tutorials and lean about using Openfoam and working with linux and if you gain some experience try it out to compile the whole openfoam package. So read the documentation and try out some tutorials this is the way to start.
Fabian |
|
November 25, 2009, 10:27 |
|
#20 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Hello Sayed,
On this thread, you have some pointers on what to do to learn how to use OpenFOAM. On this post, you have a few books about CFD that might be of some help. And here, you have a list of the official documents that OpenCFD has about OpenFOAM So, for starters, follow the user guide! If you have other questions about some cases, try using this forum's search function, because there are already many answers to usual questions Best regards, Bruno |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Cross-compiling OpenFOAM 1.6 on Linux for Windows 32 and 64bits with Mingw-w64 | wyldckat | OpenFOAM Announcements from Other Sources | 7 | January 19, 2010 16:39 |
Critical errors during OpenFoam installation in OpenSuse 11.0 | amscosta | OpenFOAM | 5 | May 1, 2009 15:06 |
Problem installing OpenFOAM 1.5 installation on RHEL 4. | vwsj84 | OpenFOAM Installation | 4 | April 23, 2009 05:48 |
64bitrhel5 OF installation instructions | mirko | OpenFOAM Installation | 2 | August 12, 2008 19:07 |
Adventure of fisrst openfoam installation on Ubuntu 710 | jussi | OpenFOAM Installation | 0 | April 24, 2008 15:25 |