NCAR / mpibind

MPI binding utilities
MIT License
1 stars 1 forks source link

mpibind hangs when run on a login node #6

Closed hkershaw-brown closed 3 days ago

hkershaw-brown commented 1 month ago

Running mpibind to get the usage options:

$ mpibind

on a login node, causes a hang.

On a compute node, the expected behavior (printing the usage) happens:

$ mpibind
usage: numactl [--all | -a] [--balancing | -b] [--interleave= | -i <nodes>]
               [--preferred= | -p <node>] [--physcpubind= | -C <cpus>]
               [--cpunodebind= | -N <nodes>] [--membind= | -m <nodes>]
               [--localalloc | -l] command args ...
       numactl [--show | -s]
...

The hang I believe is this line: https://github.com/NCAR/mpibind/blob/6f4ed781d600519d158095a5dfaa48ba5425dae5/mpibind#L7

wc -l of an unset variable.

It would be good to check whether $PBS_ENVIRONMENT is set, if not set print the usage and exit

roryck commented 3 days ago

Thanks for this report. I added a check so mpibind on a login node will print Error: PBS_NODEFILE is not set. mpibind expects to be run in a PBS job. and mpibind -h on a login node will give the usage message.

roryck commented 3 days ago

Closing as resolved.