Skip to content

Commit 08ed5ea

Browse files
committed
Fixes
1 parent d38a120 commit 08ed5ea

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

pySDC/projects/GPU/analysis_scripts/RBC3D_stability.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
from pySDC.helpers.fieldsIO import FieldsIO
44
from pySDC.projects.GPU.configs.base_config import get_config
55

6-
step_sizes = {'RBC3DG4Ra1e5': [1e3, 1e0, 1e-1, 8e-2, 6e-2], 'RBC3DG4R4Ra1e5': [1e0, 1e-1, 9e-2, 8e-2, 7e-2, 6e-2, 5e-2]}
6+
step_sizes = {
7+
'RBC3DG4Ra1e5': [3, 1e0, 1e-1, 8e-2, 6e-2],
8+
'RBC3DG4RKRa1e5': [1e3, 5, 4, 1e0, 1e-1, 8e-2, 6e-2],
9+
'RBC3DG4R4Ra1e5': [1e0, 1e-1, 9e-2, 8e-2, 7e-2, 6e-2, 5e-2],
10+
}
711
n_freefall_times = {}
812

913

@@ -36,7 +40,9 @@ def compute_stability(args, dt):
3640

3741
config = get_config(args)
3842
config.Tend = n_freefall_times.get(type(config).__name__, 3)
39-
config.ic_config = type(config)
43+
44+
ic_config_name = type(config).__name__.replace('RK', '')
45+
config.ic_config = type(get_config({**args, 'config': ic_config_name}))
4046

4147
try:
4248
run_experiment(args, config)

pySDC/projects/GPU/configs/base_config.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,12 @@ def merge_all_stats(self, controller):
203203

204204
stats = {}
205205
for i in range(hook.counter - 1):
206-
with open(self.get_stats_path(index=i), 'rb') as file:
207-
_stats = pickle.load(file)
208-
stats = {**stats, **_stats}
206+
try:
207+
with open(self.get_stats_path(index=i), 'rb') as file:
208+
_stats = pickle.load(file)
209+
stats = {**stats, **_stats}
210+
except FileNotFoundError:
211+
print(f'Warning: No stats found at path {self.get_stats_path(index=i)}')
209212

210213
stats = {**stats, **controller.return_stats()}
211214
return stats

0 commit comments

Comments
 (0)