[GE users] Error with "export -f" shell (bash) functions
elauzier2 at perlstar.com
Mon Jan 18 14:03:13 GMT 2010
Regarding the Modules pkg, what I have done to work around this is to set up Modules for the user on the system level when the user logs in. On Linux systems, put in a Modules.sh file into profile.d. This way, when SGE transfers the env with the -V option, the bash function for Modules is dropped by SGE and reinstalled by Modules.sh.
Another workaround I have experimented with was to create a Modules alias like what is done in the Modules.csh file. This does work if you make sure that when the user logs in that the modified Modules.sh file is referenced.
I have not experimented with multi-line alias definitions, but it may be possible to substitute simple multiline bash functions with alias defs - they could get ugly though...
So, a semi-workaround for now is to have function definitions available on the system level or in each user's env init scripts so that when the -V option is used, the env functions will be reset as part of the normal env setup. There is the annoying error messages that are put into the error files, but if you can live with them, then this is ok. Of course, this only works when you have the job run a login shell...
Of course any functions defined by the user on the fly will not be preserved...
This begs for a real SGE parser solution for the bash env function transfer issue...
To unsubscribe from this discussion, e-mail: [users-unsubscribe at gridengine.sunsource.net].
More information about the gridengine-users