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

Re: [HTCondor-users] htcondor gpu numbering



Hello, my program uses only one gpu, so this solution is okay.

Thanks,
Valerio


On Tue, 2019-04-09 at 21:30 +0000, Michael Pelletier wrote:
> That is to say, the -device gpu:0 will always map to the first GPU which was assigned by HTCondor to the job.
> 
> Michael V. Pelletier
> Information Technology
> Digital Transformation & Innovation
> Integrated Defense Systems
> Raytheon Company
> 
> -----Original Message-----
> From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> On Behalf Of John M Knoeller
> Sent: Monday, April 8, 2019 12:41 PM
> To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx>
> Subject: [External] 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/
> 
> _______________________________________________
> 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/
> 
> _______________________________________________
> 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/