1 / 18

Compiling and Job Submission

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

albert
Download Presentation

Compiling and Job Submission

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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 • -O[0-3] for optimization

  3. Fortran compiler • -g option for debugging • -X option to hardcode # of Pes • -l to link with a library • -O[0-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 rmsnodes=2:8 -l walltime=30:00

  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 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

  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

More Related