0

I'm trying to submit jobs via SLURM but include the SLURM commands via sbatch, hence with batch script. The script I've created does submit the slurm job but also includes other jobs that I'm not really sure where they are coming from (see below); specifically the .bat and .ext in the jobs. Any insights on what is going on would be appreciated.

I've created a test script with the following:

Batch Script (script.sh)

#! /bin/bash
#
#SBATCH --job-name="slurm_test"
#SBATCH --output=sbatch.out
#SBATCH --partition=xfr
#SBATCH --gres=tmpspace:2G
#SBATCH --time=00:05:00
#SBATCH --mem=2G
#SBATCH -e errlog.out
#SBATCH --mail-type=ALL
#SBATCH --mail-user=user_mail@gmail.com
#
echo "SLURM_JOBID="$SLURM_JOBID
echo "SLURM_JOB_NODELIST"=$SLURM_JOB_NODELIST
echo "SLURM_NNODES"=$SLURM_NNODES

echo "working directory = "$SLURM_SUBMIT_DIR

#
echo"Launch rsync"
echo $(hostname)
#hostname
echo $(date)
#date
#echo modulepath
echo $MODULEPATH
echo pythonpath
echo $PYTHONPATH
#dump the whole environment to a file
env >env.txt

echo "All Done!"
(base)

This is what my jobs look like:

   JobID    JobName  Partition    Account  AllocCPUS      State ExitCode
------------ ---------- ---------- ---------- ---------- ---------- --------
5402068      slurm_test        xfr    gen          2  COMPLETED      0:0
5402068.bat+      batch               gen          2  COMPLETED      0:0
5402068.ext+     extern               gen          2  COMPLETED      0:0

I am running as following:

Command Line

sbatch script.sh

I've tried in the past running as such:

sbatch --time=00:05:00 --mem=2G -p xfr -gres=tmpspace:2G -o log.out -e errlog.out --mail-type=FAIL --mail-user=user_mail@gmail.com script.sh
  • There is no relation to `batch-file` here, which is in fact related to Window's `cmd` see the actual tag information itself. – Gerhard May 11 '21 at 11:06

1 Answers1

1

Each line

5402068.bat+      batch               pmc_gen          2  COMPLETED      0:0
5402068.ext+     extern               pmc_gen          2  COMPLETED      0:0

corresponds to a job step (see this question for more information about steps and others).

Steps are normally created with the srun command, but here you are not using it. Consequently, you get the default steps:

  • batch, which corresponds to the execution of the submission script itself, and
  • extern, which is a step used by Slurm internals. It appears when PrologFlag=contain.
damienfrancois
  • 52,978
  • 9
  • 96
  • 110