Skip to content

Commit

Permalink
Completed point to point tests, on Snellius. Yet to be tested on othe…
Browse files Browse the repository at this point in the history
…r systems
  • Loading branch information
Satish Kamath committed Aug 21, 2023
1 parent d952151 commit 4165aff
Showing 1 changed file with 33 additions and 8 deletions.
41 changes: 33 additions & 8 deletions eessi/reframe/eessi_checks/applications/osu.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,26 @@
from hpctestlib.microbenchmarks.mpi.osu import osu_benchmark

from eessi_utils import hooks, utils
from eessi_utils.constants import SCALES, TAGS
from eessi_utils.constants import SCALES, TAGS, DEVICES

def my_filtering_function(test: rfm.RegressionTest):
def my_filtering_function():
"""
Filtering function for filtering scales for the OSU test
"""
scale_filtered = SCALES
for key in list(SCALES):
if(key == '1_core' or key == '4_cores' or SCALES.get(key).get('num_nodes') > 2):
test.scale_filtered.pop(key)
return test.scale_filtered
if(key == '1_core' or key == '4_cores' or
SCALES.get(key).get('num_nodes') > 2):
scale_filtered.pop(key)
elif('node_part' in SCALES.get(key)):
if(SCALES.get(key).get('node_part') > 1):
scale_filtered.pop(key)
return scale_filtered


@rfm.simple_test
class osu_pt_2_pt(osu_benchmark):
''' Run-only OSU test '''
scale_filtered = SCALES
scale = parameter(my_filtering_function())
valid_prog_environs = ['default']
valid_systems = []
Expand All @@ -35,7 +39,6 @@ class osu_pt_2_pt(osu_benchmark):
# which means that this needs to be assigned or re-assigned in the class based
# on other options
# osu_benchmark.num_tasks = 2

@run_after('init')
def run_after_init(self):
"""hooks to run after init phase"""
Expand All @@ -46,10 +49,32 @@ def run_after_init(self):

@run_after('init')
def set_tag_ci(self):
if self.benchmark_info[0] =='mpi.pt2pt.osu_latency':
if (self.benchmark_info[0] == 'mpi.pt2pt.osu_latency' or
self.benchmark_info[0] == 'mpi.pt2pt.osu_bw'):
self.tags.add('CI')


@run_after('init')
def set_num_tasks_per_node(self):
if(SCALES.get(self.scale).get('num_nodes') == 1):
self.num_tasks_per_node = 2


@run_after('setup')
def set_num_gpus_per_node(self):
"""
This test does not require gpus and is for host to host within GPU
nodes. But some systems do require a GPU allocation for to perform any
activity in the GPU nodes.
"""
if('gpu' in self.current_partition.features):
if(SCALES.get(self.scale).get('num_nodes') == 1):
self.num_gpus_per_node = 1
else:
self.num_gpus_per_node = \
self.current_partition.devices[0].num_devices


# @run_after('setup')
# def set_executable_opts(self):
# """
Expand Down

0 comments on commit 4165aff

Please sign in to comment.