Ticket 4912 - spank_option_getopt returns ESPANK_ERROR in slurm_spank_user_init
Summary: spank_option_getopt returns ESPANK_ERROR in slurm_spank_user_init
Status: RESOLVED INVALID
Alias: None
Product: Slurm
Classification: Unclassified
Component: Other (show other tickets)
Version: 17.11.2
Hardware: Linux Linux
: 6 - No support contract
Assignee: Jacob Jenson
QA Contact:
URL:
Depends on:
Blocks:
 
Reported: 2018-03-13 12:43 MDT by joshua.weage
Modified: 2018-03-13 12:43 MDT (History)
0 users

See Also:
Site: -Other-
Slinky Site: ---
Alineos Sites: ---
Atos/Eviden Sites: ---
Confidential Site: ---
Coreweave sites: ---
Cray Sites: ---
DS9 clusters: ---
Google sites: ---
HPCnow Sites: ---
HPE Sites: ---
IBM Sites: ---
NOAA SIte: ---
NoveTech Sites: ---
Nvidia HWinf-CS Sites: ---
OCF Sites: ---
Recursion Pharma Sites: ---
SFW Sites: ---
SNIC sites: ---
Tzag Elita Sites: ---
Linux Distro: ---
Machine Name:
CLE Version:
Version Fixed:
Target Release: ---
DevPrio: ---
Emory-Cloud Sites: ---


Attachments
Sample plugin replicating the error (5.18 KB, text/plain)
2018-03-13 12:43 MDT, joshua.weage
Details

Note You need to log in before you can comment on or make changes to this ticket.
Description joshua.weage 2018-03-13 12:43:04 MDT
Created attachment 6364 [details]
Sample plugin replicating the error

The spank_option_getopt function does not appear to work correctly from slurm_spank_user_init(). It returns ESPANK_ERROR even though the option was set via sbatch. I have to use a global variable via the option callback to get access to the user supplied option.

Sample plugin code is attached.

Example output:

[2018-03-13T13:40:36.000] debug: slurm_spank_job_prolog start
[2018-03-13T13:40:36.000] debug: slurm_spank_job_prolog got debug option value 1000
[2018-03-13T13:40:36.000] debug: slurm_spank_job_prolog complete
[2018-03-13T13:40:36.046] _run_prolog: run job script took usec=54914
[2018-03-13T13:40:36.049] _run_prolog: prolog with lock for job 162 ran for 1 seconds
[2018-03-13T13:40:36.050] Launching batch job 162 for UID 1001
[2018-03-13T13:40:36.148] [162.batch] debug: _debug_opt_process S_CTX_REMOTE
[2018-03-13T13:40:36.149] [162.batch] debug: valid option --debug=1000
[2018-03-13T13:40:36.150] [162.batch] debug: slurm_spank_user_init start
[2018-03-13T13:40:36.150] [162.batch] debug: slurm_spank_user_init S_CTX_REMOTE
[2018-03-13T13:40:36.150] [162.batch] debug: slurm_spank_user_init S_JOB_ID 162
[2018-03-13T13:40:36.150] [162.batch] debug: slurm_spank_user_init S_JOB_STEPID 4294967294
[2018-03-13T13:40:36.150] [162.batch] debug: slurm_spank_user_init debug_option ESPANK_ERROR
[2018-03-13T13:40:36.150] [162.batch] debug: slurm_spank_user_init got _debug value 1000
[2018-03-13T13:40:36.150] [162.batch] debug: slurm_spank_user_init complete
[2018-03-13T13:40:36.187] [162.batch] sending REQUEST_COMPLETE_BATCH_SCRIPT, error:0 status 0
[2018-03-13T13:40:36.190] [162.batch] done with job
[2018-03-13T13:40:36.198] debug: slurm_spank_job_epilog start
[2018-03-13T13:40:36.198] debug: slurm_spank_job_epilog complete