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

CI: pytest setup fix #2177

Merged
merged 1 commit into from
Aug 1, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker/Dockerfile.nvidia
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ RUN export NVARCH=$(ls -1 /opt/nvidia/hpc_sdk/Linux_x86_64/ | grep '\.' | head -
ln -sf /opt/nvidia/hpc_sdk/Linux_x86_64/comm_libs/${CUDA_V}/nccl /opt/nvhpc/comm_libs/nccl

# Starting nvhpc 23.5 and cuda 12.1, hpcx and openmpi are inside the cuda version folder, only the bin is in the comm_libs path
RUN export CUDA_V=$(nvcc --version | sed -n 's/^.*release \([0-9]\+\.[0-9]\+\).*$/\1/p') && \
RUN export CUDA_V=$(/opt/nvhpc/cuda/bin/nvcc --version | sed -n 's/^.*release \([0-9]\+\.[0-9]\+\).*$/\1/p') && \
ls /opt/nvhpc/comm_libs/${CUDA_V}/hpcx/ &&\
if [ -d /opt/nvhpc/comm_libs/${CUDA_V}/hpcx ]; then \
rm -rf /opt/nvhpc/comm_libs/hpcx && rm -rf /opt/nvhpc/comm_libs/openmpi4 && \
Expand Down
2 changes: 1 addition & 1 deletion examples/seismic/elastic/elastic_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def test_elastic(dtype):
assert np.isclose(norm(rec2), 0.627606, atol=1e-3, rtol=0)


@pytest.mark.parametrize('shape', [(101,), (51, 51), (16, 16, 16)])
@pytest.mark.parametrize('shape', [(51, 51), (16, 16, 16)])
def test_elastic_stability(shape):
spacing = tuple([20]*len(shape))
_, _, _, [rec1, rec2, v, tau] = run(shape=shape, spacing=spacing, tn=20000.0, nbl=0)
Expand Down
2 changes: 1 addition & 1 deletion examples/seismic/viscoelastic/viscoelastic_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def test_viscoelastic(dtype):
assert np.isclose(norm(rec2), 0.312461, atol=1e-3, rtol=0)


@pytest.mark.parametrize('shape', [(101,), (51, 51), (16, 16, 16)])
@pytest.mark.parametrize('shape', [(51, 51), (16, 16, 16)])
def test_viscoelastic_stability(shape):
spacing = tuple([20]*len(shape))
_, _, _, [rec1, rec2, v, tau] = run(shape=shape, spacing=spacing, tn=20000.0, nbl=0)
Expand Down
2 changes: 2 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
[pytest]
python_files = test_*.py *_example.py example_*.py
addopts = --durations=20 --maxfail=5
filterwarnings =
ignore::pytest.PytestCacheWarning
ignore::pytest.PytestReturnNotNoneWarning
4 changes: 0 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ max-line-length = 90
ignore = F403,E226,E731,E275,W503,F405,E722,E741,W504,W605
exclude = .github

[tool:pytest]
python_files = test_*.py *_example.py example_*.py
addopts = --durations=20 --maxfail=5

[versioneer]
VCS = git
style = pep440
Expand Down
1 change: 1 addition & 0 deletions tests/test_mpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ def test_custom_topology(self):
(256, ('*', '*', 2), (16, 8, 2)),
(256, ('*', 32, 2), (4, 32, 2)),
])
@pytest.mark.parallel(mode=[2])
def test_custom_topology_v2(self, comm_size, topology, dist_topology):
dummy_comm = Bunch(size=comm_size)
custom_topology = CustomTopology(topology, dummy_comm)
Expand Down