[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] htcondor gpu numbering



You can use $$([]) in a submit file to have an expression evaluated against the machine ad when the job is matched.  So to pass the GPU
ordinal you could do something like this

request_gpus = 1
executable = myjob.exe
# strip extract the first number from the machines AssignedGPUs attribute
arguments = -device $$([regexps("\d+",AssignedGPUs,"\0")])

Note that this technique doesn't work if your job is assigned more than 1 GPU

You may not need to do this, however.   HTCondor will automatically set the CUDA_VISIBLE_DEVICES and/or GPU_DEVICE_ORDINAL environment variables to the GPUs that are assigned to the slot.

-tj

-----Original Message-----
From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> On Behalf Of Valerio Bellizzomi
Sent: Saturday, April 6, 2019 11:00 AM
To: htcondor-users@xxxxxxxxxxx
Subject: [HTCondor-users] htcondor gpu numbering

Greetings,
I have read in the manual that gpu numbering for the variable
AssigneGPUs is or CUDAx or OCLx.

My program can get the device via a -device command line parameter,
which is an Integer starting from zero.

The question is how to strip the OCL part in order to pass the parameter
to my program via -device x.

Thanks.


_______________________________________________
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users

The archives can be found at:
https://lists.cs.wisc.edu/archive/htcondor-users/