Hi folks,

Warning: I am a sysadmin, not a programmer. :-)

I've given up trying to track the ever changing reason codes in Slurm
versions and instead use the slurm_job_reason_string() function to
return a reason that seems to be exported to callers:

samuel@haswell:~/Code/Slurm$ git grep slurm_job_reason_string
contribs/perlapi/libslurm/perl/Slurm.xs:slurm_job_reason_string(slurm_t self, 
uint32_t inx)
contribs/perlapi/libslurm/perl/Slurm.xs:                RETVAL = 
slurm_job_reason_string(inx);
contribs/perlapi/libslurm/perl/slurm-perl.h:extern char 
*slurm_job_reason_string(enum job_state_reason inx);
src/common/slurm_protocol_defs.c:strong_alias(job_reason_string, 
slurm_job_reason_string);
src/common/slurm_xlator.h:#define job_reason_string     slurm_job_reason_string

However, adding a call to that function to the slurm_showq code
just results in:

g++  -g -O2  -L/usr/local/slurm/latest/lib  -o showq slurm_showq.o main.o 
-lslurm
slurm_showq.o: In function `Slurm_Showq::query_running_jobs()':
/vlsci/VLSCI/samuel/Code/slurm_showq/slurm_showq.cpp:487: undefined reference 
to `slurm_job_reason_string(job_state_reason)'
/vlsci/VLSCI/samuel/Code/slurm_showq/slurm_showq.cpp:588: undefined reference 
to `slurm_job_reason_string(job_state_reason)'
collect2: ld returned 1 exit status

Which is really odd as the code already calls into the Slurm libraries
for other functions such as slurm_hostlist_create(), etc.

Any ideas?

All the best,
Chris
-- 
 Christopher Samuel        Senior Systems Administrator
 VLSCI - Victorian Life Sciences Computation Initiative
 Email: [email protected] Phone: +61 (0)3 903 55545
 http://www.vlsci.org.au/      http://twitter.com/vlsci

Reply via email to