Add exit when GPU not found
This commit is contained in:
parent
facfc13132
commit
5adf6cbac6
@ -35,6 +35,9 @@ def node_worker(args):
|
|||||||
|
|
||||||
node = int(os.environ['SLURM_NODEID'])
|
node = int(os.environ['SLURM_NODEID'])
|
||||||
|
|
||||||
|
if args.gpus_per_node < 1:
|
||||||
|
raise RuntimeError('GPU not found on node {}'.format(node))
|
||||||
|
|
||||||
spawn(gpu_worker, args=(node, args), nprocs=args.gpus_per_node)
|
spawn(gpu_worker, args=(node, args), nprocs=args.gpus_per_node)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user