Skip to content

Commit 03fa661

Browse files
committed
prepare release for parSDC paper
1 parent 2426f57 commit 03fa661

File tree

5 files changed

+22
-7
lines changed

5 files changed

+22
-7
lines changed

docs/source/projects/doc_parallelSDC_nonlinear.rst

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,13 @@ Results:
99
Results:
1010

1111
.. image:: ../../../data/parallelSDC_fisher.png
12-
:scale: 50 %
12+
:scale: 50 %
13+
14+
Full code: `projects/parallelSDC/newton_vs_sdc.py <https://github.com/Parallel-in-Time/pySDC/blob/master/projects/parallelSDC/newton_vs_sdc.py>`_
15+
16+
.. literalinclude:: ../../../projects/parallelSDC/newton_vs_sdc.py
17+
18+
Results:
19+
20+
.. image:: ../../../data/parallelSDC_fisher_newton.png
21+
:scale: 50 %

projects/parallelSDC/README.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Attempts to parallelize SDC
33

44
In this project, we test different strategies to parallelize SDC beyond PFASST.
55
More precisely, the goal is to find a robust parallelization strategy *within* each iteration, i.e. parallelization across the collocation nodes.
6+
This code is used for the publication "Parallelizing SDC across the method".
67

78
Different preconditioners for SDC
89
---------------------------------
574 Bytes
Binary file not shown.

projects/parallelSDC/newton_vs_sdc.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,15 @@ def main():
110110
file.close()
111111

112112

113-
def plot_graphs():
113+
def plot_graphs(cwd=''):
114114
"""
115115
Helper function to plot graphs of initial and final values
116+
117+
Args:
118+
cwd (str): current working directory
116119
"""
117120

118-
file = open('data/error_reduction_data.pkl', 'rb')
121+
file = open(cwd + 'data/error_reduction_data.pkl', 'rb')
119122
results = pickle.load(file)
120123

121124
sweeper_list = results['sweeper_list']
@@ -164,15 +167,13 @@ def plot_graphs():
164167
plt.ylim([4E-03, 1E0])
165168
plt.xticks(dt_list, dt_list)
166169

167-
# plt.show()
168-
169170
# save plot as PDF, beautify
170171
fname = 'data/parallelSDC_fisher_newton.png'
171172
plt.savefig(fname, rasterized=True, bbox_inches='tight')
172173

173-
# assert os.path.isfile(fname), 'ERROR: plotting did not create file'
174+
assert os.path.isfile(fname), 'ERROR: plotting did not create file'
174175

175176

176177
if __name__ == "__main__":
177-
# main()
178+
main()
178179
plot_graphs()
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
from projects.parallelSDC.nonlinear_playground import main, plot_graphs
2+
from projects.parallelSDC.newton_vs_sdc import plot_graphs as plot_graphs_newton_vs_sdc
23

34
def test_main():
45
main()
56
plot_graphs()
7+
8+
def test_plot_newton_vs_sdc():
9+
plot_graphs_newton_vs_sdc(cwd='projects/parallelSDC/')

0 commit comments

Comments
 (0)