Compiling and Job Submission - PowerPoint PPT Presentation

1 / 18
About This Presentation
Title:

Compiling and Job Submission

Description:

Copy shuf.c from /tmp/training to your scratch directory. cp /tmp/training/shuf.c . Compile ... Change directory to $SCRATCH. Copy the shuf executable from your ... – PowerPoint PPT presentation

Number of Views:19
Avg rating:3.0/5.0
Slides: 19
Provided by: nihcollabo
Category:

less

Transcript and Presenter's Notes

Title: Compiling and Job Submission


1
Compiling and Job Submission
  • Turning your source code into an executable code,
    then running it in batch mode.

2
C compiler
  • -g option for debugging
  • -X option to hardcode of Pes
  • -l to link with a library
  • -O0-3 for optimization

3
Fortran compiler
  • -g option for debugging
  • -X option to hardcode of Pes
  • -l to link with a library
  • -O0-3 for optimization

4
MPI library
  • Link with lmpi
  • Link with lelan

5
Running your program
  • To run your program in parallel you need to issue
    the prun command
  • Use N to indicate number of nodes
  • Use n to indicate number of processors
  • prun -N RMS_NODES
  • n RMS_PROCS ./a.out

6
Interactive
  • Interactive Mode
  • Used for compiling and debugging
  • Done with qsub I
  • qsub -I -q debug -l rmsnodes28
  • -l walltime3000

7
Batch
  • Batch Mode
  • Create a script
  • Submit to the queueing system
  • Available 24 hours
  • Should be used for production runs

8
Sample batch file
  • !/bin/csh
  • PBS -l walltime50000
  • PBS -l rmsnodes416
  • PBS -j oe
  • set echo
  • execute program
  • prun -N RMS_NODES -n RMS_PROCS ./a.out

9
Submit the job
  • While logged into lemieux, use the qsub command
  • qsub jobfile

10
Monitor the job
  • The qstat command displays the status of the job

11
Delete a job
  • The qdel command will delete a job
  • qdel jobid

12
Output and Error files
  • Upon completion of your batch job, you should
    receive an output and an error file

13
Typical Errors
  • cpu limit exceeded
  • Ask for more time in your batch job
  • Warning no access to tty thus no job control in
    this shell
  • Simply indicating that it is a batch request,
    ignore this message

14
Exercises
  • Login to lemieux and cd to your scratch directory
  • cd SCRATCH

15
Exercises Cont.
  • Copy shuf.c from /tmp/training to your scratch
    directory
  • cp /tmp/training/shuf.c .
  • Compile
  • cc shuf.c lmpi lelan o shuf
  • Run interactively on 4 processors
  • prun N1 n4 shuf

16
C Sample Code
  • shuf.c
  • Compile, link with the mpi library.
  • Run on 2-8 processors.
  • Passes numbers via mpi.

17
Exercises Job Submission
  • Create a job that will
  • Request 50 seconds of execution time and 2 Pes
  • Change directory to SCRATCH
  • Copy the shuf executable from your home directory
    to SCRATCH
  • Run shuf
  • Redirect the output to a file called output.shuf
  • Copy output.shuf to HOME

18
Exercises Job Submission 2
  • Submit the job
  • Check the status
  • Check the error and output files
  • Store output.shuf to far
Write a Comment
User Comments (0)
About PowerShow.com