|
9 | 9 | import numpy as np |
10 | 10 | import matplotlib.pyplot as plt |
11 | 11 |
|
12 | | -folder = "_benchJusuf" |
| 12 | +folder = "_benchJureca" |
13 | 13 |
|
14 | | -schemes = ["RK443", "SDC", "SDC-MPI", "SDC-MPI2", "SDC-MPI2-GT"] |
15 | 14 | R = 2 |
| 15 | +if R == 2: |
| 16 | + schemes = ["RK443", "SDC", "SDC-MPI2-GT"] # + ["SDC-MPI", "SDC-MPI2"] |
| 17 | +elif R == 1: |
| 18 | + schemes = ["RK443", "SDC", "SDC-MPI2-GT"] |
16 | 19 |
|
17 | 20 | useNSpS = False |
18 | 21 | nSpS = { |
|
47 | 50 | results[scheme].sort(key=lambda p: p[0]) |
48 | 51 |
|
49 | 52 | symbols = ["o", "^", "s", "p", "*"] |
| 53 | +colors = plt.rcParams['axes.prop_cycle'].by_key()['color'] |
| 54 | +ls = "--" if "64tpc" in folder else "-" |
50 | 55 |
|
51 | | - |
52 | | -plt.figure("scaling"+"-nSpS"*useNSpS) |
53 | | -for scheme, sym in zip(results.keys(), symbols): |
| 56 | +plt.figure("scaling"+"-nSpS"*useNSpS+f"-R{R}") |
| 57 | +for scheme, sym, col in zip(results.keys(), symbols, colors): |
54 | 58 | res = np.array(results[scheme]).T |
55 | | - plt.loglog(*res, sym+'-', label=scheme) |
56 | | - plt.loglog(res[0], np.prod(res[:, 0])/res[0], "--", c="gray") |
| 59 | + plt.loglog(*res, sym+ls, label=scheme, c=col) |
| 60 | + # plt.loglog(res[0], np.prod(res[:, 0])/res[0], "--", c="gray") |
57 | 61 | plt.legend() |
58 | 62 | plt.grid(True) |
59 | 63 | plt.xlabel("$N_{p}$") |
|
64 | 68 | plt.tight_layout() |
65 | 69 |
|
66 | 70 |
|
67 | | -plt.figure("PinT-speedup") |
| 71 | +plt.figure(f"PinT-speedup-R{R}") |
68 | 72 | nProcSpace, tSDC = np.array(results["SDC"]).T |
69 | | -for scheme, sym in zip(schemes[2:], symbols): |
| 73 | +for scheme, sym, col in zip(schemes[2:], symbols, colors): |
70 | 74 | _, tSDCPinT = np.array(results[scheme]).T |
71 | | - speedup = tSDC[:-2]/tSDCPinT |
72 | | - plt.semilogx(nProcSpace[:-2], speedup, sym+"-", label=scheme) |
| 75 | + speedup = tSDC[:len(tSDCPinT)]/tSDCPinT |
| 76 | + plt.semilogx(nProcSpace[:len(tSDCPinT)], speedup, sym+ls, c=col, label=scheme) |
73 | 77 | plt.legend() |
74 | 78 | plt.grid(True) |
75 | 79 | plt.xlabel("$N_{p,S}$"), plt.ylabel("PinT Speedup") |
|
0 commit comments