Using gpus or mics on PBSPro

I’m using PBS Pro Open Source version on CentOS 6. It works fine.
Now I would like to use GPU or MIC and as described on manual I made a file resourcedef with ngpus and nmics
also I modified sched_config to contain these new resources and restart pbs services.
Also I tried to run the command
qsub -l select=1:ngpus=1
qsub -l select=1:nmics=1
but it returns an error:
qsub: Resource invalid in “select” specification: ngpus

Can you help me tosolve the error?
Thank you,
Fedele Stabile

Normally, that’s because you forgot to make that resource with the “h” flag, but that also means you should have been unable to actually initialize resources_available.ngpus on the nodes…

BTW, with this version you can also create the resources using qmgr.

Thank you alexis for your answer.
I followed the instructions on manual for gpu definition ad on a withepaper for mics…
They suggested to put a line
ngpus type=long flag=hn
in sercer_priv/resourcedef file
in qmgr i can’t see the falg with the command
list resources

setting explicitly solved the problem.
Thank you again

I think what you missed is that if you edit resourcedef, you need to restart the server to make it read it. But there’s no longer any need these days since you can indeed use qmgr to create these on the fly (and the server will then update the resourcedef file itself).