@@ -137,12 +137,16 @@ def plot_scaling_test(self, ax, quantity='time', **plotting_params): # pragma:
137137
138138 if quantity == 'throughput' :
139139 timings [np .prod (procs ) / self .tasks_per_node ] = experiment .res ** self .ndim / t_mean
140+ elif quantity == 'throughput_per_task' :
141+ timings [np .prod (procs )] = experiment .res ** self .ndim / t_mean
140142 elif quantity == 'efficiency' :
141143 timings [np .prod (procs ) / self .tasks_per_node ] = (
142144 experiment .res ** self .ndim / t_mean / np .prod (procs )
143145 )
144146 elif quantity == 'time' :
145147 timings [np .prod (procs ) / self .tasks_per_node ] = t_mean
148+ elif quantity == 'time_per_task' :
149+ timings [np .prod (procs )] = t_mean
146150 else :
147151 raise NotImplementedError
148152 except (FileNotFoundError , ValueError ):
@@ -154,10 +158,15 @@ def plot_scaling_test(self, ax, quantity='time', **plotting_params): # pragma:
154158 ** plotting_params [(self .useGPU , experiment .PinT )],
155159 marker = experiment .marker ,
156160 )
157- ax .set_xlabel (r'$N_\mathrm{nodes}$' )
161+ if 'per_task' in quantity :
162+ ax .set_xlabel (r'$N_\mathrm{procs}$' )
163+ else :
164+ ax .set_xlabel (r'$N_\mathrm{nodes}$' )
158165 labels = {
159166 'throughput' : 'throughput / DoF/s' ,
167+ 'throughput_per_task' : 'throughput / DoF/s' ,
160168 'time' : r'$t_\mathrm{step}$ / s' ,
169+ 'time_per_task' : r'$t_\mathrm{step}$ / s' ,
161170 'efficiency' : 'efficiency / DoF/s/task' ,
162171 }
163172 ax .set_ylabel (labels [quantity ])
@@ -293,13 +302,15 @@ class RayleighBenardSpaceScalingGPU(GPUConfig, RBCBaseConfig):
293302
294303
295304class RayleighBenardDedalusComparison (CPUConfig , RBCBaseConfig ):
305+ cluster = 'jusuf'
306+ tasks_per_node = 64
296307 base_resolution = 256
297308 config = 'RBC_Tibo'
298309 max_steps_space = 6
299310 tasks_time = 4
300311 experiments = [
301312 Experiment (res = 256 , PinT = False , start = 1 , stop = 64 , marker = '.' ),
302- Experiment (res = 256 , PinT = True , start = 4 , stop = 256 , marker = '.' ),
313+ # Experiment(res=256, PinT=True, start=4, stop=256, marker='.'),
303314 ]
304315
305316
@@ -310,6 +321,10 @@ class RayleighBenardDedalusComparisonGPU(GPUConfig, ScalingConfig):
310321 max_steps_space = 4
311322 max_steps_space_weak = 4
312323 tasks_time = 4
324+ experiments = [
325+ Experiment (res = 256 , PinT = False , start = 1 , stop = 1 , marker = '.' ),
326+ # Experiment(res=256, PinT=True, start=4, stop=256, marker='.'),
327+ ]
313328
314329
315330def plot_scalings (problem , ** kwargs ): # pragma: no cover
@@ -340,25 +355,33 @@ def plot_scalings(problem, **kwargs): # pragma: no cover
340355 ideal_lines = {
341356 ('GS3D' , 'throughput' ): {'x' : [0.25 , 400 ], 'y' : [5e6 , 8e9 ]},
342357 ('GS3D' , 'time' ): {'x' : [0.25 , 400 ], 'y' : [80 , 5e-2 ]},
343- ('RBC' , 'throughput' ): {'x' : [1 / 10 , 64 ], 'y' : [2e4 , 2e4 * 640 ]},
344- ('RBC' , 'time' ): {'x' : [1 / 10 , 64 ], 'y' : [60 , 60 / 640 ]},
358+ ('RBC' , 'throughput' ): {'x' : [1 / 10 , 64 ], 'y' : [2e4 , 2e4 * 640 ]},
359+ ('RBC' , 'time' ): {'x' : [1 / 10 , 64 ], 'y' : [60 , 60 / 640 ]},
360+ ('RBC' , 'time_per_task' ): {'x' : [1 , 640 ], 'y' : [60 , 60 / 640 ]},
361+ ('RBC' , 'throughput_per_task' ): {'x' : [1 / 1 , 640 ], 'y' : [2e4 , 2e4 * 640 ]},
345362 }
346363
347364 fig , ax = plt .subplots (figsize = figsize_by_journal ('TUHH_thesis' , 1 , 0.6 ))
348365 configs [1 ].plot_scaling_test (ax = ax , quantity = 'efficiency' )
349- ax .legend (frameon = False )
366+ # ax.legend(frameon=False)
367+ box = ax .get_position ()
368+ ax .set_position ([box .x0 , box .y0 , box .width * 0.8 , box .height ])
369+ ax .legend (loc = 'center left' , bbox_to_anchor = (1 , 0.5 ))
370+
350371 ax .set_yscale ('linear' )
351372 path = f'{ PROJECT_PATH } /plots/scaling_{ problem } _efficiency.pdf'
352373 fig .savefig (path , bbox_inches = 'tight' )
353374 print (f'Saved { path !r} ' , flush = True )
354375
355- for quantity in ['time' , 'throughput' ]:
376+ for quantity in ['time' , 'throughput' , 'time_per_task' , 'throughput_per_task' ][:: - 1 ]:
356377 fig , ax = plt .subplots (figsize = figsize_by_journal ('TUHH_thesis' , 1 , 0.6 ))
357378 for config in configs :
358379 config .plot_scaling_test (ax = ax , quantity = quantity )
359380 if (problem , quantity ) in ideal_lines .keys ():
360381 ax .loglog (* ideal_lines [(problem , quantity )].values (), color = 'black' , ls = ':' , label = 'ideal' )
361- ax .legend (frameon = False )
382+ box = ax .get_position ()
383+ ax .set_position ([box .x0 , box .y0 , box .width * 0.8 , box .height ])
384+ ax .legend (loc = 'center left' , bbox_to_anchor = (1 , 0.5 ))
362385 path = f'{ PROJECT_PATH } /plots/scaling_{ problem } _{ quantity } .pdf'
363386 fig .savefig (path , bbox_inches = 'tight' )
364387 print (f'Saved { path !r} ' , flush = True )
0 commit comments