Hi,

Am 11.01.2012 um 19:12 schrieb Mark Suhovecky:

> Edmund-
> 
> Yeah, I've tried that.  No difference.  Our template .bash_profile sources
> the user's .bashrc, so non-interactive  bash shells in our setup are sourcing 
> .bashrc.

SGE 6.2u5 can't handle multi line environment variables or functions, it was 
fixed in 6.2u6 which isn't free. Do you use -V while submitting the job? Just 
ignore the error or look into Son of Gridengine which fixed it too.

If you can avoid -V, then it could be defined in any of the .profile or alike 
if you use -l as suggested. You could even define a started_method in SGE to 
define it for all users by default and avoid to use -V:

#!/bin/sh
module() { ...command...here... }
export -f module
exec "${@}"

-- Reuti


> The modules environment is defined, and works- only jonbs that run across 
> multiple machines see this error.
> 
> Mark Suhovecky
> HPC System Administrator
> Center for Research Computing
> University of Notre Dame
> suhove...@nd.edu
> ________________________________________
> From: users-boun...@open-mpi.org [users-boun...@open-mpi.org] On Behalf Of 
> Edmund Sumbar [esum...@ualberta.ca]
> Sent: Wednesday, January 11, 2012 12:52 PM
> To: Open MPI Users
> Subject: Re: [OMPI users] ompi + bash + GE + modules
> 
> Hi Mark,
> 
> Have you tried adding -l to the #! line?
> 
> #!/bin/bash -l
> 
> On Wed, Jan 11, 2012 at 10:42 AM, Mark Suhovecky 
> <suhove...@nd.edu<mailto:suhove...@nd.edu>> wrote:
> #!/bin/bash
> #$ <some GE directives>
> 
> module load ompi
> 
> mpiexec
> 
> when the mpiexec is run, we'll see the following errors
> 
> 
> bash: module: line 1: syntax error: unexpected end of file
> bash: error importing function definition for `module'
> 
> 
> 
> --
> Edmund Sumbar
> Research Computing Support
> University of Alberta
> +1 780 492 9360
> 
> 
> _______________________________________________
> users mailing list
> us...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/users


Reply via email to