Deprecated: please see new documentation site.


The Intel Compilers are loaded by default, however, if you have modified your software environment, you should add the following lines to your ~/.soft file:

[user ~]$ cat ~/.soft
 +intel-cc-10.1
 +intel-fc-10.1
 +mvapich-1.01-intel10.1
 @default

And execute the command resoft:

[user ~]$ resoft 
Serial Codes MPI Codes OpenMP Codes Hybrid Codes
Fortran ifort mpif90 ifort -openmp mpif90 -openmp
C icc mpicc icc -openmp mpicc -openmp
C++ icpc mpiCC icpc -openmp mpiCC -openmp

Example MPI Programs

Show MPI Hello World C Program


Show MPI Hello World Fortran Program

Submitting Mvapich1 Jobs

Most jobs can be executed using the MPI-1 standard. To see which version of MPI you are using, execute:

$ which mpirun
/usr/local/packages/mvapich1-0.98-intel10.1/bin/mpirun

If the return contains mvapich1 then you will be using the MPI-1 standard.

Interactive Jobs

Interactive jobs can be started by executing:

[user@machine]$ qsub -I -l nodes=2:ppn=4 -l walltime=00:10:00
[user@machine]$ cd /path/to/your/executable
[user@machine]$ mpirun -np 8 ./program.ex

Batch Jobs

For MPI-1 Jobs using the following script:

[user@qmachine] cat script
#!/bin/bash
# the queue to be used.
#PBS -q checkpt 

# specify your project allocation
#PBS -A CHANGE_TO_YOUR_ALLOCATION 

# number of nodes and number of processors on each node to be used. 
# Set ppn to 8 for QB, and 4 for all other x86s.
#PBS -l nodes=4:ppn=4 

# requested Wall-clock time. HOURS::MINUTES::SECONDS
#PBS -l walltime=00:15:00 

# name of the standard out file to be "output-file".
#PBS -o myoutput2 

# standard error output merge to the standard output file.
#PBS -j oe 

# name of the job (that will appear on executing the qstat command).
#PBS -N MPI1_JOB

cd $PBS_O_WORKDIR #change to the working directory
export NPROCS=`wc -l $PBS_NODEFILE |gawk '//{print $1}'`
mpirun -np $NPROCS /path/to/your_executable

Submit the job by executing:

[user@machine]$ qsub script
Powered by MediaWiki