Locked History Actions

Diff for "InfolabClusterComputeHowtoMpi"

Differences between revisions 1 and 2
Revision 1 as of 2012-10-17 02:40:16
Size: 744
Editor: akrevl
Comment:
Revision 2 as of 2012-10-17 02:45:14
Size: 858
Editor: akrevl
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
Describe InfolabClusterComputeHowtoMpi here. 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.
Line 3: Line 3:
= The submission script =
Line 4: Line 5:

Here is an example of a bit more complex script to run an MPI job (copied from http://csc.cnsi.ucsb.edu/docs/running-jobs-torque):

{{{
#!/bin/sh
{{{!#highlight bash
#!/bin/bash

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

{{{!#highlight bash #!/bin/bash #PBS -l nodes=2:ppn=4

# Make sure that we are in the same subdirectory as where the qsub command # is issued. cd $PBS_O_WORKDIR

# make a list of allocated nodes(cores) cat $PBS_NODEFILE > nodes

# How many cores total do we have? NO_OF_CORES=cat $PBS_NODEFILE | egrep -v '^#'\|'^$' | wc -l | awk '{print $1}' NODE_LIST=cat $PBS_NODEFILE 

# Just for kicks, see which nodes we got. echo $NODE_LIST

# Run the executable. *DO NOT PUT* a '&' at the end!! mpirun -np $NO_OF_CORES -machinefile nodes ./pi3 >& log }}}