Download User Manual - Support
Transcript
5.1 Writing a Job Script [-S path_list] [-t task_id_range] [-terse] [-v variable_list] [-verify] [-V] [-w e|w|n|v] [-@ file] 15 command interpreter to be used create a job-array with these tasks tersed output, print only the job-id export these environment variables do not submit just verify export all environment variables verify mode (error|warning|none|just verify) for jobs Single node example script An example script for SGE. #!/bin/sh #$ -N sleep #$ -S /bin/sh # Make sure that the .e and .o file arrive in the # working directory #$ -cwd #Merge the standard out and standard error to one file #$ -j y sleep 60 echo Now it is: `date` Parallel example script For parallel jobs you will need the pe environment assigned to the script. Depending on the interconnect, you might have the choice between a number of parallel environments such as MPICH (ethernet) or MVAPICH (InfiniBand). #!/bin/sh # # Your job name #$ -N My_Job # # Use current working directory #$ -cwd # # Join stdout and stderr #$ -j y # # pe (Parallel environment) request. Set your number of processors here. #$ -pe mpich NUMBER_OF_CPUS # # Run job through bash shell #$ -S /bin/bash # If modules are needed, source modules environment: . /etc/profile.d/modules.sh # Add any modules you might require: module add shared # The following output will show in the output file. Used for debugging. echo ``Got $NSLOTS processors.'' © Bright Computing, Inc.