Problem launching Python job on Baobab

Primary informations

Username: avilamar
Cluster: Baobab

Description

I want to submit a Python job on Baobab using a batch file and the command sbatch, but I get the following error:

Running main.py on cpu001.baobab
slurmstepd: error: execve(): Python: No such file or directory
srun: error: cpu001: task 0: Exited with exit code 2

Steps to Reproduce

My batch file is called main.sh and contains:

#!/bin/bash

#SBATCH --mem=3G
#SBATCH --cpus-per-task=1
#SBATCH --ntasks=1
#SBATCH --licenses=matlab@matlablm.unige.ch
#SBATCH --time=00:15:00
#SBATCH --mail-user=monika.avila@unige.ch
#SBATCH --partition=debug-cpu

module load GCCcore/8.3.0
module load Python

BASE_MFILE_NAME=main

unset DISPLAY

echo “Running ${BASE_MFILE_NAME}.py on $(hostname)”

srun Python ${BASE_MFILE_NAME}.py

Expected Result

I expect to obtain a job that is running

Actual Result

I get an error

Running main.py on cpu001.baobab
slurmstepd: error: execve(): Python: No such file or directory
srun: error: cpu001: task 0: Exited with exit code 2

I also replaced the las line of my batch file by

srun ${BASE_MFILE_NAME}.py

And in that case I get the mistake

Running main.py on cpu001.baobab
slurmstepd: error: execve(): main.py: Permission denied
srun: error: cpu001: task 0: Exited with exit code 13

Dear Monika,

It seems you just have a typo in your sbatch scripts. You call “Python” but the software name is “python” lowercase.

Best regards,