Skip to Main Content

The University of Tennessee

Newton header banner

Frequently Used Tools:

Home » Documentation » Using the Grid Engine » Parallel Jobs

Parallel jobs

If you need to use more than one CPU within a single job, you will need to submit the job with a resource request for what the Grid Engine calls a "parallel environment" (PE). Here is an example that job definition file for a program that will use 8 CPUs on a single compute node (using threads or forks):

#$ -pe threads 8
#$ -N test

When the job is submitted, the Grid Engine will wait until 8 CPUs are available on a single machine and will then execute the program on that machine. It is the responsibility of the program to create 8 processes or threads in order to utilize all 8 CPUs on the node.

Here is an example that submits a 32 CPU parallel job (called "test") that uses OpenMPI and was compiled with an Intel compiler:

#$ -pe openmpi* 32
#$ -N test
mpirun /path/to/my/program

In this example, the program "mpirun" will execute the program (/path/to/my/program) on all compute nodes that were allocated by the Grid Engine.

Refer to the next section, Using Dedicated Nodes, on how to optimize the scheduling of parallel jobs.

Back to Using The Grid Engine