Re: OpenMP and Sun Grid Engine
This archive was generated by
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
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.
On Apr 18, 2011, at 11:38 PM, Damian Eads wrote:
> 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,
> StarCluster mailing list
Received on Tue Apr 19 2011 - 00:31:51 EDT