Ticket 3508 - sbatch --output expands path options (%) in cwd leading to job failure
Summary: sbatch --output expands path options (%) in cwd leading to job failure
Status: RESOLVED TIMEDOUT
Alias: None
Product: Slurm
Classification: Unclassified
Component: slurmd (show other tickets)
Version: 15.08.12
Hardware: Linux Linux
: --- 6 - No support contract
Assignee: Jacob Jenson
QA Contact:
URL:
Depends on:
Blocks:
 
Reported: 2017-02-27 08:16 MST by Jens Svalgaard Kohrt, SDU
Modified: 2017-11-09 13:53 MST (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this ticket.
Description Jens Svalgaard Kohrt, SDU 2017-02-27 08:16:47 MST
If a job is submitted in a directory name with %, e.g., %u, --output expands this leading to a job that does not start (except if the diretory named with the path expansion happen to be there).

Test case:
sysop@fe1:~/test/percent-issue/test-%u$ find .. -type f
../test-%u/test.sh
sysop@fe1:~/test/percent-issue/test-%u$ cat test.sh
#! /bin/bash
#SBATCH --output out.out
date
sysop@fe1:~/test/percent-issue/test-%u$ sbatch -t 5 test.sh
Submitted batch job 702039

Expected result:
The output ends up in the file out.out in the current directory (test-%u).

Actual result:
The output ends up in the file out.out in the %-expanded directory (test-sysop).
If the path option expanded directory does not exist, the job fails immediately.

sysop@fe1:~/test/percent-issue/test-%u$ find .. -type f
../test-%u/test.sh
../test-sysop/out.out


Fix:
As far as I can see, this can be fixed by simply prepending cwd *after* expanding the path options in fname_create in
/src/slurmd/common/fname.c
Comment 1 Jacob Jenson 2017-11-09 13:53:11 MST
15.08 is no longer a supported version. If this is in an issue in 17.02 or 17.11 please let me know and we can discuss support contract options which will enable you to work with the support team to resolve this issue.

Jacob