Every spank_qrmi.so build embeds version information directly into the binary, so you can check it on a running Slurm node without executing the plugin or restarting slurmd.
$ strings /path/to/spank_qrmi.so | grep SPANK_QRMI
SPANK_QRMI_BUILD_VERSION=0.11.0;SPANK_QRMI_GIT_HASH=0dac1793b013
$ readelf -p .version_info /path/to/spank_qrmi.so
String dump of section '.version_info':
[ 0] SPANK_QRMI_BUILD_VERSION=0.11.0;SPANK_QRMI_GIT_HASH=0dac1793b013
| Field | Meaning |
|---|---|
SPANK_QRMI_BUILD_VERSION |
Version of this plugin (spank_qrmi), taken from the project(spank_qrmi VERSION x.y.z ...) declaration in CMakeLists.txt at build time. |
SPANK_QRMI_GIT_HASH |
The exact git commit of the spank-plugins repo this build came from, resolved via git rev-parse --short=12 HEAD at build time. |
This is especially useful when diagnosing issues caused by a version mismatch between the deployed spank_qrmi.so and the QRMI Python package used by client workloads — you can confirm exactly what's on disk without needing to rebuild or trace through job logs.
QRMI embeds its own version/git-hash marker into the same .version_info section via its own crate, so it shows up alongside spank_qrmi's marker in the same linked .so:
$ strings spank_qrmi.so | grep -E "SPANK_QRMI|QRMI_BUILD"
SPANK_QRMI_BUILD_VERSION=0.11.0;SPANK_QRMI_GIT_HASH=0dac1793b013
QRMI_BUILD_VERSION:0.24.0;QRMI_GIT_HASH:0dac1793b013
The two are independent: SPANK_QRMI_* describes this plugin binary itself, QRMI_BUILD_VERSION/GIT_HASH describes the QRMI crate it was linked against. See QRMI's own FAQ for details on the latter.
- If
SPANK_QRMI_GIT_HASHshowsunknown, the build most likely happened outside a git checkout (e.g. a tarball/zip export of the repo with no.gitdirectory). - If neither
stringsnorreadelfshow a.version_infosection, the binary may have been built before this feature was introduced, or the section may have been removed by a fullstrip -spass in the deployment pipeline. Re-runstrip --strip-debuginstead, or add--keep-section=.version_infoto thestrip/objcopyinvocation, to preserve it. SPANK_QRMI_BUILD_VERSIONneeds to be bumped by hand in theproject(... VERSION x.y.z)line inCMakeLists.txtas part of a release PR; it isn't derived from git tags.