|
2 | 2 | import copy
|
3 | 3 | import unittest
|
4 | 4 | import subprocess
|
5 |
| -import numpy as np |
6 | 5 | import pyphare.pharein as ph
|
7 | 6 |
|
8 | 7 | from pyphare.simulator.simulator import Simulator
|
9 |
| -from pyphare.core import phare_utilities as phut |
10 | 8 | from pyphare.pharesee.hierarchy.fromh5 import get_all_available_quantities_from_h5
|
11 |
| -from pyphare.pharesee.particles import single_patch_per_level_per_pop_from |
12 |
| -from pyphare.pharesee.hierarchy.hierarchy_utils import ( |
13 |
| - flat_finest_field, |
14 |
| - single_patch_for_LO, |
15 |
| - hierarchy_compare, |
16 |
| -) |
17 |
| - |
| 9 | +from pyphare.pharesee.hierarchy.hierarchy_utils import single_patch_for_LO |
| 10 | +from pyphare.pharesee.hierarchy.hierarchy_utils import hierarchy_compare |
18 | 11 | from tests.simulator import SimulatorTest, test_restarts
|
19 | 12 | from tests.diagnostic import dump_all_diags
|
20 | 13 |
|
| 14 | + |
21 | 15 | timestep = 0.001
|
22 | 16 | time_step_nbr = 1
|
23 | 17 | first_mpi_size = 4
|
@@ -88,9 +82,13 @@ def run_first_sim():
|
88 | 82 |
|
89 | 83 | def launch():
|
90 | 84 | """Launch secondary process to run first simulation to avoid initalizing MPI now"""
|
91 |
| - cmd = f"mpirun -n {first_mpi_size} python3 -O tests/simulator/test_init_from_restart.py lol" |
92 |
| - proc = subprocess.run(cmd.split(" "), check=True, capture_output=True) |
93 |
| - return (proc.stdout + proc.stderr).decode().strip() |
| 85 | + |
| 86 | + cmd = f"mpirun -n {first_mpi_size} python3 -O {__file__} lol" |
| 87 | + try: |
| 88 | + p = subprocess.run(cmd.split(" "), check=True, capture_output=True) |
| 89 | + print(p.stdout, p.stderr) |
| 90 | + except subprocess.CalledProcessError as e: |
| 91 | + print("CalledProcessError", e) |
94 | 92 |
|
95 | 93 |
|
96 | 94 | if __name__ == "__main__":
|
|
0 commit comments