Cbb/Baobab: Difference between revisions

From Computer Science Wiki
Jump to navigation Jump to search
Rhunter (talk | contribs)
No edit summary
Rhunter (talk | contribs)
No edit summary
Line 6: Line 6:


Before submitting your jobs you need a PBS submission script
Before submitting your jobs you need a PBS submission script
Test MPI program:
<PRE>
/******************************************************************************
* * FILE: mpi_hello.c
* * DESCRIPTION:
* *  MPI tutorial example code: Simple hello world program
* * AUTHOR: Blaise Barney
* * LAST REVISED: 03/05/10
* ******************************************************************************/
#include "mpi.h"
#include <stdio.h>
#include <stdlib.h>
#define  MASTER        0
int main (int argc, char *argv[])
{
int  numtasks, taskid, len;
char hostname[MPI_MAX_PROCESSOR_NAME];
MPI_Init(&argc, &argv);
MPI_Comm_size(MPI_COMM_WORLD, &numtasks);
MPI_Comm_rank(MPI_COMM_WORLD,&taskid);
MPI_Get_processor_name(hostname, &len);
printf ("Hello from task %d on %s!\n", taskid, hostname);
if (taskid == MASTER)
  printf("MASTER: Number of MPI tasks is: %d\n",numtasks);
MPI_Finalize();
}
</PRE>


Example PBS script:
Example PBS script:
Line 48: Line 18:
## Main execution
## Main execution
echo "Job Started at: `date`"
echo "Job Started at: `date`"
mpiexec -np $NO_OF_CORES -machinefile $PBS_NODEFILE hello2
mpiexec -np $NO_OF_CORES -machinefile $PBS_NODEFILE hello
echo "Job Ended at: `date`"
echo "Job Ended at: `date`"
</PRE>
</PRE>
Line 66: Line 36:
qdel <Job_Number/Identifier>
qdel <Job_Number/Identifier>
</PRE>
</PRE>
For an example program look here: https://wiki.cs.vt.edu/Cbb/Baobab/example

Revision as of 13:52, 6 November 2014

The Baobab Cluster

CBB's internal cluster.

The new cluster is made up of 6 nodes with 24 cores and 64 GB RAM on each node.

Before submitting your jobs you need a PBS submission script

Example PBS script:

#PBS -l nodes=6:ppn=24,walltime=00:01:00
module add openmpi-x86_64
########################################
cd $PBS_O_WORKDIR
## How many cores total do we have?
NO_OF_CORES=`cat $PBS_NODEFILE | egrep -v '^#'\|'^$' | wc -l | awk '{print $1}'`
##
## Main execution
echo "Job Started at: `date`"
mpiexec -np $NO_OF_CORES -machinefile $PBS_NODEFILE hello
echo "Job Ended at: `date`"

To submit the jobs to the cluster from the headnode:

qsub <yoursPBSscript>

To check the status of your jobs:

qstat -a

To delete your jobs from the queue:

qdel <Job_Number/Identifier>

For an example program look here: https://wiki.cs.vt.edu/Cbb/Baobab/example