Commit ccc8887d authored by Stephen Trofinoff's avatar Stephen Trofinoff Committed by Morris Jette
Browse files

Add accounting of GRES requested, allocated, and used.

Code improvements for recording GRES use:

The xmalloc() function initialized everything to zero. There is no need for
a call to memset() afterwards.
The xfree() function tests for a NULl arguments and does nothing in that case.
There is no need for an "if" test before calling xfree().
There is an xrealloc() function available that eliminates the need for saving
and restoring values.
I made some formatting changes to comply with the Linux kernel coding standard,
mostly related to lines over 80 characters long.
JobID and some other fields should be formatted using "%u" rather than "%d"
to avoid negative job ID's being logged.
I added tests of buffer sizes in a couple of places to avoid possibly going
off the end of a buffer.
Code for the function gres_get_value_by_type() was missing from the patches.

Gres accounting modifications

Fix memory leak, avoid xstrdup().
Bump the rpc_version number in for the slurmdbd.
Break up some long lines.

gres accounting: save/restore job gres requested/allocated info, get job counts properly

gres accounting: updates based upon email from Steve Trofinoff, 31 July`

gres accounting: remove job gres_res and just replace gres
parent a911fbbd
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment