Skip to content

Commit

Permalink
Merge branch 'mpi4py' of github.com:casparvl/test-suite into mpi4py
Browse files Browse the repository at this point in the history
  • Loading branch information
Caspar van Leeuwen committed Aug 21, 2024
2 parents 33700e7 + 509ba07 commit 42e957f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions tutorial/mpi4py/mpi4py_portable.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class EESSI_MPI4PY(rfm.RunOnlyRegressionTest):

# Typically, we list here the name of our cluster as it is specified in our ReFrame configuration file
# https://reframe-hpc.readthedocs.io/en/stable/regression_test_api.html#reframe.core.pipeline.RegressionTest.valid_systems
valid_systems = ['snellius']
valid_systems = ['*']

# ReFrame will generate a test for each module
# https://reframe-hpc.readthedocs.io/en/stable/regression_test_api.html#reframe.core.builtins.parameter
Expand Down Expand Up @@ -54,7 +54,7 @@ class EESSI_MPI4PY(rfm.RunOnlyRegressionTest):
# https://reframe-hpc.readthedocs.io/en/stable/regression_test_api.html#reframe.core.pipeline.RegressionTest.executable_opts
executable_opts = ['mpi4py_reduce.py', '--n_iter', f'{n_iterations}', '--n_warmup', f'{n_warmup}']

# Temporarily define postrun_cmds to make it easy to find out memory useage
# Temporarily define postrun_cmds to make it easy to find out memory usage
postrun_cmds = [
'MAX_MEM_IN_BYTES=$(cat /sys/fs/cgroup/memory/$(</proc/self/cpuset)/memory.max_usage_in_bytes)',
'echo "MAX_MEM_IN_BYTES=$MAX_MEM_IN_BYTES"',
Expand Down Expand Up @@ -85,7 +85,7 @@ def set_num_tasks_per_node(self):
hooks.assign_tasks_per_compute_unit(self, COMPUTE_UNIT[CPU])

# This test scales almost indefinitely
# For tests that have limited scaling, one make sure that test instances exceeding
# For tests that have limited scaling, make sure that test instances exceeding
# a predefined maximum task count are skipped using:
# max_tasks = 300
# self.skip_if(self.num_tasks > max_tasks,
Expand All @@ -94,7 +94,7 @@ def set_num_tasks_per_node(self):
# Make sure we request sufficient memory from the scheduler
@run_after('setup')
def request_mem(self):
mem_required = self.num_tasks_per_node * 256
mem_required = self.num_tasks_per_node * 256 # request 256 MB per task per node
hooks.req_memory_per_node(self, app_mem_req=mem_required)

# Set binding strategy
Expand Down
2 changes: 1 addition & 1 deletion tutorial/mpi4py/src/mpi4py_reduce.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
# Actual reduction, multiple iterations for accuracy of timing
t1 = time.time()
for i in range(n_iter):
total = MPI.COMM_WORLD.reduce(rank)
total = MPI.COMM_WORLD.reduce(rank, op=MPI.SUM)
t2 = time.time()
total_time = (t2 - t1) / n_iter

Expand Down

0 comments on commit 42e957f

Please sign in to comment.