Skip to content

Commit a7e9116

Browse files
committed
The big bugfix: can now use a reference file containing the locations of faults -> much better reproducibility! need to rerun GS, though.
1 parent b934988 commit a7e9116

File tree

7 files changed

+39
-287
lines changed

7 files changed

+39
-287
lines changed

examples/boussinesq_2d_imex/playground_ft.py

Lines changed: 0 additions & 123 deletions
This file was deleted.

examples/boussinesq_2d_imex/postproc_hard_faults_detail.py

Lines changed: 0 additions & 135 deletions
This file was deleted.
Binary file not shown.

examples/fault_tolerance/boussinesq_example.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
lparams['restol'] = 1E-06
3030

3131
swparams = {}
32-
swparams['collocation_class'] = collclass.CollGaussLobatto
32+
swparams['collocation_class'] = collclass.CollGaussRadau_Right
3333
swparams['num_nodes'] = 3
3434
swparams['do_LU'] = True
3535

@@ -75,7 +75,8 @@
7575

7676
ft.hard_random = 0.03
7777

78-
strategies = ['NOFAULT']
78+
# strategies = ['NOFAULT']
79+
strategies = ['INTERP']
7980
# strategies = ['NOFAULT','SPREAD','INTERP','INTERP_PREDICT','SPREAD_PREDICT']
8081

8182
for strategy in strategies:

examples/fault_tolerance/grayscott_example.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,19 @@
7979

8080
ft.hard_random = 0.03
8181

82-
# strategies = ['NOFAULT']
83-
strategies = ['NOFAULT','SPREAD','INTERP','INTERP_PREDICT','SPREAD_PREDICT']
82+
strategies = ['SPREAD']
83+
# strategies = ['NOFAULT','SPREAD','INTERP','INTERP_PREDICT','SPREAD_PREDICT']
8484

8585
for strategy in strategies:
8686

8787
print('------------------------------------------ working on strategy ',strategy)
8888
ft.strategy = strategy
8989

90+
# read in reference data from clean run, will provide reproducable locations for faults
91+
if not strategy is 'NOFAULT':
92+
reffile = np.load('PFASST_GRAYSCOTT_stats_hf_NOFAULT_P32.npz')
93+
ft.refdata = reffile['hard_stats']
94+
9095
# quickly generate block of steps
9196
MS = mp.generate_steps(num_procs,sparams,description)
9297

@@ -133,6 +138,5 @@
133138
iter_count[step] = v
134139
print(iter_count)
135140

136-
# np.savez('SDC_GRAYSCOTT_stats_hf_'+ft.strategy+'_new',residual=residual,iter_count=iter_count,hard_stats=ft.hard_stats)
137141
np.savez('PFASST_GRAYSCOTT_stats_hf_'+ft.strategy+'_P'+str(num_procs),residual=residual,iter_count=iter_count,hard_stats=ft.hard_stats)
138142

0 commit comments

Comments
 (0)