Skip to content

Commit

Permalink
Bypass numa bind on Darwin platform. (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
esclapez committed Apr 26, 2024
1 parent 9ea2084 commit 7d3d022
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions test.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#!/bin/bash

platform=$(uname)

set -e

#display help
usage() {
echo "Usage: $0 [options]" >&2
echo
echo " -n,--np Number of MPI processes to launhc."
echo " -n,--np Number of MPI processes to launch."
echo " -c,--case Path to grid file name that is under a test case directory."
echo " -b,--bin-path Path to binaries: mesh, prepare and solvers."
echo " -s,--steps Number of time steps, which overwrites the one in control file."
Expand Down Expand Up @@ -50,9 +52,14 @@ run() {
${bin_path}/mesh $1 -o grid_0.bin
fi

bind_numa="-bind-to numa"
if [ "$platform" == "Darwin" ]; then
bind_numa=
fi

#solve
solver=$(grep -v "^#" ./controls | grep solver | awk '{print $2}')
mpirun -n $2 -bind-to numa ${bin_path}/${solver} ./controls | tee log.txt
mpirun -n $2 ${bind_numa} ${bin_path}/${solver} ./controls | tee log.txt
}

#prepare directory
Expand Down

0 comments on commit 7d3d022

Please sign in to comment.