#!/bin/bash
#SBATCH --job-name=scalasca_run    # Name of the job
#SBATCH --ntasks=40                # Total number of MPI processes
#SBATCH --ntasks-per-node=40       # Number of MPI processes per node
# /!\ Caution: In Slurm vocabulary, "multithread" in the following line refers to 
# hyperthreading.
#SBATCH --hint=nomultithread       # 1 thread per physical core 
# (no hyperthreading)
#SBATCH --time=01:00:00            # Maximum execution time requested (HH:MM:SS)
#SBATCH --output=scalasca%j.out    # Name of the output file
#SBATCH --error=scalasca%j.out     # Name of the error file (here common with the output)

# go in the submission directory
cd ${SLURM_SUBMIT_DIR}

# clean out modules loaded in interactive and inherited by default
module purge

# load modules
module load ...
module load scalasca
module load scorep

# echo of launched commands
set -x

# execution of the code
scan srun ./my_appli my_args