CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   OpenFOAM-1.6 install cookbook (https://www.cfd-online.com/Forums/openfoam-installation/68136-openfoam-1-6-install-cookbook.html)

MadsR September 8, 2009 07:35

OpenFOAM-1.6 install cookbook
 
Hi there.

I am not sure if this helps anyone, but for what it's worth, I thought I'd share how I install OpenFOAM on a fresh Ubuntu 9.04 system in a somewhat fool-proof way...By installing I mean real install with compiling, not "only" downloading of binaries.

I have previously spent quite some time, installing OpenFOAM, so I was trying to simplify and organise the process. I like to bake cakes, so I'll put it in a cookbook way if that's okay with you.

1. you need to have a Ubuntu 9.04 system running (or a similar apt-get enabled distro)
2. you need to be logged in as the user you want to be using OF as (not just using su)
3. you need to be allowed to run the sudo command
4. download my install-script found here
5. read through the script and see if you find anything upsetting (please notify me if you do)
6. either - for the not so faint-hearted - run the script "automatically" by typing . ./installOF OR manually copy-paste each line from the script to your command-line and execute, a bit safer, the installation process step-wise
7. you could bake a cake now, as step 6 probably will take a really long time
8. enjoy OpenFOAM, a cup of coffee and your cake
9. if everything above worked out, you can actually maintain your OpenFOAM install by typing git pull in the OpenFOAM-1.6.x-directory followed by ./Allwmake

The script is "verision 1.0" - please use this at your own risk and don't hold anything against me if your summer-vacation pictures are deleted :) (actually if this happens I really wonder how my script could have caused that )

Let me know if this is useless, or if it helps you out.

Cheers,
Mads

akidess September 8, 2009 17:03

Hey Mads, I haven't tried the procedure since I'm happy with 8.10 and 1.5 for now :) However, two little things caught my eye in the script:
1. you have flex twice in the apt-get list (not that I think it matters)
2. What do you mean by "you should se NO critials" ?

Cheers,
Anton

MadsR September 9, 2009 03:15

Hi Anton.

Thank you for your comments - I have revised the script. Critials missed a 'c' and reads Criticals, meaning that you should not see any critical errors.

/Mads

akidess September 9, 2009 14:26

Oh, in that case, it's "see", not "se".

MadsR September 10, 2009 03:39

That's right - thanks.


/Mads

dado September 14, 2009 16:00

Hi Mads,
I am trying to run script on the new Ubuntu 9.04 (64 bit) but I get a lot of:

/usr/bin/ld: cannot find -lfiniteVolume
collect2: ld return 1 exit status
make: *** [/home/ninja/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libdynamicMesh.so] Error 1

MadsR September 15, 2009 03:18

Hi Dado.

Thanks for your feedback. I am glad you pointed it out, because I was not aware of this. My script downloads 32-bit thirdparty-stuff and surely that won't work. By downloading 64-bit thirdparty-stuff instead, I am sure we're on the right path, although other problems might surface :-)

I have made a new script (found here) which downloads 64 bit thirdparty files. Let me know how far that takes you :-)

best regards
Mads

dado September 15, 2009 03:32

Hi Mads,
Thanks for your script! I will try it after work and will let you know it works for me.

regards
/dado

P.S. I am HiFi too ;)

MadsR September 15, 2009 05:05

Great !

Always when changing something, I expect errors, so bring them on, and we'll see :-)

/Mads
Ps. Cool! Hifi is a fantastic hobby and an ongoing project which captures your soul...and your wallet...:-)

dado September 15, 2009 14:53

This new 64bit script work so installation was without any errors and output from the foamInstallationTest ends with:

Summary
-------------------------------------------------------------------------------
Base configuration ok.

Critical systems ok.


done.

So I guess, everything should work fine. Thanks for the script.

/dado

p.s. It took approx 3h to compile.

MadsR September 16, 2009 03:14

Great! Thanks for your feed-back.

Yeah, compile-times are long. I know that you can run compilations in parallel, but I haven't figured out how to do that with the Allwmake of OpenFOAM.

/Mads

makaveli_lcf September 18, 2009 06:14

Mads,
thanks for your cookbook!

olesen September 21, 2009 03:37

This looks like the type of information that could go into the wiki.

mahaputra September 22, 2009 07:43

Quote:

Originally Posted by MadsR (Post 229637)
Great! Thanks for your feed-back.

Yeah, compile-times are long. I know that you can run compilations in parallel, but I haven't figured out how to do that with the Allwmake of OpenFOAM.

/Mads

Dear Mads


I success to install OF 1.6.x by your script. Thanks

Summary
-------------------------------------------------------------------------------
Base configuration ok.

Critical systems ok.


done.




i have a stupid question, why i can't running any common command of the OF in terminal?

example : blockMesh, run, icoFoam and all of them ?

is there something else i have to configure?



Takk

mahaputra September 22, 2009 07:46

Quote:

Originally Posted by mahaputra (Post 230117)
Dear Mads


I success to install OF 1.6.x by your script. Thanks

Summary
-------------------------------------------------------------------------------
Base configuration ok.

Critical systems ok.


done.




i have a stupid question, why i can't running any common command of the OF in terminal?

example : blockMesh, run, icoFoam and all of them ?

is there something else i have to configure?



Takk

sorry for my stupid mistake.

that problem already solved.

just close the terminal and open the new one

:D

olesen September 22, 2009 07:55

Quote:

Originally Posted by MadsR (Post 229637)
...
I know that you can run compilations in parallel, but I haven't figured out how to do that with the Allwmake of OpenFOAM.

I guess you didn't find the corresponding wiki entry:
http://openfoamwiki.net/index.php/Compiling/Building
Use the information for OpenFOAM-1.4.1 and newer.

You need a password-less ssh and the OpenFOAM settings must be available - see the wmakeScheduler for more internal details.

MadsR September 22, 2009 08:17

Great! Thanks Mark.

/Mads

gfilip September 23, 2009 16:13

Hi Mads,

I just installed OF1.6.x using your script and I have a bit of a newbie problem.

The OF environment from /etc/bashrc is sourced in my home .bashrc file, but I do not seem to get all the OF commands. For example, "checkMesh" and "blockMesh" are not available commands, while solvers such as icoFoam, etc, are. Any ideas where I might be going wrong?

Thanks,


-Greg

akidess September 23, 2009 17:27

Quote:

Originally Posted by gfilip (Post 230341)
Hi Mads,

I just installed OF1.6.x using your script and I have a bit of a newbie problem.

The OF environment from /etc/bashrc is sourced in my home .bashrc file, but I do not seem to get all the OF commands. For example, "checkMesh" and "blockMesh" are not available commands, while solvers such as icoFoam, etc, are. Any ideas where I might be going wrong?

Thanks,


-Greg


Were there any errors when executing the script? Did you try:

Quote:

Originally Posted by mahaputra (Post 230119)
sorry for my stupid mistake.

that problem already solved.

just close the terminal and open the new one


gfilip September 23, 2009 17:30

I did not see any errors when running the script and I did try closing all terminals and starting new ones, but no luck.


All times are GMT -4. The time now is 03:31.