You are here: System Administration > Run Nitro Without a Scheduler

3.4 Run Nitro Without a Scheduler

Nitro works well running as a job invoked via a scheduler and/or resource manager.

However, if you have a set of nodes that are dedicated to high-throughput computing and would like to run Nitro jobs on these machines, or have Nitro always waiting (ready to run tasks at any time), you can run Nitro without the use of a scheduler.

This topic explains how to run Nitro without the use of a scheduler (also referred to Nitro standalone).

In this topic:

3.4.1 Selecting a Job ID

Since you do not have a scheduler to supply a job ID, Nitro will create a default job ID based on the current date and time in the format "YYYMMDDHHMMSS". Since the workers and coordinator will be started separately, it is recommended that you designate a job ID and set the "‑‑job‑id <job id>" command line option on the worker and coordinator command lines with that job ID. Setting the job ID provides consistency between the workers and the coordinator when referencing the job; for example, when viewing job output and log files.

3.4.2 Starting Workers

You must start a worker on each node you want to execute Nitro tasks by starting it manually on a terminal on that node, or by running a remote command through ssh.

A worker command line must include an "‑‑coord" argument that lists the node's host name and port number (if other than default port "47000") of the coordinator.

When each worker connects to the coordinator, it identifies itself using the ‑‑name option. If ‑‑name is not supplied, the worker's identification is the worker node's host name.

The name supplied to the coordinator via ‑‑workers or ‑‑workers‑file must match the ‑‑name argument specified on the worker’s command line.

For example, if you have the coordinator running on node "node001" and a worker running on node "node002", then the command line to start the worker would look like the following:

/opt/nitro/bin/nitro --mode=worker --job-id MyJob01 --coord node001 --name node002

Alternately, to run the worker using ssh (assuming ssh keys have been exchanged between the coordinator and worker), it would look like the following:

ssh user@node002 '/opt/nitro/bin/nitro --mode=worker --job-id MyJob01 --coord node001 --name node002'

3.4.3 Starting the Coordinator

The coordinator requires either a list of worker names or a session key that workers will use to attach to the coordinator. When supplying a list of worker names, these workers will be the only workers authorized to connect to the coordinator and receive workload assignments. If you specify a session key, any worker with the session key will be able to attach and receive workload.

Using Worker Names

A list of worker names can be specified on the command line, with worker names separated by the plus symbol (+). For example:

/opt/nitro/bin/nitro --mode=coord --job-id MyJob01 --workers node002+node003+node004+node005 ~/taskfile.txt

Alternately if it is a large list, it may be written to a file with one name per line, where the name is what the worker identifies itself as to the coordinator. For example:

echo -e "node001\nnode002\nnode003\nnode004\nnode005" > nodelist.txt
/opt/nitro/bin/nitro mode=coord --job-id MyJob01 --workers-file nodelist.txt ~/taskfile.txt

node node001 is the coordinator and nodes node002-node005 are workers.

Using a Session Key

To start the coordinator with a session key, use the ‑‑key <keyvalue> or ‑‑key‑file <file> command line option instead of the ‑‑workers or ‑‑workers‑file command line options. Any worker that is started with the ‑‑key command line option with the correct <keyvalue> will be able to attach to the coordinator. For example:

/opt/nitro/bin/nitro --mode=worker --coord node01 --job-id MyJob01 --key password1234
/opt/nitro/bin/nitro --mode=coord --name=node01 --job-id MyJob01 --key password1234 ~/taskfile.txt

3.4.4 (Optional) Changing the Job Directory

The default job directory (the location to which Nitro will write the job and task log files) is $HOME/nitro/<job id>.

If you want to store results in a different directory, use the "‑‑job‑dir" command line option on both the coordinator and workers.

Related Topics 

© 2017 Adaptive Computing