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