|
[Sponsors] |
Proposal for a modification of the initscripts to make switching versions easier |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 21, 2007, 13:31 |
Hi!
This is not a really a
|
#1 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Hi!
This is not a really a bug, but I couldn't think of fitting place to post this. One of the cool features of OF is that Debug/Opt, SP/DP and different MPI-implementations happily reside in the same directory tree side-by-side and can be chosen by the init-scripts. The downside is that one either has to edit the initiscripts and re-source them or has to work with symbolic links for different versions. What I would propose is (I'm doing this for bashrc) is to add this function to .OpenFOAM-1.4.1/bashrc SetDefault() { TMP_DEFAULT=`eval echo \${${1}_DEFAULT}` if [ "$TMP_DEFAULT" ]; then eval "export $1=$TMP_DEFAULT" else eval "export $1=$2" fi } and replace assignments like this export WM_COMPILE_OPTION=Opt with this SetDefault WM_COMPILE_OPTION Opt (I think this makes sense for WM_PRECISION_OPTION, WM_COMPILE_OPTION and WM_MPLIB) Now if, for instance, one wants to switch one shell to the profiled, single-precision version with LAM he issues the commands export WM_PRECISION_OPTION_DEFAULT=SP export WM_COMPILE_OPTION=Prof export WM_MPLIB=LAM . .OpenFOAM-1.4.1/bashrc The advantage of not editing the init-file would be that unpleasant surprises (starting a job with the wrong precision for instance) for other users living from that installation would be avoided
__________________
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 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Proposal for an extension for the timeoptions of Utilities | gschaider | OpenFOAM Bugs | 5 | August 26, 2008 19:13 |
Cleaning up PATH and LD_LIBRARY_PATH when switching between different versions of OpenFOAM | mbeaudoin | OpenFOAM Bugs | 1 | March 12, 2008 04:29 |
find a Phd and a master degree proposal | Sabbagh | Main CFD Forum | 1 | January 7, 2007 00:49 |
Whats the best and easier mesh generator software? | Pedro Clode | FLUENT | 4 | November 29, 2006 02:11 |
Reference Format Guidelines - a Proposal | Jonas Larsson | CFD-Wiki | 4 | September 16, 2005 04:54 |