40 lines
949 B
Bash
40 lines
949 B
Bash
# vim:ft=sh
|
|
|
|
set -e
|
|
|
|
export SINGULARITY_BINDPATH="${SINGULARITY_BINDPATH:-/work/$USER}"
|
|
|
|
mpi=${mpi:-pmix}
|
|
|
|
# export PMIX_MCA_mca_component_show_load_errors=1
|
|
|
|
export OMPI_MCA_osc=${OMPI_MCA_osc:-"ucx"}
|
|
export OMPI_MCA_pml=${OMPI_MCA_pml:-"ucx"}
|
|
export OMPI_MCA_btl=${OMPI_MCA_btl:-"self"}
|
|
# export OMPI_MCA_smsc=${OMPI_MCA_smsc:-"^knem"}
|
|
# export OMPI_MCA_pml_ucx_opal_mem_hooks=1
|
|
|
|
export UCX_PROTO_ENABLE=n
|
|
export UCX_PROTO_INFO=y
|
|
# export UCX_HANDLE_ERRORS="bt"
|
|
# export UCX_UNIFIED_MODE="y"
|
|
|
|
# fatal, error, warn, info, debug, trace, req, data, async, func, poll
|
|
# export UCX_LOG_LEVEL=${UCX_LOG_LEVEL:-warn}
|
|
export UCX_TLS=${UCX_TLS:-"dc,sm,self"} # use rc for nodes <= 4
|
|
|
|
run () {
|
|
if [ -z "$SLURM_SRUN_COMM_HOST" ]; then
|
|
if [ "$mpi" = "intel" ]; then
|
|
echo "mpiexec -n $SLURM_NTASKS $@"
|
|
mpiexec -n $SLURM_NTASKS $@
|
|
else
|
|
srun $@
|
|
fi
|
|
else
|
|
$@
|
|
fi
|
|
echo "done: $?"
|
|
}
|
|
|