2

以下で「mpirun」を「srun」に置き換えると、mpi+openmp ジョブの実行速度が 3 倍遅くなります。

#!bin/bash
#
#SBATCH --job-name=locstack4d_mpi
#SBATCH --output=./res_locstack4d_mpi.txt
#
#SBATCH --ntasks=3
#SBATCH --cpus-per-task=16
#SBATCH --ntasks-per-node=1
#SBATCH --time=10:00
#SBATCH --mem-per-cpu=100
#SBATCH --verbose
export OMP_NUM_THREADS=28

mpirun  ./locstack4d  ./locstack4d_input.dat

mpi 実装の詳細:

Version:                                 3.1
Release Date:                            Thu Feb 20 11:41:13 CST 2014
CC:                              gcc  -m64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC -Wl,-z,noexecstack 
CXX:                             g++  -m64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC -Wl,-z,noexecstack 
F77:                             gfortran -m64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC -Wl,-z,noexecstack 
F90:                             gfortran -m64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC -Wl,-z,noexecstack 
Configure options:                       '--disable-option-checking' '--prefix=/usr' '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--enable-sharedlibs=gcc' '--enable-shared' '--enable-lib-depend' '--disable-rpath' '--enable-fc' '--with-device=ch3:nemesis' '--with-pm=hydra:gforker' '--includedir=/usr/include/mpich-x86_64' '--bindir=/usr/lib64/mpich/bin' '--libdir=/usr/lib64/mpich/lib' '--datadir=/usr/share/mpich' '--mandir=/usr/share/man/mpich' '--docdir=/usr/share/mpich/doc' '--htmldir=/usr/share/mpich/doc' '--with-hwloc-prefix=system' 'FC=gfortran' 'F77=gfortran' 'CFLAGS=-m64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC -O2' 'CXXFLAGS=-m64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC ' 'FCFLAGS=-m64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC ' 'FFLAGS=-m64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC -O2' 'LDFLAGS=-Wl,-z,noexecstack ' 'MPICH2LIB_CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' 'MPICH2LIB_CXXFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' 'MPICH2LIB_FCFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' 'MPICH2LIB_FFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' 'build_alias=x86_64-redhat-linux-gnu' 'host_alias=x86_64-redhat-linux-gnu' 'target_alias=x86_64-redhat-linux-gnu' '--cache-file=/dev/null' '--srcdir=.' 'CC=gcc' 'LIBS=-lrt -lpthread ' 'CPPFLAGS= -I/builddir/build/BUILD/mpich-3.1-rh/src/mpl/include -I/builddir/build/BUILD/mpich-3.1-rh/src/mpl/include -I/builddir/build/BUILD/mpich-3.1-rh/src/openpa/src -I/builddir/build/BUILD/mpich-3.1-rh/src/openpa/src -I/builddir/build/BUILD/mpich-3.1-rh/src/mpi/romio/include'
Process Manager:                         pmi
Launchers available:                     ssh rsh fork slurm ll lsf sge manual persist
Topology libraries available:            hwloc
Resource management kernels available:   user slurm ll lsf sge pbs cobalt
Checkpointing libraries available:       
Demux engines available:                 poll select
4

2 に答える 2

6

あなたの MPI 実装はおそらく Slurm の PMI を正しく使用していないため、予想される 3-cpu ジョブではなく、3 つの独立した 1-cpu プロセスが生成されます。MPI バージョンと Slurm バージョンに互換性があること (たとえば、OpenMPI >=1.5 と Slurm >=2.6)、および OpenMPI が Slurm サポート付きでコンパイルされていることを確認する必要があります ( http://slurm.schedmd.com/mpi_guide.htmlを参照) 。

于 2015-08-12T07:49:12.710 に答える
2

slurm がタスク アフィニティで構成されていて、HyperThreading を認識していない場合、要求されたよりも多くの CPU/コアを使用するジョブは許可されません。したがって、タスクごとに 16 の cpus を要求している場合、Slurm はその数の cpus に制限します。

MPI の実装によっては、アプリケーションが要求されたリソースに制限されていない可能性があるため、srun で実行するよりも高速です。

于 2015-08-10T08:58:56.613 に答える