[GE users] Setting OMP_NUM_THREADS automatically

Reuti reuti at staff.uni-marburg.de
Fri Jul 25 20:23:01 BST 2008


Am 25.07.2008 um 19:41 schrieb Chris Rudge:

> Reuti,
>
> Yes, it's Myrinet. This problem sounds the same as when I was  
> trying to get
> som PBSPro/MPI integration working in the past.
>
> Guess I'll just have to stick with users setting the variable  
> themselves
> unless there's some way to do it in the openmp PE.

In the starter_method you have all environment variables of SGE  
available. So it should be possible to do something like:

if [ "$REQUEST" = "petask" -a "$PE" = "myrinet" ]; then
# special case for Myrinet subtasks to start slaves
# hence jobs shouldn't be called "petask" by the user
     eval "$@"

elif [ "$PE" = "openmp" ]; then
# openmp jobstart
     export OMP_NUM_THREADS=$NSLOTS
     exec "$@"

else
# all other
# including Myrinet main jobstart
     exec "$@"
fi

To get a Tight Myrinet integration you might also have a look here:

http://gridengine.sunsource.net/howto/mpich-integration.html

Item 1 at the beginning.

HTH - Reuti


> Chris
>
>>> Things seem to break when an MPI job runs in the same
>> queue. I'm using
>>> tight integration and end up with errors like:
>>> /usr/local/sge6.0/openmp/startomp.sh: line 5: exec: cd: not found
>>
>> Which type of MPI? This was done by Myrinet in the past and
>> also broke Tight Integration as the second command after the
>> ";" (i.e. the command to start slave tasks was: cd balbla;
>> pgmname ...) created a subshell.
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
> For additional commands, e-mail: users-help at gridengine.sunsource.net


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
For additional commands, e-mail: users-help at gridengine.sunsource.net




More information about the gridengine-users mailing list