Mpi_omp_PBS

====================================================================

#!/bin/sh

#PBS -N job_name

#PBS -q queue_name

#PBS -M username@campus.technion.ac.il

#PBS -m abe

#PBS -l select=M:ncpus=N:mpiprocs=N:ompthreads=K -l place- scatter

#PBS -l select=mem=PGb

#PBS -l walltime= T

PBS_O_WORKDIR=$HOME/Mpi_omp_dir

cd $PBS_O_WORKDIR

export OMP_NUM_THREADS = K

mpirun -np M*N ./mpi_omp_program.exe < input_filename >& output_filename

====================================================================

# job name (default is the name of pbs script file)
# Submit the job to the queue “queue_name”
# Send the e-mail messages from the server to a user address
# This line and the Technion address are mandatory!
# Comment: if you want more than one message to be sent, you must group
# the flags in one line, otherwise only the last flag executes.
# resource limits: number and distribution of parallel processes
# comment: use M chunks (nodes), each with N CPUs with N MPI tasks
# and K OpenMP threads
# resource limits: max amount of memory P Gb to be used by the job
# resource limits: max wall clock time during which job can run
# specifying working directory
# running MPI-OpenMP executable with processes M*N MPI tasks and K OpenMP threads
# comment: the “np” must be equal the number of chunks multiplied by the number of “ncpus”

====================================================================

#!/bin/sh
#
# job name (default is the name of pbs script file)
#—————————————————
#PBS -N job_name
#
# Submit the job to the queue “queue_name”
#—————————————————
#PBS -q queue_name
#
# Send the e-mail messages from the server to a user address
# This line and the Technion address are mandatory!
#——————————————————–
#PBS -M user@technion.ac.il
#
# send me mail when the job begins
#—————————————————
#PBS -m b
# send me mail when the job ends
#—————————————————
#PBS -m e
# send me mail when the job aborts (with an error)
#—————————————————
#PBS -m a
#
# Comment: if you want more than one message to be sent, you must group
# the flags in one line, otherwise only the last flag executes.
#————————————————————-
#PBS -mbea
#
# resource limits: number and distribution of parallel processes
#——————————————————————
#PBS -l select=M:ncpus=N:mpiprocs=N:ompthreads=K -l place- scatter
#
# comment: use M chunks (nodes), each with N CPUs with N MPI tasks
# and K OpenMP threads
#
# resource limits: max amount of memory P Gb to be used by the job
#————————————————————-
#PBS -l select=mem=PGb
#
# resource limits: max wall clock time during which job can run
#—————————————————————–
#PBS -l walltime= T
#
# specifying working directory
#——————————————————
PBS_O_WORKDIR=$HOME/mydir
cd $PBS_O_WORKDIR
#

export OMP_NUM_THREADS = K
#
# running MPI-OpenMP executable with processes M*N MPI tasks and K OpenMP threads
#——————————————————————————–
mpirun -np M*N ./mpi_omp_program.exe < input/file
#
# comment: the “np” must be equal the number of chunks multiplied by the number of “ncpus”