Compare commits

...
3 Commits
Author SHA1 Message Date
paul dee3c87c66 Add strong scaling GPU actions table 2024-03-11 07:00:58 +01:00
paul 3ba78c5f11 Add timing script for investigating action contribution 2024-03-11 04:31:14 +01:00
paul dac08095c4 Add weak timings 2024-03-11 01:45:18 +01:00
13 changed files with 190 additions and 18 deletions
@@ -0,0 +1,4 @@
label,BC:cells,BC:dynamicecm,Sweep:Cells,Sweep:DynamicECM,Sweep:DynamicECMDampers,Filling,Other
CPU,0.04629667717328299,3.88243023434036,0.002164069189058585,82.18255346583861,13.842310640806883,0.005797982839735358,0.03844692981207934
GPU,0.034897486509106485,41.227398706349675,13.180664898871365,22.432483220415783,19.749714111977486,1.9939606413394697,1.3808809345371023
Booster,0.09128030041871667,42.736382370072874,12.260298369798207,22.36492489089858,16.070196185259338,4.364304866307413,2.1126130172448816
1 label BC:cells BC:dynamicecm Sweep:Cells Sweep:DynamicECM Sweep:DynamicECMDampers Filling Other
2 CPU 0.04629667717328299 3.88243023434036 0.002164069189058585 82.18255346583861 13.842310640806883 0.005797982839735358 0.03844692981207934
3 GPU 0.034897486509106485 41.227398706349675 13.180664898871365 22.432483220415783 19.749714111977486 1.9939606413394697 1.3808809345371023
4 Booster 0.09128030041871667 42.736382370072874 12.260298369798207 22.36492489089858 16.070196185259338 4.364304866307413 2.1126130172448816
+4
View File
@@ -0,0 +1,4 @@
label,BC:cells,BC:dynamicecm,Sweep:Cells,Sweep:DynamicECM,Sweep:DynamicECMDampers,Other
CPU,0.9047934333333334,75.87579921250001,0.04229322083333333,1606.12465625,270.5255006333333,0.8646950250000001
GPU,0.11372260000000001,134.35027680000002,42.952648800000006,73.102122,64.3596162,10.9978052
Booster,0.155221,72.67267939999999,20.848482800000003,38.0312728,27.327165999999995,11.013917200000002
1 label BC:cells BC:dynamicecm Sweep:Cells Sweep:DynamicECM Sweep:DynamicECMDampers Other
2 CPU 0.9047934333333334 75.87579921250001 0.04229322083333333 1606.12465625 270.5255006333333 0.8646950250000001
3 GPU 0.11372260000000001 134.35027680000002 42.952648800000006 73.102122 64.3596162 10.9978052
4 Booster 0.155221 72.67267939999999 20.848482800000003 38.0312728 27.327165999999995 11.013917200000002
@@ -0,0 +1,9 @@
label,BC:cells,BC:dynamicecm,Sweep:Cells,Sweep:DynamicECM,Sweep:DynamicECMDampers,Filling,Other
1,0.034897486509106485,41.227398706349675,13.180664898871365,22.432483220415783,19.749714111977486,1.9939606413394697,1.3808809345371023
2,0.7137918070198439,50.7137377526309,8.923981074147767,19.35772833011394,17.571497161475467,1.320924803923136,1.3983390706889622
4,0.6647403410134337,58.291944402330074,7.087118055335309,16.67352093599457,15.236952119238136,1.092645293437499,0.953078852650984
8,0.6788278363464717,65.05900206274784,5.2089254465999275,14.249993130938188,13.176763096049008,0.7851584656500297,0.8413299616685318
16,1.441574901760373,61.1245906198054,4.832237599492141,16.029377636605524,14.996293924006913,0.716990077435801,0.858935240893841
32,3.3736940900007966,47.94830950907802,5.622259685491874,21.238716402604393,19.97281149065964,0.8196124452570666,1.0245963769081996
64,6.284545018581091,45.28808866195176,4.502683326147901,21.66574860147326,20.522789117514915,0.6460791296539419,1.0900661446771265
128,11.788574344478201,40.04977497065291,3.2677482351392375,22.1995263401806,21.209134936528987,0.4598839494487746,1.0253572235712836
1 label BC:cells BC:dynamicecm Sweep:Cells Sweep:DynamicECM Sweep:DynamicECMDampers Filling Other
2 1 0.034897486509106485 41.227398706349675 13.180664898871365 22.432483220415783 19.749714111977486 1.9939606413394697 1.3808809345371023
3 2 0.7137918070198439 50.7137377526309 8.923981074147767 19.35772833011394 17.571497161475467 1.320924803923136 1.3983390706889622
4 4 0.6647403410134337 58.291944402330074 7.087118055335309 16.67352093599457 15.236952119238136 1.092645293437499 0.953078852650984
5 8 0.6788278363464717 65.05900206274784 5.2089254465999275 14.249993130938188 13.176763096049008 0.7851584656500297 0.8413299616685318
6 16 1.441574901760373 61.1245906198054 4.832237599492141 16.029377636605524 14.996293924006913 0.716990077435801 0.858935240893841
7 32 3.3736940900007966 47.94830950907802 5.622259685491874 21.238716402604393 19.97281149065964 0.8196124452570666 1.0245963769081996
8 64 6.284545018581091 45.28808866195176 4.502683326147901 21.66574860147326 20.522789117514915 0.6460791296539419 1.0900661446771265
9 128 11.788574344478201 40.04977497065291 3.2677482351392375 22.1995263401806 21.209134936528987 0.4598839494487746 1.0253572235712836
File diff suppressed because one or more lines are too long
+9
View File
@@ -0,0 +1,9 @@
nodes tasks mean_time std_time efficiency efficiency_error
1 1 41.98463099999999 1.4067920862965122 1.0 0.023219381860496473
1 2 49.85189340000001 1.7669363566083227 0.8421872899214694 0.020685165974491628
1 4 59.9694977 2.209151778903949 0.7000997608822725 0.01787171173813342
2 8 72.810012625 0.5538313058789631 0.5766326565034021 0.003039461920431096
4 16 84.718001525 5.20969191162485 0.4955809892140865 0.021118450727088397
8 32 87.22569569999999 1.7018797711775082 0.4813332890390463 0.0065079080866405825
16 64 85.36740952500001 1.0197522041876155 0.49181099946232654 0.004071100890302765
32 128 87.5995021046875 0.8707125543332932 0.47927933368645675 0.003301208459097849
1 nodes tasks mean_time std_time efficiency efficiency_error
2 1 1 41.98463099999999 1.4067920862965122 1.0 0.023219381860496473
3 1 2 49.85189340000001 1.7669363566083227 0.8421872899214694 0.020685165974491628
4 1 4 59.9694977 2.209151778903949 0.7000997608822725 0.01787171173813342
5 2 8 72.810012625 0.5538313058789631 0.5766326565034021 0.003039461920431096
6 4 16 84.718001525 5.20969191162485 0.4955809892140865 0.021118450727088397
7 8 32 87.22569569999999 1.7018797711775082 0.4813332890390463 0.0065079080866405825
8 16 64 85.36740952500001 1.0197522041876155 0.49181099946232654 0.004071100890302765
9 32 128 87.5995021046875 0.8707125543332932 0.47927933368645675 0.003301208459097849
File diff suppressed because one or more lines are too long
+10
View File
@@ -0,0 +1,10 @@
nodes tasks mean_time std_time efficiency efficiency_error
1 48 234.09125610833334 4.9756238110995765 1.0 0.013886639526655382
2 96 234.09269640000002 1.9886350551995884 0.9999938473447108 0.005550081636855162
4 192 239.06532950520833 1.8931447841474947 0.9791936647310181 0.005066063671757703
8 384 241.32357499479167 0.977728668984766 0.9700306160033705 0.0025676679349660694
16 768 260.8008324059896 12.802824235961744 0.8975863073317291 0.028787758154736998
32 1536 266.59983470546877 13.970338204797093 0.8780622702446538 0.03006125980502309
64 3072 281.61153985800786 25.95560834859075 0.8312559074332151 0.05005532970709546
128 6144 293.4177162058594 10.8076489888669 0.7978088683101088 0.019198998510810975
256 12288 310.9775802693196 14.459893325743863 0.7527592693518308 0.022867934404056486
1 nodes tasks mean_time std_time efficiency efficiency_error
2 1 48 234.09125610833334 4.9756238110995765 1.0 0.013886639526655382
3 2 96 234.09269640000002 1.9886350551995884 0.9999938473447108 0.005550081636855162
4 4 192 239.06532950520833 1.8931447841474947 0.9791936647310181 0.005066063671757703
5 8 384 241.32357499479167 0.977728668984766 0.9700306160033705 0.0025676679349660694
6 16 768 260.8008324059896 12.802824235961744 0.8975863073317291 0.028787758154736998
7 32 1536 266.59983470546877 13.970338204797093 0.8780622702446538 0.03006125980502309
8 64 3072 281.61153985800786 25.95560834859075 0.8312559074332151 0.05005532970709546
9 128 6144 293.4177162058594 10.8076489888669 0.7978088683101088 0.019198998510810975
10 256 12288 310.9775802693196 14.459893325743863 0.7527592693518308 0.022867934404056486
File diff suppressed because one or more lines are too long
+9
View File
@@ -0,0 +1,9 @@
nodes tasks mean_time std_time efficiency efficiency_error
1 1 60.658062599999994 1.8711952545625232 1.0 0.021376748626269895
1 2 80.6903592 1.1554429061827625 0.751738661240214 0.007459415624087278
1 4 89.01234124999999 1.3979557323025515 0.6814567704677693 0.00741639040919915
2 8 101.357940575 4.784240687736861 0.5984539766286584 0.01957478845779047
4 16 106.2530252 1.5044057675724636 0.5708831582519497 0.005601211794070455
8 32 113.70197445 2.069642901549501 0.5334829310873062 0.006729131548114211
16 64 119.22770070624999 0.7600051865549382 0.5087581345667959 0.00224730403456563
32 128 121.8124414140625 0.5170666166834136 0.4979627852118346 0.0014647476739746731
1 nodes tasks mean_time std_time efficiency efficiency_error
2 1 1 60.658062599999994 1.8711952545625232 1.0 0.021376748626269895
3 1 2 80.6903592 1.1554429061827625 0.751738661240214 0.007459415624087278
4 1 4 89.01234124999999 1.3979557323025515 0.6814567704677693 0.00741639040919915
5 2 8 101.357940575 4.784240687736861 0.5984539766286584 0.01957478845779047
6 4 16 106.2530252 1.5044057675724636 0.5708831582519497 0.005601211794070455
7 8 32 113.70197445 2.069642901549501 0.5334829310873062 0.006729131548114211
8 16 64 119.22770070624999 0.7600051865549382 0.5087581345667959 0.00224730403456563
9 32 128 121.8124414140625 0.5170666166834136 0.4979627852118346 0.0014647476739746731
@@ -129,6 +129,42 @@ def make_cpu_ex(x: int, y: int, z: int) -> Experiment:
)
def make_gpu_ex(x: int, y: int, z: int) -> Experiment:
num_blocks = x * y * z
gpus_per_node = num_blocks if num_blocks <= 4 else 4
num_nodes = 1 if num_blocks <= 4 else num_blocks // 4
return Experiment(
job_name=f"weak-gpu-{x:02}-{y:02}-{z:02}",
account="cellsinsilico",
partition="gpus",
extra_sbatch_line=f"#SBATCH --gres=gpu:{gpus_per_node}",
nastja_binary_path="/p/project/cellsinsilico/paulslustigebude/nastja/build-cuda/nastja",
nodes=num_nodes,
tasks=num_blocks,
num_blocks=(x, y, z),
domain_scale=(x, y, z),
)
def make_booster_ex(x: int, y: int, z: int) -> Experiment:
num_blocks = x * y * z
gpus_per_node = num_blocks if num_blocks <= 4 else 4
num_nodes = 1 if num_blocks <= 4 else num_blocks // 4
return Experiment(
job_name=f"weak-booster-{x:02}-{y:02}-{z:02}",
account="hkf6",
partition="booster",
extra_sbatch_line=f"#SBATCH --gres=gpu:{gpus_per_node}",
nastja_binary_path="/p/project/cellsinsilico/paulslustigebude/nastja/build-cuda/nastja",
nodes=num_nodes,
tasks=num_blocks,
num_blocks=(x, y, z),
domain_scale=(x, y, z),
)
experiments = [
make_cpu_ex(4, 4, 3),
make_cpu_ex(4, 4, 6),
@@ -138,6 +174,25 @@ experiments = [
make_cpu_ex(8, 8, 24),
make_cpu_ex(8, 16, 24),
make_cpu_ex(16, 16, 24),
make_cpu_ex(16, 16, 48),
make_gpu_ex(1, 1, 1),
make_gpu_ex(1, 1, 2),
make_gpu_ex(1, 2, 2),
make_gpu_ex(2, 2, 2),
make_gpu_ex(2, 2, 4),
make_gpu_ex(2, 4, 4),
make_gpu_ex(4, 4, 4),
make_gpu_ex(4, 4, 8),
make_booster_ex(1, 1, 1),
make_booster_ex(1, 1, 2),
make_booster_ex(1, 2, 2),
make_booster_ex(2, 2, 2),
make_booster_ex(2, 2, 4),
make_booster_ex(2, 4, 4),
make_booster_ex(4, 4, 4),
make_booster_ex(4, 4, 8),
]
if __name__ == "__main__":
@@ -12,9 +12,13 @@ def show_seconds(s: float) -> str:
if __name__ == '__main__':
p = argparse.ArgumentParser(description="Make a latex table from a timings tsv")
p.add_argument("timingfile")
p.add_argument("--weak", action="store_true")
args = p.parse_args()
df = pandas.read_csv(args.timingfile, sep="\t")
for i in range(len(df)):
if not args.weak:
print(f"{df['nodes'][i]} & {df['tasks'][i]} & {show_seconds(df['mean_time'][i])} & {show_seconds(df['std_time'][i])} & {df['speedup'][i]:.02f} & {df['speedup_error'][i]:.02f} \\\\")
else:
print(f"{df['nodes'][i]} & {df['tasks'][i]} & {show_seconds(df['mean_time'][i])} & {show_seconds(df['std_time'][i])} & {df['efficiency'][i]:.02f} & {df['efficiency_error'][i]:.02f} \\\\")
+61
View File
@@ -0,0 +1,61 @@
#!/usr/bin/env python
import argparse
import sys
import timing
ignore = ["TimeStep"]
if __name__ == "__main__":
p = argparse.ArgumentParser()
p.add_argument("jobs", nargs="+")
p.add_argument("--normalize", action="store_true")
p.add_argument("--extra-columns", nargs="*")
args = p.parse_args()
columns = [
"BC:cells",
"BC:dynamicecm",
"Sweep:Cells",
"Sweep:DynamicECM",
"Sweep:DynamicECMDampers",
] + (args.extra_columns or [])
dfs = dict()
labels = []
for label, jobid in [jobarg.split(":") for jobarg in args.jobs]:
jobs, excluded_array_indices = timing.get_jobs(jobid)
df = timing.load_array_mean_timings(jobid, excluded_array_indices).mean()
dfs[label] = df
labels.extend(df.index)
labels = set(labels)
print(",".join(["label"] + columns + ["Other"]))
values_by_label = dict()
for label, df in dfs.items():
values = {"Other": 0}
for c in df.index:
if c in ignore:
continue
elif c not in columns:
values["Other"] += df[c]
print(f"Others+= {c}={df[c]}", file=sys.stderr)
else:
values[c] = df[c]
values_by_label[label] = values
if args.normalize:
print("Normalizing data to 100%...", file=sys.stderr)
for values in values_by_label.values():
row_length = sum(values.values())
for c in values.keys():
values[c] *= 100 / row_length
for label, values in values_by_label.items():
print(label + "," + ",".join(f"{values[c]}" for c in columns + ["Other"]))
+15 -11
View File
@@ -72,18 +72,8 @@ def get_accounting_data(jobid: str):
return json.loads(sacct_results.stdout.decode("utf8"))
if __name__ == "__main__":
p = argparse.ArgumentParser(description="Load and analzye data from nastja timing files")
p.add_argument("jobid", nargs="+")
p.add_argument("--prettify", action="store_true")
p.add_argument("--dump-timings", action="store_true")
args = p.parse_args()
results = []
for i, jobid in enumerate(args.jobid, 1):
print(f"({i:2}/{len(args.jobid):2}) Loading accounting data for {jobid}", file=sys.stderr)
def get_jobs(jobid: str):
accounting_data = get_accounting_data(jobid)
jobs = []
excluded_array_indices = []
for array_job in accounting_data["jobs"]:
@@ -99,6 +89,20 @@ if __name__ == "__main__":
continue
jobs.append(last_step)
return jobs, excluded_array_indices
if __name__ == "__main__":
p = argparse.ArgumentParser(description="Load and analzye data from nastja timing files")
p.add_argument("jobid", nargs="+")
p.add_argument("--prettify", action="store_true")
p.add_argument("--dump-timings", action="store_true")
args = p.parse_args()
results = []
for i, jobid in enumerate(args.jobid, 1):
print(f"({i:2}/{len(args.jobid):2}) Loading accounting data for {jobid}", file=sys.stderr)
jobs, excluded_array_indices = get_jobs(jobid)
array_mean_timings = load_array_mean_timings(jobid, excluded_array_indices)
if args.dump_timings:
print(array_mean_timings, file=sys.stderr)