CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (http://www.cfd-online.com/Forums/openfoam-installation/)
-   -   CFLAGS why build in %24HOME and keeping data separated from source dictionaries (http://www.cfd-online.com/Forums/openfoam-installation/57504-cflags-why-build-24home-keeping-data-separated-source-dictionaries.html)

hoogland August 4, 2007 02:37

When upgrading my Gentoo amd64
 
When upgrading my Gentoo amd64 systems it took me a litle while to figure out that OpenFOAM was overriding my CFLAGS etc. One of "-m64 -fPIC" was breaking the compilation of glibc, for instance. It was advised to me not to use these flags, partly I think because the gcc installed is already for 64 bits. Does OpenFOAM use these flags because a 32 bit gcc is provided or some other reason(s).

Also, what are the reasons for the recommendation to keep the package within $HOME? Its not a common recommendation, thats all. Personally I'm more interested in the best way to keep run data stored separately from source dictionaries, so that the source stuff can be kept easily in an svn repo.

connclark August 6, 2007 12:25

I have gotten OpenFOAM install
 
I have gotten OpenFOAM installed on my Gentoo AMD64 box. Its not the most Gentoo friendly software to install but it can be done if you keep at it. Don't use the "-m64 -fPIC" flags. You need to specify the env variables in your bashrc file like the readme file suggests and it will add the appropriate flags.

You will need to get the demangle.h file from your bin utils tar ball. Also you'll want to install blackdown java and its plugin for Firefox so you don't have to install the 32 bit version. I think I also had to create a soft link named yacc++ to point to yacc.


If you read the read me file it tells you to create a separate directory to run your examples in.

My biggest trouble was getting Paraview to work with OpenFOAM correctly as it seemed the source for paraview didn't have the same directory structure OpenFOAM expected.

Focus on getting it to work right first, then you can work on tuning it for speed.

mattijs August 6, 2007 13:28

Hi Jason, overriding CFLAGS
 
Hi Jason,

overriding CFLAGS was to make sure that building external software (lam, mico) used the correct flags. On hindsight perhaps not too good an idea.

Keeping the package within $HOME is personal preference. At our place it is the only area that is nfs mounted everywhere.

hoogland August 7, 2007 19:32

Thanks Mattijs. What do oth
 
Thanks Mattijs.

What do other people do with multi-user installations? A copy of OF in each $HOME, symlinks?

hjasak August 7, 2007 19:40

No. What you do is to have a
 
No. What you do is to have a OpenFOAM user (which will own the installation) and install it there. You then copy the dot-files from the OpenFOAM project (e.g. ~OpenFOAM/OpenFOAM-1.4.1/.OpenFOAM-1.4.1) into the home directory of each user (there is only a few) and in ~/.OpenFOAM-1.4.1/cshrc you choose to point to the master installation:

setenv WM_PROJECT_INST_DIR ~$WM_PROJECT

Alternatively, slap it into /usr/local/OpenFOAM and use:

setenv WM_PROJECT_INST_DIR /usr/local/$WM_PROJECT

There are commented-out examples; the rest is ready to roll.

Enjoy,

Hrv

hoogland August 7, 2007 20:03

Are there then any issues with
 
Are there then any issues with wmake permissions?

hjasak August 7, 2007 20:08

If you set it up like that, th
 
If you set it up like that, the main installation is protected and managed only by its owner. The rest of the development work carries on in the local area of each user.

We have operated like that since the early days of FOAM/OpenFOAM at Imperial College in 1994-onwards. There are no problems, even when library bug fixes are necessary - you only get stuck in some fancy templating bug fixes, but I'd consider that VERY advanced.

Enjoy,

Hrv

hoogland August 15, 2007 05:31

Hrv, Ok, thanks, I ended up
 
Hrv,

Ok, thanks, I ended up successfully installing in /usr/local/ as root, for details see:

http://openfoamwiki.net/index.php/Howto_compile_OpenFOAM#Building_on_x86_64_Fedo ra_Core_.28AMD64.29_and_Gentoo_.28EMT64.29

I expect there may be the odd additional permission issue but have ironed out most of them.

hoogs


All times are GMT -4. The time now is 21:56.