Ticket 9236 - sbatch fails if --output/--error are specified and submitted under a directory that contains percent "%"
Summary: sbatch fails if --output/--error are specified and submitted under a director...
Status: RESOLVED INVALID
Alias: None
Product: Slurm
Classification: Unclassified
Component: User Commands (show other tickets)
Version: 20.02.2
Hardware: Linux Linux
: --- 6 - No support contract
Assignee: Jacob Jenson
QA Contact:
URL:
Depends on:
Blocks:
 
Reported: 2020-06-14 23:40 MDT by Eisuke Kawashima
Modified: 2022-02-15 23:10 MST (History)
2 users (show)

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 Eisuke Kawashima 2020-06-14 23:40:25 MDT
Hi,

If a job is submitted under a directory whose path contains one or more percent `%` characters, sbatch without `--output` and `--error` options is successful and `slurm-%j.out` is created:

$ mkdir foo%%bar
$ cd foo%%bar
$ sbatch << EOF
#!/bin/bash
EOF
Submitted batch job 1
$ ls
slurm-1.out

However, a batch job immediately exits and stdout and stderr vanish if the options are specified:

$ sbatch --output=stdout --error=stderr << EOF
#!/bin/bash
sleep 10m
EOF
Submitted batch job 2
$ squeue | awk '$1 == 2'; : the job has ended
$ ls
slurm-1.out


Best
Comment 1 Eisuke Kawashima 2020-06-15 17:37:32 MDT
So, `%%` in the SLURM_SUBMIT_DIR is converted to `%`:

$ mkdir foo%bar foo%%bar
$ cd foo%%bar
$ sbatch --output=stdout.%j --error=stderr.%j << EOF
#!/bin/bash
EOF
Submitted batch job 3
$ ls
$ ls ../foo%bar
stderr.3 stdout.3

Best