-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from RuiApostolo/20240906_module_paths
Adds module path test
- Loading branch information
Showing
9 changed files
with
92 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,7 +49,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Python Black | ||
uses: cytopia/[email protected] | ||
- uses: psf/black@stable | ||
with: | ||
path: 'tests/' | ||
options: "--check --verbose" | ||
src: "./tests/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
"""ReFrame script for lammps dipole test""" | ||
|
||
import reframe as rfm | ||
|
||
from lammps_base import LAMMPSBase | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
"""ReFrame script for lammps dipole test""" | ||
|
||
import reframe as rfm | ||
|
||
from lammps_base import LAMMPSBase | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
"""ReFrame base module for LAMMPS tests""" | ||
|
||
import reframe as rfm | ||
import reframe.utility.sanity as sn | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
"""Compilation tests""" | ||
|
||
import reframe as rfm | ||
import reframe.utility.sanity as sn | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
"""k8s cuda job tests""" | ||
|
||
import reframe as rfm | ||
import reframe.utility.sanity as sn | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
#!/usr/bin/env python3 | ||
"""Reframe test to whether module locations are readable""" | ||
|
||
import reframe as rfm | ||
import reframe.utility.sanity as sn | ||
|
||
|
||
class ModulePathTestBase(rfm.RunOnlyRegressionTest): | ||
"""Checks if module file locations are readable""" | ||
|
||
descr = "Check that all module file locations are readable" "" | ||
valid_prog_environs = ["Default"] | ||
sourcesdir = None | ||
executable = "test -r" | ||
maintainers = ["[email protected]"] | ||
|
||
@sanity_function | ||
def assert_exists(self): | ||
"""Checks exit code""" | ||
return sn.assert_eq(self.job.exitcode, 0) | ||
|
||
|
||
class ARCHER2Paths(rfm.RegressionMixin): | ||
"""Mixin class with ARCHER2 paths""" | ||
|
||
path = parameter( | ||
[ | ||
"/work/y07/shared/archer2-lmod/utils/compiler/crayclang/10.0", # Darshan | ||
"/work/y07/shared/archer2-lmod/python/core", # python | ||
"/work/y07/shared/archer2-lmod/libs/core", # cse libraries | ||
"/work/y07/shared/archer2-lmod/apps/core", # cse apps | ||
"/work/y07/shared/archer2-lmod/utils/core", # cse utils | ||
"/opt/cray/pe/lmod/modulefiles/mpi/crayclang/14.0/ofi/1.0/cray-mpich/8.0", # cray parallel hdf5/netcdf | ||
"/opt/cray/pe/lmod/modulefiles/comnet/crayclang/14.0/ofi/1.0", # cray mpich | ||
"/opt/cray/pe/lmod/modulefiles/compiler/crayclang/14.0", # cray hdf5 | ||
"/opt/cray/pe/lmod/modulefiles/mix_compilers", # cray mixed compilers | ||
"/opt/cray/pe/lmod/modulefiles/perftools/22.12.0", # cray performance tools | ||
"/opt/cray/pe/lmod/modulefiles/net/ofi/1.0", # cray openshmem | ||
"/opt/cray/pe/lmod/modulefiles/cpu/x86-rome/1.0", # cray fftw | ||
"/opt/cray/pe/lmod/lmod/modulefiles/Core", # cray lmod | ||
"/opt/cray/pe/lmod/modulefiles/core", # cray PrgEnvs and libsci | ||
"/opt/cray/pe/lmod/modulefiles/craype-targets/default", # cray targets | ||
"/usr/local/share/modulefiles", # epcc module | ||
"/opt/cray/modulefiles", # cray lustre and rocm | ||
] | ||
) | ||
|
||
|
||
class CirrusPaths(rfm.RegressionMixin): | ||
"""Mixin class with cirrus paths""" | ||
|
||
path = parameter( | ||
[ | ||
"/work/y07/shared/cirrus-modulefiles", # epcc modules | ||
"/usr/share/Modules/modulefiles", # default | ||
] | ||
) | ||
|
||
|
||
@rfm.simple_test | ||
class ModulePathTestARCHER2(ModulePathTestBase, ARCHER2Paths): | ||
"""ARCHER2 test class""" | ||
|
||
valid_systems = ["archer2:login"] | ||
|
||
@run_after("init") | ||
def setup_path(self): | ||
"""add path to exe""" | ||
self.executable_opts = [self.path] | ||
|
||
|
||
@rfm.simple_test | ||
class ModulePathTestCirrus(ModulePathTestBase, CirrusPaths): | ||
"""Cirrus test class""" | ||
|
||
valid_systems = ["cirrus:login"] | ||
|
||
@run_after("init") | ||
def setup_path(self): | ||
"""add path to exe""" | ||
self.executable_opts = [self.path] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters