Skip to content
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
20 changes: 16 additions & 4 deletions python/tests/test_dump_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,10 @@ def get_field_point(sim):
def test_load_dump_structure_2d(self):
self._load_dump_structure_2d()

@unittest.skipIf(not mp.with_mpi(), "MPI specific test")
@unittest.skipIf(
not mp.with_mpi() or mp.count_processors() < 2,
"MPI specific test (requires mpirun with more than 1 process)",
)
def test_load_dump_structure_sharded_2d(self):
self._load_dump_structure_2d(single_parallel_file=False)

Expand Down Expand Up @@ -226,7 +229,10 @@ def get_field_point(sim):
def test_load_dump_structure_3d(self):
self._load_dump_structure_3d()

@unittest.skipIf(not mp.with_mpi(), "MPI specific test")
@unittest.skipIf(
not mp.with_mpi() or mp.count_processors() < 2,
"MPI specific test (requires mpirun with more than 1 process)",
)
def test_load_dump_structure_sharded_3d(self):
self._load_dump_structure_3d(single_parallel_file=False)

Expand Down Expand Up @@ -348,7 +354,10 @@ def get_field_point(sim):
def test_load_dump_fields_2d(self):
self._load_dump_fields_2d()

@unittest.skipIf(not mp.with_mpi(), "MPI specific test")
@unittest.skipIf(
not mp.with_mpi() or mp.count_processors() < 2,
"MPI specific test (requires mpirun with more than 1 process)",
)
def test_load_dump_fields_sharded_2d(self):
self._load_dump_fields_2d(single_parallel_file=False)

Expand Down Expand Up @@ -468,7 +477,10 @@ def get_field_point(sim):
def test_load_dump_fields_3d(self):
self._load_dump_fields_3d()

@unittest.skipIf(not mp.with_mpi(), "MPI specific test")
@unittest.skipIf(
not mp.with_mpi() or mp.count_processors() < 2,
"MPI specific test (requires mpirun with more than 1 process)",
)
def test_load_dump_fields_sharded_3d(self):
self._load_dump_fields_3d(single_parallel_file=False)

Expand Down
7 changes: 5 additions & 2 deletions python/tests/test_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,12 @@ def init_simple_simulation(self, **kwargs):
**kwargs,
)

@unittest.skipIf(not mp.with_mpi(), "MPI specific test")
@unittest.skipIf(
not mp.with_mpi() or mp.count_processors() < 2,
"MPI specific test (requires mpirun with more than 1 process)",
)
def test_mpi(self):
self.assertGreater(mp.comm.Get_size(), 1)
self.assertGreater(mp.count_processors(), 1)

def test_use_output_directory_default(self):
sim = self.init_simple_simulation()
Expand Down
Loading