openmpi implementation is installed on Thor (1.10 version and gnu 4.9 compiler).

  • Basic use consist of the following :
    [homer@thor nbody_particle]$module add openmpi/1.10.1
    [homer@thor nbody_particle]$mpicc -o nbody_ompi nbody_pipe.c -lm
    [homer@thor nbody_particle]$mpiexec -np 10 ./nbody_ompi 30000
  • For real case with PBSPro, it's necessary to include $PBS_NODEFILE in the mpiexec command line
    #PBS -N intel_mpi_test
    #PBS -l select=3:ncpus=20:mpiprocs=20
    #PBS -l place=scatter:excl
    #PBS -l walltime=02:00:00
    #PBS -j oe
    module purge
    module load openmpi/1.10.1
    cd ${PBS_O_WORKDIR}
    NCPU=`wc -l < $PBS_NODEFILE`
    mpiexec -np $NCPU --hostfile $PBS_NODEFILE ./nbody_ompi 3000
  • Please note that mpirun automatically binds processes. Two binding patterns are used in the absence of any further directives:

- Bind to core: when the number of processes is <= 2

- Bind to socket: when the number of processes is > 2


  • man mpirun (if module openmpi is loaded )