(Click to open topic with navigation)
This topic provides information about the different job scripts, including customization options (where applicable).
In this topic
The nitro_job.sh script is located in the /opt/nitro/etc/ directory.
Typically the nitro_job.sh script is customized by the system administrator and executed by the nitrosub command. This job script is used for static jobs, if resources are not in a range. For dynamic jobs, it sets up the initial resource request (minimum resource value in the range).
Alternatively, the system administrators can modify the nitro_job.sh script and then have authorized users copy and customize the script for their task file. This script is then executed using the resource manager's job submission command (for example, Torque's qsub). This functionality is similar to the Nitro functionality prior to version 2.1.
The nitro_job.sh script:
In the nitro_job.sh script, you can also customize the launch_nitro.sh script.
Unless you are restarting a job that partially completed and was canceled, you don't need to set this environment variable. If you specify this environment variable in the job's submission, it will override the resource manager job ID and Nitro will use the value you supplied.
If your job scheduler and resource manager use different numbering systems, the job ID that Nitro will use is the one that it gets from the resource manager. You may want to submit the job directly to the resource manager in this case to avoid confusion. Check with your system administrator to find out if your job scheduler's and resource manager's job ids are synchronized.
The worker_job.sh script is located in the /opt/nitro/etc/ directory.
The worker_job.sh script is executed only by the nitrosub command. This job script is used for the dynamic portion of dynamic jobs (resources after the initial request up to the maximum value).
5.4.3 Moab/Torque Customization Commands and Options
If using Moab/Torque, be aware of the following:
Example: Setting Environment Variables at Job Submission
The "-v" option in Moab's msub command sets environment variables before calling the user job script. The user job script inherits these environment variables.
The user job script can add to or overwrite any environment variable defined in msub's "-v" option.
This script must exist on the node where you execute the msub command. In this example, this user job script exists in jdoe's home directory.
exec /opt/nitro/bin/launch_nitro.sh
msub -lnodes=5 -ltpn=1 -lwalltime=600 -v "NITRO_TASK_FILE=/home/jdoe/nitro/monte_sim.txt,NITRO_OPTIONS=--job-dir /home/jdoe/monte01,NITRO_COORD_OPTIONS=--run-local-worker" /home/jdoe/user_job_script.sh
Example: Setting Environment Variables In the User Job Script
User job script (/home/jdoe/user_job_script.sh)
This script must exist on the node where you execute the msub command. In this example, this user job script exists in jdoe's home directory.
NITRO_TASK_FILE=/home/jdoe/nitro/monte_sim.txt NITRO_OPTIONS="--job-dir /home/jdoe/monte01" NITRO_COORD_OPTIONS=--run-local-worker exec /opt/nitro/bin/launch_nitro.sh
msub -lnodes=5 -ltpn=1 -lwalltime=600 /home/jdoe/user_job_script.sh
NITRO_TASK_FILE, NITRO_OPTIONS and NITRO_COORD_OPTIONS are set in the user job script.
Related Topics