We modified the modules distribution slightly to get around this.

In /usr/share/Modules/init/bash I commented out the 'export -f module' line.

In a normal login shell, modules.sh will be called from profile.d so
the module command is available.  In a non login shell, like an app
wrapper script for example, I just source the above file first.  For
example:

Wrapper for appname looks like:
==============================
#!/bin/bash

. /usr/share/Modules/init/bash
module load apps/vendor/app

checkForEndlessFork appname

appname "$@"
==============================

That seems to keep the errors at bay and putting the extra sourcing
line above the module load command in app wrappers isn't a big ask...

Been working fine for a year for us on Fedora 13, RHEL5 and 6.

Stephen


On Wed, Nov 23, 2011 at 3:10 PM, Reuti <[email protected]> wrote:
> Am 23.11.2011 um 16:01 schrieb Prentice Bisbal:
>
>> Schmidt,
>>
>> I've  been having the same problem ever since I upgraded my cluster
>> nodes to RHEL 6. A few weeks ago.  My SGE installation was not touched
>> during the upgrade, since it's on an NFS partition, and the head node
>> was not touched during the upgrade, either. The error seems harmless,
>> and I haven't tracked it down yet, but the existence of that error
>> message, harmless or not, is a problem, as users keep reporting it when
>> they see it.
>
> Interesting. Did the version of the bash change with the upgrade?
>
> -- Reuti
>
>
>> ---
>> Prentice
>>
>>
>> On 11/23/2011 09:07 AM, Schmidt U. wrote:
>>> Dear all,
>>> I know, the problem was discusses one or two years before, but I still
>>> have trouble to eliminate messages in.err file:
>>> I'm using SGE 6.2u5 and for every allocated node of an openmpi job the
>>> sge job's error  file has two lines like this:
>>> //bin/bash: module: line 1: syntax error: unexpected end of file
>>> /bin/bash: error importing function definition for `module'/
>>> I defined in global bashrc:
>>> /MODULEPATH=...
>>> MODULESHOME=...
>>> alias module='/usr/bin/modulecmd bash $*'
>>> module load default_module/
>>> So far I do not need additional settings in the job script file
>>> concerning module environment, as well
>>> /#$ -V/
>>> is used.
>>> The both lines/  /bin/bash:.../ in the err file have no effects, but
>>> even new users are sometimes rattled.
>>> Is anybody affected as well with this problem and found a solution to
>>> eliminate these messages ?
>>>
>>> Udo
>>>
>>>
>>> _______________________________________________
>>> users mailing list
>>> [email protected]
>>> https://gridengine.org/mailman/listinfo/users
>> _______________________________________________
>> users mailing list
>> [email protected]
>> https://gridengine.org/mailman/listinfo/users
>
> _______________________________________________
> users mailing list
> [email protected]
> https://gridengine.org/mailman/listinfo/users
>



-- 
Stephen

http://lensframephoto.com

_______________________________________________
users mailing list
[email protected]
https://gridengine.org/mailman/listinfo/users

Reply via email to