Integrating Intel MPI Library with Sun Grid Engine

So, you want to use Intel® MPI Library with the Sun* Grid Engine* (SGE) batch scheduler?

The below instructions describe how to run Intel MPI Library jobs using Sun Grid Engine. This document relates to Linux*. While there are some differences and additional steps when using Microsoft* Windows*, in general the procedure is the same.

All optional steps are recommended but not necessary for successful integration.

  1. [Optional] Visit and get a brief overview of SGE
  2. Installation

    See the Installation Guide from for details. Roughly, the steps are as follows:

    • Install Master Host (see ‘How to Install the MasterHost’ section);
    • Install Execution Host (see ‘How to Install ExecutionHosts’ section);
    • Register Administration Hosts (see the corresponding section in the Installation Guide);
    • Register Submit Hosts (see corresponding section);
    • Verify the installation (see corresponding section).


    • To finalize the installation process, you’ll have to configure the network services manually (by modifying /etc/services), which requires root privileges.
    • It’s possible to install/run SGE as a non-privileged user, but
      1. there are some limitations in that case;
      2. you need root privileges for the complete installation process (at least, for modifying /etc/services).
  3. Create a new Parallel Environment (PE) for Intel MPI Library
    1. Create the appropriate configuration file for the new PE. It should contain the following lines:
    2. Add the new PE using the following command:
      ‘qconf –Ap <config_file>’

    * qconf –spl – view all PEs currently available;
    * qconf –sp <PE_name> - view settings for a particular PE;
    * qconf –dp <PE_name> - remove a PE;
    * qconf –mp <PE_name> - modify an existing PE.

    Also see the ‘Managing Special Environment’ section in the Administration Guide from if you need more details about PE configuration.

  4. Associate a queue with the new PE

    Use the following commands for that:

    1. qconf –sql – to see all queues available;
    2. qconf –mq <queue_name> - to modify the queue’s settings. Find the ‘pe_list’ property in the open window and add the ‘impi’ string to that property.

    * qconf –sq <queue_name> - view the queue’s settings.

    See the Administration Guide if you need more details about the queue configuration process.

  5. Add Intel MPI Library environment to your current environment by sourcing the appropriate mpivars.[c]sh script located in the <install_dir>/bin[64] directory
  6. Build the MPI application to be run
  7. [Optional] Make sure that Intel MPI Library works fine on the desired hosts. For this, manually run your application on the desired hosts individually
  8. Submit your MPI job to SGE

    Use the following command for that:

    qsub -N <job_name> -pe impi <num_of_processes> \
    -V <mpirun_absolute_name> -r ssh -np <num_of_processes> <app_absolute_name>

    -V option is used so that all environment variables available in the current shell are exported to a job.


    USEFUL COMMANDS to monitor and control jobs:
    * qstat – show status of SGE jobs and queues;
    * qstat –j – show detailed information about jobs (can be useful for pending jobs);
    * qdel – remove existing job.
    After submitting the job you can monitor its status using the qstat command. When the job is finished, you can find the job’s output and error output in your HOME directory – just look for <job_name>.o<jobID> and <job_name>.e<jobID> files.

    See the User’s Guide, if you need more information about the job submission process.

For more complete information about compiler optimizations, see our Optimization Notice.


Tom H.'s picture

This page needs an update. For SGE 8.1.9, add the following line to the end of qconf pe configuration files:

qsort_args         NONE

Also, qsub option "-r ssh" is rejected by some SGE setups. 

Finally, I was able to get reuti_at_intel's pe config to work after adding the "qsort_args" line above using the impi version listed below. This should probably replace the older configs. 

Intel(R) MPI Library for Linux* OS, Version 2017 Build 20160721 (id: 15987)

To reduce entropy, here's the full pe config:

$ qconf -sp intel-mpi
pe_name            intel-mpi
slots              999
user_lists         NONE
xuser_lists        NONE
start_proc_args    NONE
stop_proc_args     NONE
allocation_rule    $round_robin
control_slaves     TRUE
job_is_first_task  TRUE
urgency_slots      min
accounting_summary TRUE
qsort_args         NONE


reuti_at_intel's picture

I posted the above comment when Intel MPI was still using `mpdboot` to set up the daemons and SGE lost control over them as they forked into daemon land. The mentioned Howto for this older version to keep them under SGE control can still be found at

With version 4.1 of Intel MPI they also changed to start up by Hydra and just a plain definition of a parallel environment (PE) of:

$ qconf -sp intel-mpi
pe_name intel-mpi
slots 999
user_lists NONE
xuser_lists NONE
start_proc_args NONE
stop_proc_args NONE
allocation_rule $round_robin
control_slaves TRUE
job_is_first_task TRUE
urgency_slots min
accounting_summary TRUE

will do. This PE is identical to the one which can be used with Open MPI.

Disclaimer: There is a bug in MPICH2/3 in case you defined several queues in GridEngine per exechost and it may create a wrong allocation:

anonymous's picture

These instructions will lead as a first setup to a loose integration of Intel MPI into SGE. To allow SGE to have full control of all started slave tasks and also record a correct accounting (also called a tight integration then), some additional steps are necessary, which will then make use of "control_slaves TRUE": (mpd startup method)

Add a Comment

Have a technical question? Visit our forums. Have site or software product issues? Contact support.