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

openfoam environment viarable

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 23, 2013, 20:05
Default openfoam environment viarable
  #1
Senior Member
 
Jie
Join Date: Jan 2010
Location: Australia
Posts: 134
Rep Power: 16
jiejie is on a distinguished road
Dear foamers

I have compiled the openfoam on our cluster, however the environment variable size exceeds the limit of the cluster after source /etc/bashrc. I know a lot of the variables are for installation purpose. I just wonder whether there is anyway I can unload those unnecessary ones for running the solver?

Thanks

Jie
jiejie is offline   Reply With Quote

Old   January 24, 2013, 04:55
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by jiejie View Post
Dear foamers

I have compiled the openfoam on our cluster, however the environment variable size exceeds the limit of the cluster after source /etc/bashrc. I know a lot of the variables are for installation purpose. I just wonder whether there is anyway I can unload those unnecessary ones for running the solver?
That is a strange limit to set. Anyway.

As far as I remember for an OF-program to run there are only two things necessary:
- correctly set PATH and LD_LIBRARY_PATH so that the binaries are found
- two environment variables from the WM_* FOAM_* variety (I think one of them is WM_PROJECT_DIR but I'm not sure)

To find out which these variables are I'd recommend the following: open two terminals. The "clean" one in which no OF-script was called and the "tainted" one in which you source the etc/bashrc. Now in the clean one set PATH and LD_LIBRARY_PATH to the values you find in the tainted terminal with "echo $PATH". Then in the clean terminal go to a case and run an OpenFOAM-command (blockMesh for instance). The command will complain about an unset environment variable. Echo that in the clean terminal and export it in the tainted terminal. As I said: I think you have to do that twice and then OF-programs should run without problems. The four export-commands (PATH, LD_LIBRARY_PATH and the two others) should be all you need to set up a terminal for THAT OF-version and you can set them at the start of your cluster-script.

Now comes the important part: this recipe might stop working mysteriously if you don't do the following: go to the Wiki and write a short article "Howto: Set up a minimal environment for OF commands to run" (or so) so that others will profit from your insight
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenFOAM - Validation of Results Ahmed OpenFOAM Running, Solving & CFD 10 May 13, 2018 18:28
OpenFOAM Foundation Releases OpenFOAMŪ Version 2.1.1 opencfd OpenFOAM Announcements from ESI-OpenCFD 0 May 31, 2012 09:07
Adventure of fisrst openfoam installation on Ubuntu 710 jussi OpenFOAM Installation 0 April 24, 2008 14:25
Getting OpenFOAM to coexist with an existing JAVA VM nik777 OpenFOAM Installation 5 February 22, 2007 07:21
OpenFOAM Training and Workshop Zagreb 2628Jan2006 hjasak OpenFOAM 1 February 2, 2006 21:07


All times are GMT -4. The time now is 11:02.