Skip to content

Commit

Permalink
Update docker image and use nvhpc
Browse files Browse the repository at this point in the history
  • Loading branch information
samkellerhals committed May 28, 2024
1 parent b5086a9 commit 1b144e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion ci/docker/Dockerfile.build
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.io/nvidia/cuda:11.2.2-devel-ubuntu20.04
FROM nvcr.io/nvidia/nvhpc:21.3-devel-cuda11.2-ubuntu20.04
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8

Expand Down
11 changes: 3 additions & 8 deletions tools/tests/py2fgen/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,6 @@ def test_py2fgen_compilation_and_execution_multi_return_profile(
)


# todo: enable on CI
@pytest.mark.skip("Requires setting ICON_GRID_LOC environment variable.")
def test_py2fgen_compilation_and_execution_diffusion(cli_runner, samples_path):
run_test_case(
cli_runner,
Expand Down Expand Up @@ -200,22 +198,19 @@ def test_py2fgen_compilation_and_execution_gpu(
py2fbackend,
samples_path,
test_name,
"/opt/nvidia/hpc_sdk/Linux_x86_64/2024/compilers/bin/nvfortran", # Ensure NVFORTRAN_COMPILER is set in your environment variables
"nvfortran",
extra_flags,
)


# todo: enable on CI
# Need to compile using nvfortran, and set CUDACXX path to nvcc cuda compiler. Also need to set ICON_GRID_LOC for path to gridfile, and ICON4PY_BACKEND to determine device at runtime.
@pytest.mark.skip("Requires setting various environment variables.")
@pytest.mark.parametrize(
"py2fbackend, extra_flags",
[("GPU", ("-acc", "-Minfo=acc"))],
)
def test_py2fgen_compilation_and_execution_diffusion_gpu(
cli_runner, samples_path, py2fbackend, extra_flags
):
# todo: requires setting ICON_GRID_LOC
# todo: requires setting ICON4PY_BACKEND=GPU
run_test_case(
cli_runner,
"icon4pytools.py2fgen.wrappers.diffusion",
Expand All @@ -224,7 +219,7 @@ def test_py2fgen_compilation_and_execution_diffusion_gpu(
py2fbackend,
samples_path,
"test_diffusion",
"/opt/nvidia/hpc_sdk/Linux_x86_64/2024/compilers/bin/nvfortran", # todo: set nvfortran location in base.yml file.
"nvfortran",
extra_flags,
)

Expand Down

0 comments on commit 1b144e4

Please sign in to comment.