ukri-excalibur / excalibur-tests

Performance benchmarks and regression tests for the ExCALIBUR project
https://ukri-excalibur.github.io/excalibur-tests/
Apache License 2.0
18 stars 15 forks source link

[sombrero] Handle systems where number of cores doesn't divide lattice volume #250

Closed giordano closed 8 months ago

giordano commented 9 months ago

Should fix https://github.com/ukri-excalibur/excalibur-tests/issues/237#issuecomment-1827595717. I followed the suggestion in https://github.com/ukri-excalibur/excalibur-tests/issues/237#issuecomment-1828323882. Probably this isn't the most efficient algorithm out there, but this takes a bunch of microseconds on my laptop, so hopefully it won't be a major performance bottleneck:

In [7]: %%timeit
   ...: max_num_tasks(112, LATTICE_VOLUME)
   ...: 
   ...: 
3.75 µs ± 24.6 ns per loop (mean ± std. dev. of 7 runs, 100,000 loops each)

CC: @mirenradia.

mirenradia commented 9 months ago

Probably this isn't the most efficient algorithm out there, but this takes a bunch of microseconds on my laptop, so hopefully it won't be a major performance bottleneck.

I agree that this is extremely unlikely to be a problem so I have no issues with it.

mirenradia commented 8 months ago

LGTM (but I can't approve it until you re-request a review).

I have tested this works on the CSD3 Icelakes as expected (by passing -S num_nodes=48 for the ITT-64n test).

giordano commented 8 months ago

Thanks!