Skip to content

Commit

Permalink
Set compute unit in init phase - we already have all info we need there
Browse files Browse the repository at this point in the history
  • Loading branch information
Caspar van Leeuwen committed Sep 4, 2024
1 parent 24a0256 commit 2bdd84f
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions eessi/testsuite/tests/apps/lammps/lammps.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ class EESSI_LAMMPS_base(rfm.RunOnlyRegressionTest, EESSI_Mixin):
# Parameterize over all modules that start with LAMMPS
module_name = parameter(utils.find_modules('LAMMPS'))

def required_mem_per_node(num_tasks_per_node):
mem = {'slope': 0.07, 'intercept': 0.5}
self.mem_required = (num_tasks_per_node * mem['slope'] + mem['intercept']) * 1024

# Set sanity step
@deferrable
def assert_lammps_openmp_treads(self):
Expand Down Expand Up @@ -65,7 +69,7 @@ def assert_run(self):
# # Set scales as tags
# hooks.set_tag_scale(self)

@run_before('setup')
@run_after('init')
def run_after_setup(self):
"""hooks to run after the setup phase"""
if self.device_type == 'cpu':
Expand All @@ -83,13 +87,10 @@ def run_after_setup(self):
# Set compact process binding
# hooks.set_compact_process_binding(self)

def required_mem_per_node(num_tasks_per_node):
mem = {'slope': 0.07, 'intercept': 0.5}
self.mem_required = (num_tasks_per_node * mem['slope'] + mem['intercept']) * 1024

@run_before('setup')
def request_mem(self):
mem = {'slope': 0.07, 'intercept': 0.5}
#@run_after('init')
#def request_mem(self):
#mem = {'slope': 0.07, 'intercept': 0.5}
# self.mem_required = (self.num_tasks_per_node * mem['slope'] + mem['intercept']) * 1024
# hooks.req_memory_per_node(self, app_mem_req=mem_required * 1024)

Expand Down

0 comments on commit 2bdd84f

Please sign in to comment.