Lesson 12

Date: 4/21/2010
Computational clusters
Linux for Engineering and IT applications


Run jobs in SGE

  • Customize a submit script : openmpi.sh ,
    #!/bin/bash
    
    # Define parallel environment (ompi) and the number of CPUs (2)
    #$ -pe ompi 4
    
    # Specify the job name in the queue system
    #$ -N MPI_Job
    
    # Start the script in the current working directory
    #$ -cwd
    
    # Specify where standard output and error are stored
    #$ -o MPI-stdo.output
    #$ -e MPI-stderr.output
    
    # Put the name of your compiled MPI file
    myjob=ex3.x
    
    export PATH=/usr/local/openmpi/bin:$PATH
    export LD_LIBRARY_PATH=/usr/local/openmpi/lib:$LD_LIBRARY_PATH
    
    mpiexec -n $NSLOTS $myjob 
    

  • Submit the script to the queue system
    qsub openmpi.sh
    

  • Monitor the status with command
    qstat
    



  • Take me to the Course Website