Child pages
  • Mox_pbs_nodefile
Skip to end of metadata
Go to start of metadata

You can get 4 nodes by below command. Here xyz is your group name.

salloc -N 4 -p xyz -A xyz --time=4:00:00 --mem=100G

Sometimes you need the list of the nodes that you have just been allocated. e.g. for Apache Spark, distributed TensorFlow etc.

In the hyak classic PBS based scheduler, below command gives a list of the nodes that are allocated to your job

cat $PBS_NODEFILE | uniq

The SLURM environment variables $SLURM_JOB_NODELIST and $SLURM_NODELIST  give you a string of the form e.g. "n[1201-1204]".

However, you can use below command to get a list of nodes:

salloc -N 4 -p xyz -A xyz --time=4:00:00 --mem=100G

scontrol show hostname > list_of_nodes

The file list_of_nodes will contain the hostnames in below format:





You can now use these nodes for your work e.g. set up a spark cluster etc.

See below for more details:





  • No labels