A tutorial of running MPI job on Eddie
Step 1. Login to Eddie and set environment by adding exist modules
$ ssh eddie.ecdf.ed.ac.uk $ module add lam/gcc
Step 2. Build MPI codes
$ cd /home/ywan/mpi_test/hello $ mpicc -o hello hello.c
Step 3. Write a SGE job script
hello.sh
#!/bin/sh ################################################### # # # A SGE batch job template for ECDF Cluster eddie # # # # by ECDF System Team # # ecdf-systems-team@lists.ed.ac.uk # # # ################################################### # Grid Engine options #$ -cwd #$ -l h_rt=00:05:00 #$ -N hello # initialise environment module . /etc/profile # use LAM/MPI with Intel (icc,ifort) Compiler #module add intel/cce #module add intel/fce #module add lam/intel # use LAM/MPI with GNU (gcc,g++,g77,gfortran) Compiler module add lam/gcc mpirun -np $NSLOTS ./hello
Step 4. Submit job to Grid Engine
$ qsub -pe lam 8 ./hello.sh