Upload page content

You can upload content for the page named below. If you change the page name, you can also upload content for another page. If the page name is empty, we derive the page name from the file name.

File to load page content from
Page name
Comment

Locked History Actions

InfolabClusterComputeHowtoMpi

This HOWTO describes how to run an MPI job on the cluster. Wikipedia would call this article a stub. As I have very little experience with running MPI jobs, I am more or less pasting the script from http://csc.cnsi.ucsb.edu/docs/running-jobs-torque.

The submission script

   1 #!/bin/bash
   2 #PBS -l nodes=2:ppn=4
   3 
   4 # Make sure that we are in the same subdirectory as where the qsub command 
   5 # is issued. 
   6 cd $PBS_O_WORKDIR 
   7 
   8 #  make a list of allocated nodes(cores)
   9 cat $PBS_NODEFILE > nodes
  10 
  11 # How many cores total do we have?
  12 NO_OF_CORES=`cat $PBS_NODEFILE | egrep -v '^#'\|'^$' | wc -l | awk '{print $1}'`
  13 NODE_LIST=`cat $PBS_NODEFILE `
  14 
  15 # Just for kicks, see which nodes we got.
  16 echo $NODE_LIST
  17 
  18 # Run the executable. *DO NOT PUT* a '&' at the end!!
  19 mpirun -np $NO_OF_CORES -machinefile nodes ./pi3 >& log