Skip to content

Commit c9ae797

Browse files
committed
Use Mumps in test. Try removing the pytest.skip
1 parent aaace7b commit c9ae797

2 files changed

Lines changed: 6 additions & 15 deletions

File tree

tests/run_tests/driver_airborne_tem_test.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,12 @@
1010

1111
from __future__ import annotations
1212

13-
import sys
1413
from pathlib import Path
1514

1615
import numpy as np
1716
from geoh5py.groups import SimPEGGroup
1817
from geoh5py.workspace import Workspace
19-
from pymatsolver.direct import Mumps
20-
from pytest import mark, raises
18+
from pytest import raises
2119

2220
from simpeg_drivers.electromagnetics.time_domain import (
2321
TDEMForwardOptions,
@@ -100,17 +98,14 @@ def test_airborne_tem_fwr_run(
10098
x_channel_bool=True,
10199
y_channel_bool=True,
102100
z_channel_bool=True,
101+
solver_type="Mumps",
103102
)
104103

105104
fwr_driver = TDEMForwardDriver(params)
106105

107-
fwr_driver.data_misfit.objfcts[0].simulation.solver = Mumps
108106
fwr_driver.run()
109107

110108

111-
@mark.skipif(
112-
sys.platform.startswith("win"), reason="Skipping windows-only tests due to mkl 2024"
113-
)
114109
def test_airborne_tem_run(tmp_path: Path, max_iterations=1, pytest=True):
115110
workpath = tmp_path / "inversion_test.ui.geoh5"
116111
if pytest:
@@ -190,12 +185,12 @@ def test_airborne_tem_run(tmp_path: Path, max_iterations=1, pytest=True):
190185
prctile=5,
191186
sens_wts_threshold=1.0,
192187
store_sensitivities="ram",
188+
solver_type="Mumps",
193189
**data_kwargs,
194190
)
195191
params.write_ui_json(path=tmp_path / "Inv_run.ui.json")
196192

197193
driver = TDEMInversionDriver(params)
198-
driver.data_misfit.objfcts[0].simulation.solver = Mumps
199194
driver.run()
200195

201196
with geoh5.open() as run_ws:

tests/run_tests/driver_ground_tem_test.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,12 @@
1010

1111
from __future__ import annotations
1212

13-
import sys
1413
from logging import INFO, getLogger
1514
from pathlib import Path
1615

1716
import numpy as np
1817
from geoh5py.workspace import Workspace
1918
from pymatsolver.direct import Mumps
20-
from pytest import mark
2119

2220
from simpeg_drivers.electromagnetics.time_domain import (
2321
TDEMForwardOptions,
@@ -118,6 +116,7 @@ def test_ground_tem_fwr_run(
118116
x_channel_bool=True,
119117
y_channel_bool=True,
120118
z_channel_bool=True,
119+
solver_type="Mumps",
121120
)
122121

123122
fwr_driver = TDEMForwardDriver(params)
@@ -134,13 +133,10 @@ def test_ground_tem_fwr_run(
134133

135134
assert "closed" in caplog.records[0].message
136135

137-
fwr_driver.data_misfit.objfcts[0].simulation.solver = Mumps
136+
assert fwr_driver.data_misfit.objfcts[0].simulation.simulations[0].solver == Mumps
138137
fwr_driver.run()
139138

140139

141-
@mark.skipif(
142-
sys.platform.startswith("win"), reason="Skipping windows-only tests due to mkl 2024"
143-
)
144140
def test_ground_tem_run(tmp_path: Path, max_iterations=1, pytest=True):
145141
workpath = tmp_path / "inversion_test.ui.geoh5"
146142
if pytest:
@@ -218,12 +214,12 @@ def test_ground_tem_run(tmp_path: Path, max_iterations=1, pytest=True):
218214
prctile=100,
219215
sens_wts_threshold=1.0,
220216
store_sensitivities="ram",
217+
solver_type="Mumps",
221218
**data_kwargs,
222219
)
223220
params.write_ui_json(path=tmp_path / "Inv_run.ui.json")
224221

225222
driver = TDEMInversionDriver(params)
226-
driver.data_misfit.objfcts[0].simulation.solver = Mumps
227223
driver.run()
228224

229225
with geoh5.open() as run_ws:

0 commit comments

Comments
 (0)