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

Apr-2023 updates for running on graham, beluga & cedar #37

Merged
merged 3 commits into from
Apr 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 4 additions & 7 deletions salishsea_cmd/run.py
Expand Up @@ -756,7 +756,7 @@ def _sbatch_directives(
account = get_run_desc_value(run_desc, ("account",), fatal=False)
sbatch_directives += f"#SBATCH --account={account}\n"
except KeyError:
account = "rrg-allen" if SYSTEM in {"beluga", "cedar"} else "def-allen"
account = "rrg-allen" if SYSTEM in {"graham"} else "def-allen"
sbatch_directives += f"#SBATCH --account={account}\n"
log.info(
f"No account found in run description YAML file, "
Expand Down Expand Up @@ -951,15 +951,13 @@ def _modules():
"beluga": textwrap.dedent(
"""\
module load StdEnv/2020
module load netcdf-fortran-mpi/4.5.2
module load python/3.9.6
module load netcdf-fortran-mpi/4.6.0
"""
),
"cedar": textwrap.dedent(
"""\
module load StdEnv/2020
module load netcdf-fortran-mpi/4.5.2
module load python/3.9.6
module load netcdf-fortran-mpi/4.6.0
"""
),
"delta": textwrap.dedent(
Expand All @@ -970,8 +968,7 @@ def _modules():
"graham": textwrap.dedent(
"""\
module load StdEnv/2020
module load netcdf-fortran-mpi/4.5.2
module load python/3.9.6
module load netcdf-fortran-mpi/4.6.0
"""
),
"omega": textwrap.dedent(
Expand Down
26 changes: 11 additions & 15 deletions tests/test_run.py
Expand Up @@ -1926,7 +1926,7 @@ class TestBuildBatchScript:
"""Unit test for _build_batch_script() function."""

@pytest.mark.parametrize(
"account, deflate", [("rrg-allen", True), ("rrg-allen", False)]
"account, deflate", [("def-allen", True), ("def-allen", False)]
)
def test_beluga(self, account, deflate):
desc_file = StringIO(
Expand Down Expand Up @@ -1982,8 +1982,7 @@ def test_beluga(self, account, deflate):
GATHER="${HOME}/.local/bin/salishsea gather"

module load StdEnv/2020
module load netcdf-fortran-mpi/4.5.2
module load python/3.9.6
module load netcdf-fortran-mpi/4.6.0

mkdir -p ${RESULTS_DIR}
cd ${WORK_DIR}
Expand Down Expand Up @@ -2065,7 +2064,7 @@ def test_cedar(self, cpu_arch, nodes, cores_per_node, mem, deflate):
#SBATCH --time=1:02:03
#SBATCH --mail-user=me@example.com
#SBATCH --mail-type=ALL
#SBATCH --account=rrg-allen
#SBATCH --account=def-allen
# stdout and stderr file paths/names
#SBATCH --output=results_dir/stdout
#SBATCH --error=results_dir/stderr
Expand All @@ -2089,8 +2088,7 @@ def test_cedar(self, cpu_arch, nodes, cores_per_node, mem, deflate):
GATHER="${HOME}/.local/bin/salishsea gather"

module load StdEnv/2020
module load netcdf-fortran-mpi/4.5.2
module load python/3.9.6
module load netcdf-fortran-mpi/4.6.0

mkdir -p ${RESULTS_DIR}
cd ${WORK_DIR}
Expand Down Expand Up @@ -2138,7 +2136,7 @@ def test_cedar(self, cpu_arch, nodes, cores_per_node, mem, deflate):
assert script == expected

@pytest.mark.parametrize(
"account, deflate", [("def-allen", True), ("def-allen", False)]
"account, deflate", [("rrg-allen", True), ("rrg-allen", False)]
)
def test_graham(self, account, deflate):
desc_file = StringIO(
Expand Down Expand Up @@ -2194,8 +2192,7 @@ def test_graham(self, account, deflate):
GATHER="${HOME}/.local/bin/salishsea gather"

module load StdEnv/2020
module load netcdf-fortran-mpi/4.5.2
module load python/3.9.6
module load netcdf-fortran-mpi/4.6.0

mkdir -p ${RESULTS_DIR}
cd ${WORK_DIR}
Expand Down Expand Up @@ -2737,7 +2734,7 @@ def test_beluga_sbatch_directives(self, m_logger):
"#SBATCH --time=1:02:03\n"
"#SBATCH --mail-user=me@example.com\n"
"#SBATCH --mail-type=ALL\n"
"#SBATCH --account=rrg-allen\n"
"#SBATCH --account=def-allen\n"
"# stdout and stderr file paths/names\n"
"#SBATCH --output=foo/stdout\n"
"#SBATCH --error=foo/stderr\n"
Expand All @@ -2748,8 +2745,8 @@ def test_beluga_sbatch_directives(self, m_logger):
@pytest.mark.parametrize(
"system, account, cpu_arch, nodes, procs_per_node, mem",
[
("cedar", "rrg-allen", "broadwell", 2, 32, "0"),
("cedar", "rrg-allen", "skylake", 1, 48, "0"),
("cedar", "def-allen", "broadwell", 2, 32, "0"),
("cedar", "def-allen", "skylake", 1, 48, "0"),
],
)
def test_cedar_sbatch_directives(
Expand Down Expand Up @@ -2803,7 +2800,7 @@ def test_graham_sbatch_directives(self, m_logger):
"#SBATCH --time=1:02:03\n"
"#SBATCH --mail-user=me@example.com\n"
"#SBATCH --mail-type=ALL\n"
"#SBATCH --account=def-allen\n"
"#SBATCH --account=rrg-allen\n"
"# stdout and stderr file paths/names\n"
"#SBATCH --output=foo/stdout\n"
"#SBATCH --error=foo/stderr\n"
Expand Down Expand Up @@ -3195,8 +3192,7 @@ def test_beluga_cedar_graham(self, system):
expected = textwrap.dedent(
"""\
module load StdEnv/2020
module load netcdf-fortran-mpi/4.5.2
module load python/3.9.6
module load netcdf-fortran-mpi/4.6.0
"""
)
assert modules == expected
Expand Down