Skip to content

Commit

Permalink
clean up lammps.py
Browse files Browse the repository at this point in the history
  • Loading branch information
lara committed Apr 4, 2024
1 parent b7d1548 commit 0656d2f
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions eessi/testsuite/tests/apps/lammps/lammps.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class EESSI_LAMMPS(rfm.RunOnlyRegressionTest):

# Parameterize over all modules that start with LAMMPS
module_name = parameter(utils.find_modules('LAMMPS'))
sourcesdir= 'src/lj'
sourcesdir = 'src/lj'
executable = 'lmp -in in.lj'

# Set sanity step
Expand Down Expand Up @@ -81,11 +81,7 @@ def run_after_init(self):
@run_after('setup')
def run_after_setup(self):
"""hooks to run after the setup phase"""
# TODO: implement
# It should bind to socket, but different MPIs may have different arguments to do that...
# We should at very least prevent that it binds to single core per process,
# as that results in many threads being scheduled to one core.
# binding may also differ per launcher used. It'll be hard to support a wide range and still get proper binding
# TODO: have not tested with GPUs yet
if self.device_type == 'cpu':
hooks.assign_tasks_per_compute_unit(test=self, compute_unit=COMPUTE_UNIT['CPU'])
elif self.device_type == 'gpu':
Expand Down Expand Up @@ -116,7 +112,7 @@ class EESSI_LAMMPS_rhodo(rfm.RunOnlyRegressionTest):

# Parameterize over all modules that start with LAMMPS
module_name = parameter(utils.find_modules('LAMMPS'))
sourcesdir= 'src/rhodo'
sourcesdir = 'src/rhodo'
readonly_files = ["data.rhodo"]
executable = 'lmp -in in.rhodo'

Expand Down Expand Up @@ -148,7 +144,6 @@ def assert_total_nr_neigbors(self):

return sn.assert_eq(n_neighbours, 12028093)


@sanity_function
def assert_sanity(self):
'''Check all sanity criteria'''
Expand All @@ -160,7 +155,8 @@ def assert_sanity(self):

@performance_function('img/s')
def perf(self):
return sn.extractsingle(r'^(?P<perf>[.0-9]+)% CPU use with [0-9]+ MPI tasks x [0-9]+ OpenMP threads', self.stdout, 'perf', float)
return sn.extractsingle(
r'^(?P<perf>[.0-9]+)% CPU use with [0-9]+ MPI tasks x [0-9]+ OpenMP threads', self.stdout, 'perf', float)

@run_after('init')
def run_after_init(self):
Expand Down

0 comments on commit 0656d2f

Please sign in to comment.