3

Suppose my super computer has the following NODELIST's with the included features:

NODELIST      FEATURES
NodeA         (none)  
NodeB         specialfeature

and I am trying to benchmark performance using or not using the specialfeature feature. Measuring the performance of a run using specialfeature is easy. I simply call

sbatch --constraint="specialfeature" mybenchmarktest.exe

The above assures that my run happens on a node that contains the specialfeature feature (ie, node B). However, if I want to run the benchmark WITHOUT specialfeature I run in to a problem. Calling

sbatch mybenchmarktest.exe

means SLURM might run my task on NodeA or NodeB. Meaning my benchmarking might not be measuring what I want it to.

Is there a way to ensure that a process runs without a feature? I am imagining a call something like:

sbatch --contraint="!specialfeature" mybenchmarktest.exe

NOTE: In this trivial case, I know that I could just request it to run on NodeA (the node without the feature) but I'm looking for a more general way to tell SLURM "don't use such and such".

chessofnerd
  • 115
  • 6

1 Answers1

1

There is currently (as of version 15.8) no way to negate a feature in such way. The only way is to define a complementary feature in the following way:

NODELIST      FEATURES
NodeA         nospecialfeature  
NodeB         specialfeature

and then submit a job with --constraint=specialfeatures, and another one with --constraint=nospecialfeature.

If you cannot change the configuration, another option is to build manually the list of admissible hosts with a construct like the following:

sinfo -h --format "%N %f" | grep specialfeature  |\
   awk '{print $1}' | paste -d, -s | xargs scontrol show hostlist

and use the result with the --nodelist option. Feel free to combine grep's to build your list.

damienfrancois
  • 906
  • 9
  • 7