compiling and job submission l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Compiling and Job Submission PowerPoint Presentation
Download Presentation
Compiling and Job Submission

Loading in 2 Seconds...

play fullscreen
1 / 18

Compiling and Job Submission - PowerPoint PPT Presentation


  • 328 Views
  • Uploaded on

Compiling and Job Submission Turning your source code into an executable code, then running it in batch mode. C compiler -g option for debugging -X option to hardcode # of Pes -l to link with a library -O[0-3] for optimization Fortran compiler -g option for debugging

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Compiling and Job Submission' - albert


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
compiling and job submission

Compiling and Job Submission

Turning your source code into an executable code, then running it in batch mode.

c compiler
C compiler
  • -g option for debugging
  • -X option to hardcode # of Pes
  • -l to link with a library
  • -O[0-3] for optimization
fortran compiler
Fortran compiler
  • -g option for debugging
  • -X option to hardcode # of Pes
  • -l to link with a library
  • -O[0-3] for optimization
mpi library
MPI library
  • Link with –lmpi
  • Link with –lelan
running your program
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

interactive
Interactive
  • Interactive Mode
    • Used for compiling and debugging
    • Done with qsub –I
    • qsub -I -q debug -l rmsnodes=2:8

-l walltime=30:00

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

#!/bin/csh

#PBS -l walltime=5:00:00

#PBS -l rmsnodes=4:16

#PBS -j oe

set echo

# execute program

prun -N ${RMS_NODES} -n ${RMS_PROCS} ./a.out

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

qsub jobfile

monitor the job
Monitor the job
  • The qstat command displays the status of the job
delete a job
Delete a job
  • The qdel command will delete a job
    • qdel jobid
output and error files
Output and Error files
  • Upon completion of your batch job, you should receive an output and an error file
typical errors
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
exercises
Exercises
  • Login to lemieux and cd to your scratch directory
    • cd $SCRATCH
exercises cont
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
c sample code
C Sample Code
  • shuf.c
    • Compile, link with the mpi library.
    • Run on 2-8 processors.
    • Passes numbers via mpi.
exercises job submission
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
exercises job submission 2
Exercises – Job Submission 2
  • Submit the job
  • Check the status
  • Check the error and output files
  • Store output.shuf to far