<div dir="ltr">I run this sbatch script from the controller:<br><br>=======================<br>#!/bin/bash<br>#SBATCH --job-name=test_job<br>#SBATCH --mail-type=NONE    # Mail events (NONE, BEGIN, END, FAIL, ALL)<br>#SBATCH --ntasks=1<br>#SBATCH --mem=1gb<br>#SBATCH --time=00:05:00     # Time limit hrs:min:sec<br>#SBATCH --output=test_job_%j.log   # Standard output and error log<br><br>pwd; hostname; date<br>=======================<br><br><br>The node gets the directory that sbatch was executed from on the controller and tries to write the output file to that directory, which doesn't exist on the node.  The node slurmd.log shows this error:<br><br>2020-01-21T11:25:36.389] [7.batch] error: Could not open stdout file /home/dean/src/slurm.example.scripts/serial_test_7.log: No such file or directory<br><br><br>If I change the sbatch script --output to a fully qualified directory that exists on the node<br><br>    --output=/home/nodeuser/serial_test_%j.log<br><br>the output file is written to that directory, but it includes this error showing that the slurm node is trying to execute the job in the directory that sbatch was run from on the controller:<br><br>slurmstepd: error: couldn't chdir to `/home/dean/src/slurm.example.scripts': No such file or directory: going to /tmp instead<br><br><br>The sbatch docs say nothing about why the node gets the pwd from the controller.  Why would slurm send a directory to a node that may not exist on the node and expect it to use it?<div><br></div><div>What's the right way to specify the --output directory in an sbatch script?</div><div><br></div><div>Thanks.<br><br><br><br></div></div>