StarCluster - Mailing List Archive

Re: OpenMP and Sun Grid Engine

From: Justin Riley <no email>
Date: Tue, 19 Apr 2011 00:31:49 -0400

Hi Damian,

It's been a little while since I've played with OpenMP but from what I remember you need to set OMP_NUM_THREADS equal to the number of slots you allocate using the parallel environment. In theory, you should be able to use the same command:

$ qsub -pe orte X open-mp-script.sh [args]

And inside open-mp-script.sh you would need to export OMP_NUM_THREADS=$NSLOTS and then run your OpenMP binary like so:

$ cat open-mp-script.sh
export OMP_NUM_THREADS=$NSLOTS
...
/path/to/my/openmp/binary $*
....

Don't forget to make your binary executable (chmod +x <binary>). Let me know how this goes. If that doesn't work I'll look into this further.

HTH,

~Justin

On Apr 18, 2011, at 11:38 PM, Damian Eads wrote:

> Hi,
>
> Last year, I was using MPI and it was suggested by Justin to use
>
> qsub -pe orte X mpi-job-script.sh [mpi job arguments]
>
> to add an MPI job to the queue (where X is the number of slots for the job).
>
> Now, my situation is slightly different. I am no longer using MPI but
> OpenMP (you know, #pragma parallel before certain for loops). What
> process manager should I use with Sun Grid Engine in this case? How
> would I specify how many slots the job should use?
>
> Thank you in advance.
>
> Kind regards,
>
> Damian
> _______________________________________________
> StarCluster mailing list
> StarCluster_at_mit.edu
> http://mailman.mit.edu/mailman/listinfo/starcluster
Received on Tue Apr 19 2011 - 00:31:51 EDT
This archive was generated by hypermail 2.3.0.

Search:

Sort all by:

Date

Month

Thread

Author

Subject