Running multi-threaded code

Here are examples of how to specify number of CPU for the job.


  • Submitting a one CPU Job

This is how you can request one CPU to run the job. Or use the default value of one (when no CPU tag is specified).

PROJECT: MyProject
TRACK: MyTrack
JOBNAME: MyJob
CPU: 1
COMMAND: ls -alF > file.out
PROJECT: MyProject
TRACK: MyTrack
JOBNAME: MyJob
COMMAND: ls -alF > file.out
  • Submitting multi-thread Job

This is how you can request more than one CPU core to run the job (using CPU tag to request number of core).

PROJECT: MyProject
TRACK: MyTrack
JOBNAME: MyJob
CPU: 4
COMMAND: ls -alF > file.out

The XML version of this script looks like:

<Request>
  <Email email="user@jlab.org" request="false" job="true"/>
  <Project name="MyProject"/>
  <Track name="MyTrack"/>
  <Name name="MyJob"/>
  <CPU core="4"/>
  <Command><![CDATA[
    ls -alF > file.out
  ]]></Command>
</Request>