Template tutorial

Typically, your queue script probably ends in a line that starts mpirun with your target executable. In most cases, you can replace that line with AUTO_LAUNCH_TAG. For example, if your script currently has this line:

mpirun -np 16 program_name myarg1 myarg2

Create a copy of it and replace that line with:

AUTO_LAUNCH_TAG

Select this file as the Job Submission Settings ‣ Submission template file in the Options window.

Note

You no longer need to explicitly specify the number of processes, and so on. Instead, specify the number of processes, program name, and arguments in the Run window.

Enter the Submit command with the command you usually use to submit your job, such as qsub or sbatch. Use the Cancel command with the command you usually use to cancel a job, for example qdel or scancel. Use the Display command with the command you usually use to display the current queue status, such as qstat or squeue.

You can usually use (\d+) as the Regexp for job id. This just scans for a number in the output from your Submit command.

When you have a simple template working, you can go on to make more things configurable from the GUI. For example, to be able to specify the number of nodes from the GUI, you could replace an explicit number of nodes with the NUM_NODES_TAG. In this case, replace:

#SBATCH --nodes=100

With:

#SBATCH --nodes=NUM_NODE_TAG

See Queue template tags for a full list of tags.

The template script

The template script is based on the file you would typically use to submit your job. This is usually a shell script that specifies the resources needed, such as number of processes, output files, and executes mpirun, vmirun, poe or similar, with your application.

The most important difference is that job-specific variables, such as number of processes, number of nodes, and program arguments, are replaced by capitalized keyword tags, such as NUM_PROCS_TAG.

When Linaro Forge prepares your job, it replaces each of these keywords with its value and then submits the new file to your queue.

To refer to tags in comments without detecting them as a required field, the comment line must begin with ##.

Configure queue commands

When you have selected a queue template file, enter submit, display, and cancel commands.

When you start a session, Linaro Forge generates a submission file and appends its file name to the submit command you give.

For example, if you normally submit a job by typing job_submit -u myusername -f myfile, you must enter job_submit -u myusername -f as the submit command.

To cancel a job, Linaro Forge uses a regular expression that you provide to get a value for JOB_ID_TAG. This tag is found by using regular expression matching on the output from your submit command. See Job ID regular expression for details.

Configure how job size is chosen

Linaro Forge offers a number of flexible ways to specify the size of a job. You can choose whether Number of Processes and Number of Nodes options appear in the Run window, or whether these should be implicitly calculated. Similarly, you can choose to display Processes per node in the Run window, or set it to a Fixed value.

Note

If you choose to display Processes per node in the Run window and PROCS_PER_NODE_TAG is specified in the queue template file, the tag is always replaced by the Processes per node value from the Run dialog, even if the option is unselected there.

Quick restart

Linaro DDT allows you reuse an existing queued job to quickly restart a run without resubmitting it to the queue, with the requirement that your MPI implementation supports this. Select the Job Submission Options ‣ Quick Restart checkbox on the on the Options window. See Optional configuration.

When using the quick restart, your queue template file must use AUTO_LAUNCH_TAG to execute your job.

For more information on AUTO_LAUNCH_TAG, see Using AUTO_LAUNCH_TAG in Launching.