CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Installation

CFLAGS why build in %24HOME and keeping data separated from source dictionaries

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   August 4, 2007, 02:37
Default When upgrading my Gentoo amd64
  #1
New Member
 
Jason Hoogland
Join Date: Mar 2009
Location: Brisbane, QLD, Australia
Posts: 20
Rep Power: 8
hoogland is on a distinguished road
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.
hoogland is offline   Reply With Quote

Old   August 6, 2007, 12:25
Default I have gotten OpenFOAM install
  #2
connclark
Guest
 
Posts: n/a
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.
  Reply With Quote

Old   August 6, 2007, 13:28
Default Hi Jason, overriding CFLAGS
  #3
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
mattijs is on a distinguished road
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.
mattijs is offline   Reply With Quote

Old   August 7, 2007, 19:32
Default Thanks Mattijs. What do oth
  #4
New Member
 
Jason Hoogland
Join Date: Mar 2009
Location: Brisbane, QLD, Australia
Posts: 20
Rep Power: 8
hoogland is on a distinguished road
Thanks Mattijs.

What do other people do with multi-user installations? A copy of OF in each $HOME, symlinks?
hoogland is offline   Reply With Quote

Old   August 7, 2007, 19:40
Default No. What you do is to have a
  #5
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,762
Rep Power: 21
hjasak will become famous soon enough
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
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   August 7, 2007, 20:03
Default Are there then any issues with
  #6
New Member
 
Jason Hoogland
Join Date: Mar 2009
Location: Brisbane, QLD, Australia
Posts: 20
Rep Power: 8
hoogland is on a distinguished road
Are there then any issues with wmake permissions?
hoogland is offline   Reply With Quote

Old   August 7, 2007, 20:08
Default If you set it up like that, th
  #7
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,762
Rep Power: 21
hjasak will become famous soon enough
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
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   August 15, 2007, 05:31
Default Hrv, Ok, thanks, I ended up
  #8
New Member
 
Jason Hoogland
Join Date: Mar 2009
Location: Brisbane, QLD, Australia
Posts: 20
Rep Power: 8
hoogland is on a distinguished road
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
hoogland is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Strategy for keeping track of files and folders? Dre CFX 1 October 30, 2008 14:00
How to build-up the face-based data structure Ya Squall Main CFD Forum 2 September 12, 2007 00:32
removing of linux and keeping windows Anja Main CFD Forum 4 August 23, 2006 07:01
OpenFOAM build from source instructions tj22 OpenFOAM Installation 7 April 6, 2006 16:15
Keeping freestream conditions... Arman A. CFX 3 May 17, 2002 21:36


All times are GMT -4. The time now is 22:47.