From fee17d7b77986dca03aab862257a78f66bf5b064 Mon Sep 17 00:00:00 2001 From: mcgratta Date: Mon, 29 Jul 2024 15:33:47 -0400 Subject: [PATCH] qfds.sh: do not explicitly ask for number of nodes --- Utilities/Scripts/qfds.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Utilities/Scripts/qfds.sh b/Utilities/Scripts/qfds.sh index 211c63b0159..ef5b784908f 100755 --- a/Utilities/Scripts/qfds.sh +++ b/Utilities/Scripts/qfds.sh @@ -363,30 +363,40 @@ cat << EOF > $scriptfile EOF if [ "$RESOURCE_MANAGER" == "SLURM" ]; then + cat << EOF >> $scriptfile #SBATCH -J $JOBPREFIX$infile #SBATCH -e $outerr #SBATCH -o $outlog #SBATCH --partition=$queue #SBATCH --ntasks=$n_mpi_processes -#SBATCH --nodes=$nodes #SBATCH --cpus-per-task=$n_openmp_threads -#SBATCH --ntasks-per-node=$n_mpi_processes_per_node #SBATCH --time=$walltime EOF + +if [[ $n_openmp_threads -gt 1 ]] || [[ $max_mpi_processes_per_node -lt 1000 ]] ; then +cat << EOF >> $scriptfile +#SBATCH --nodes=$nodes +#SBATCH --ntasks-per-node=$n_mpi_processes_per_node +EOF +fi + if [ "$EMAIL" != "" ]; then - cat << EOF >> $scriptfile +cat << EOF >> $scriptfile #SBATCH --mail-user=$EMAIL #SBATCH --mail-type=ALL EOF fi + if [ "$benchmark" == "yes" ]; then cat << EOF >> $scriptfile #SBATCH --exclusive #SBATCH --cpu-freq=Performance EOF fi + else # PBS/Torque + cat << EOF >> $scriptfile #PBS -N $JOBPREFIX$infile #PBS -e $outerr