[gridengine users] [SGE-discuss] Can prolog see resource requests?
w.hay at ucl.ac.uk
Fri Jul 19 07:49:54 UTC 2013
-----BEGIN PGP SIGNED MESSAGE-----
On 18/07/13 14:09, Pacey, Mike wrote:
> Hi folks,
> I’m looking to build a GPU-card reservation subsystem into our
> local SGE setup, in order to prevent jobs grabbing more GPU cards
> than they request. Univa’s RSMAP seems to offer the functionality
> I’m after, but it looks like I can build a simple, GPU-specific
> approximation with a bit of shell scripting.
> I’m starting with the standard recipe of creating a consumable gpu
> resource/complex. The next step would be to reserve free cards on a
> host via a simple central database. The problem I’m having is that
> neither the script, the prolog nor the starter_method seem to have
> access to a job’s complex/resource request, so I can’t see how many
> cards have been reserved. It’s not available as an environment
> variable, and a trawl of $SGE_JOB_SPOOL_DIR/ shows quite a few
> files (including the promising-looking config file), but not the
> data I’m after.
> To progress, I’m currently scraping the resource request out of the
> job’s own copy of its submission script, which has at least one
> obvious drawback. Am I missing a trick here?
> Regards, Mike.
Among other things our server side JSV sets an environment variable in
the job for any resource the epilog/prolog/starter may need to
process. Not wholly without drawbacks but slightly fewer than
submission script scraping.
We also use this for GPUs. Our prolog/epilog scripts manipulate
lockfiles to determine which GPUs to allocate and chgrps the
/dev/nvidia* files to the job's additional group id to control access.
> Dr Mike Pacey, Email:
> M.Pacey at lancaster.ac.uk<mailto:M.Pacey at lancaster.ac.uk> HPC
> Manager, Phone: 01524
> 510659 Information Systems Services, Fax: 01524 594459
> ISS Building, Lancaster University, Lancaster LA1 4WA
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/
-----END PGP SIGNATURE-----
More information about the users