Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move test resources to jfrog #243

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions checks/apps/lammps/lammps_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,21 @@
import reframe.utility.sanity as sn


class fetch_lampps_resources(rfm.RunOnlyRegressionTest):
executable = 'wget https://jfrog.svc.cscs.ch/artifactory/cscs-reframe-tests/LAMMPS.tar.gz && tar -xvf LAMMPS.tar.gz'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
executable = 'wget https://jfrog.svc.cscs.ch/artifactory/cscs-reframe-tests/LAMMPS.tar.gz && tar -xvf LAMMPS.tar.gz'
jfrog = 'https://jfrog.svc.cscs.ch/artifactory/cscs-reframe-tests'
executable = f'wget {jfrog}/LAMMPS.tar.gz && tar -xvf LAMMPS.tar.gz'
  • maybe jfrog should be set in the config file(s) ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure it's that useful because we have many tests pulling from jfrog in different directories. Do you think we will need to move them to a different directory eventually?


@sanity_function
def validate_download(self):
return sn.assert_eq(self.job.exitcode, 0)


class LAMMPSCheck(rfm.RunOnlyRegressionTest):
scale = parameter(['small', 'large'])
modules = ['cray-python', 'LAMMPS']
tags = {'external-resources', 'maintenance', 'production'}
maintainers = ['LM']
strict_check = False
lammps_resources = fixture(fetch_lampps_resources, scope='session')
extra_resources = {
'switches': {
'num_switches': 1
Expand All @@ -23,14 +32,16 @@ class LAMMPSCheck(rfm.RunOnlyRegressionTest):

@run_after('init')
def setup_by_system(self):
# Reset sources dir relative to the SCS apps prefix
self.sourcesdir = os.path.join(self.current_system.resourcesdir,
'LAMMPS')
if self.current_system.name in ['eiger', 'pilatus']:
self.valid_prog_environs = ['cpeGNU']
else:
self.valid_prog_environs = ['builtin']

@run_after('setup')
def setup_sourcesdir(self):
self.sourcesdir = os.path.join(self.lammps_resources.stagedir,
'LAMMPS')

@performance_function('timesteps/s')
def perf(self):
return sn.extractsingle(r'\s+(?P<perf>\S+) timesteps/s',
Expand Down
13 changes: 11 additions & 2 deletions checks/apps/namd/namd_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@
import reframe.utility.sanity as sn


class fetch_namd_resources(rfm.RunOnlyRegressionTest):
executable = 'wget https://jfrog.svc.cscs.ch/artifactory/cscs-reframe-tests/NAMD.tar.gz && tar -xvf LAMMPS.tar.gz'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same


@sanity_function
def validate_download(self):
return sn.assert_eq(self.job.exitcode, 0)


@rfm.simple_test
class NamdCheck(rfm.RunOnlyRegressionTest):
scale = parameter(['small', 'large'])
Expand All @@ -21,6 +29,7 @@ class NamdCheck(rfm.RunOnlyRegressionTest):
num_tasks_per_core = 2
maintainers = ['CB', 'LM']
tags = {'scs', 'external-resources'}
namd_resources = fixture(fetch_namd_resources, scope='session')
extra_resources = {
'switches': {
'num_switches': 1
Expand Down Expand Up @@ -80,8 +89,8 @@ def setup_parallel_run(self):
@run_before('compile')
def prepare_build(self):
# Reset sources dir relative to the SCS apps prefix
self.sourcesdir = os.path.join(self.current_system.resourcesdir,
'NAMD', 'prod')
self.sourcesdir = os.path.join(self.namd_resources.stagedir,
'NAMD')

@sanity_function
def validate_energy(self):
Expand Down