From 3c88ccd247895d1c63df7eb0626660e4c3acc62b Mon Sep 17 00:00:00 2001 From: Emilien Bauer Date: Fri, 20 Oct 2023 11:46:45 +0100 Subject: [PATCH] Correct binding for single-node local mpi.sh. --- fast/mpi.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/fast/mpi.sh b/fast/mpi.sh index 661dd9d9b7..6a4f6847b4 100755 --- a/fast/mpi.sh +++ b/fast/mpi.sh @@ -20,11 +20,12 @@ export OMP_PLACES=cores export OMP_PROC_BIND=true # Doing 4 ranks X 4 threads locally here -export OMP_NUM_THREADS=16 -export MPI_NUM_RANKS=8 - +export OMP_NUM_THREADS=4 +export MPI_NUM_RANKS=4 +export HYDRA_TOPO_DEBUG=1 # Just extract the reported throughput from the whole output of the passed command get_throughput() { + #echo $($@) $@ |& grep Global | head -n 1 | cut -d ' ' -f6 } @@ -45,8 +46,8 @@ do # mpirun -np $MPI_NUM_RANKS --bind-to=core python $bench -so $so --xdsl 1 # Get the runtimes - DEVITO_MPI=diag2 devito_time=$(get_throughput mpirun -np $MPI_NUM_RANKS --bind-to core python $bench -so $so --devito 1) - xdsl_time=$(get_throughput mpirun -np $MPI_NUM_RANKS --bind-to core python $bench -so $so --xdsl 1) + DEVITO_MPI=diag2 devito_time=$(get_throughput mpirun -n $MPI_NUM_RANKS --bind-to core:$OMP_NUM_THREADS python $bench -so $so --devito 1) + xdsl_time=$(get_throughput mpirun -n $MPI_NUM_RANKS --bind-to core:$OMP_NUM_THREADS python $bench -so $so --xdsl 1) # print CSV line echo $bench_name,$so,$devito_time,$xdsl_time done