Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to Isambard-3 spack env and purify benchmark #356

Merged
merged 9 commits into from
Jan 17, 2025
64 changes: 58 additions & 6 deletions benchmarks/apps/purify/purify.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class PurifyBase(SpackTest):
valid_systems = ['*']
valid_prog_environs = ['default']

spack_spec = 'purify@4.2.0+benchmarks'
spack_spec = 'purify@5.0.0+mpi+openmp+benchmarks ^fftw'
executable_opts = ['--benchmark_format=csv',
'--benchmark_out=purify_benchmark.out',
'--benchmark_out_format=csv']
Expand Down Expand Up @@ -104,7 +104,7 @@ def filter_benchmarks(self):
self.env_vars['OMP_NUM_THREADS'] = f'{self.threads}'
self.num_tasks = self.tasks
self.num_cpus_per_task = self.threads
self.num_tasks_per_node = 1
self.num_tasks_per_node = max(1,self.current_partition.processor.num_sockets)

@rfm.simple_test
class PurifyPADMMBenchmark_PratleyEtAl(PurifyBase):
Expand All @@ -114,19 +114,71 @@ class PurifyPADMMBenchmark_PratleyEtAl(PurifyBase):
threads = 16
tasks = parameter([1,2,3,4,8,12])

executable = 'mpi_benchmark_PADMM'
executable = 'mpi_benchmark_algorithms'
time_limit = '60m'

algorithm = parameter(["PadmmDistributeImage", "PadmmDistributeGrid"])
numberOfVisibilities = parameter([10**6, 10**7])
imgsize = parameter([1024])

@run_after('setup')
def filter_benchmarks(self):
self.executable_opts.append(f'--benchmark_filter=AlgoFixtureMPI/'
f'{self.algorithm}'
f'/{self.imgsize}/{self.numberOfVisibilities}/')
self.env_vars['OMP_NUM_THREADS'] = f'{self.threads}'
self.num_tasks = self.tasks
self.num_cpus_per_task = self.threads
self.num_tasks_per_node = max(1,self.current_partition.processor.num_sockets)

@rfm.simple_test
class PurifyForwardBackwardBenchmark(PurifyBase):
"""
This benchmark uses the Forward Backward algorithm, otherwise it's similar to PurifyPADMMBenchmark.
"""
threads = 16
tasks = parameter([1,2,4,8,16])

executable = 'mpi_benchmark_algorithms'
time_limit = '60m'

algorithm = parameter([1,3])
algorithm = parameter(["FbDistributeImage", "FbDistributeGrid"])
numberOfVisibilities = parameter([10**6, 10**7])
imgsize = parameter([1024])

@run_after('setup')
def filter_benchmarks(self):
self.executable_opts.append(f'--benchmark_filter=PadmmFixtureMPI/'
f'ApplyAlgo{self.algorithm}'
self.executable_opts.append(f'--benchmark_filter=AlgoFixtureMPI/'
f'{self.algorithm}'
f'/{self.imgsize}/{self.numberOfVisibilities}/')
self.env_vars['OMP_NUM_THREADS'] = f'{self.threads}'
self.num_tasks = self.tasks
self.num_cpus_per_task = self.threads
self.num_tasks_per_node = 1

@rfm.simple_test
class PurifyForwardBackwardOnnxBenchmark(PurifyBase):
"""
This benchmark uses the Forward Backward algorithm, otherwise it's similar to PurifyPADMMBenchmark.
"""
omp_threads = parameter([16])
ort_threads = parameter([16])
tasks = parameter([1,2,4,8,16])

executable = 'mpi_benchmark_algorithms'
time_limit = '60m'

algorithm = parameter(["FbOnnxDistributeImage", "FbOnnxDistributeGrid"])
numberOfVisibilities = parameter([10**6, 10**7])
imgsize = parameter([1024])

@run_after('setup')
def filter_benchmarks(self):
self.executable_opts.append(f'--benchmark_filter=AlgoFixtureMPI/'
f'{self.algorithm}/{self.imgsize}/{self.numberOfVisibilities}/')
self.env_vars['OMP_NUM_THREADS'] = f'{self.omp_threads}'
self.env_vars['ORT_NUM_THREADS'] = f'{self.ort_threads}'
self.num_tasks = self.tasks
self.num_cpus_per_task = max(self.omp_threads, self.ort_threads)
self.num_tasks_per_node = max(1,self.current_partition.processor.num_sockets)
self.spack_spec = '[email protected]+mpi+openmp+benchmarks+onnxrt ^fftw'
42 changes: 30 additions & 12 deletions benchmarks/spack/isambard3/grace/spack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
# configuration settings.
spack:
# add package specs to the `specs` list
specs:
- purify+mpi
view: false
include:
- ../../common.yaml
Expand All @@ -25,6 +23,16 @@ spack:
environment: {}
extra_rpaths: []
packages:
cmake:
externals:
- spec: [email protected]
prefix: /usr
python:
externals:
- spec: [email protected]+bz2+crypt+ctypes+dbm+lzma+pyexpat+pythoncmd+readline+sqlite3+ssl+tix+tkinter+uuid+zlib
prefix: /opt/cray/pe/python/3.11.7
- spec: [email protected]+bz2+crypt+ctypes+dbm+lzma+pyexpat~pythoncmd+readline+sqlite3+ssl~tkinter+uuid+zlib
prefix: /usr
groff:
externals:
- spec: [email protected]
Expand Down Expand Up @@ -81,10 +89,6 @@ spack:
externals:
- spec: [email protected]
prefix: /usr
cmake:
externals:
- spec: [email protected]
prefix: /usr
pkg-config:
externals:
- spec: [email protected]
Expand Down Expand Up @@ -146,9 +150,23 @@ spack:
modules:
- craype-network-ofi
- cray-mpich/8.1.29
# cray-fftw:
# externals:
# - spec: [email protected]
# prefix: /opt/cray/pe/fftw/3.3.10.7/arm_grace/
# modules:
# - brics/cray-fftw/3.3.10.7
py-numpy:
externals:
- spec: [email protected] ^[email protected]
modules:
- cray-python
prefix: /opt/cray/pe/python/3.11.7
py-scipy:
externals:
- spec: [email protected] ^[email protected]
modules:
- cray-python
prefix: /opt/cray/pe/python/3.11.7
py-mpi4py:
externals:
- spec: [email protected] ^[email protected]
modules:
- cray-python
prefix: /opt/cray/pe/python/3.11.7
specs:
- purify+onnxrt
Loading