Skip to content

Commit 100d84c

Browse files
authored
Merge pull request EESSI#1040 from trz42/2023.06-a64fx-2023a-eb490-apps-2
{2023.06}[2023a,a64fx] add remaining apps originally built with EB 4.9.0
2 parents 43ef473 + 5709643 commit 100d84c

File tree

2 files changed

+167
-25
lines changed

2 files changed

+167
-25
lines changed

easystacks/software.eessi.io/2023.06/a64fx/eessi-2023.06-eb-4.9.4-2023a.yml

Lines changed: 103 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@ easyconfigs:
1414
# originally built with EB 4.8.2; PR 19270 included since EB 4.9.0
1515
# - pybind11-2.11.1-GCCcore-12.3.0.eb:
1616
# # avoid indirect dependency on old CMake version built with GCCcore/10.2.0 via Catch2 build dependency;
17-
# # see https://github.com/easybuilders/easybuild-easyconfigs/pull/19270
1817
# options:
18+
# # see https://github.com/easybuilders/easybuild-easyconfigs/pull/19270
1919
# from-pr: 19270
2020
- pybind11-2.11.1-GCCcore-12.3.0.eb
2121
# the package SciPy-bundle itself has to be rebuilt; here we use the commit to add the dependency
2222
# Cython; PR 21693 is included since EB 5.0.0
2323
# - SciPy-bundle-2023.07-gfbf-2023a.eb:
2424
# options:
25+
# # see https://github.com/easybuilders/easybuild-easyconfigs/pull/21693
2526
# from-pr: 21693
2627
- SciPy-bundle-2023.07-gfbf-2023a.eb:
2728
options:
@@ -48,31 +49,35 @@ easyconfigs:
4849
# originally built with EB 4.8.2; PR 19268 included since EB 4.9.0
4950
# - TensorFlow-2.13.0-foss-2023a.eb:
5051
# # patch setup.py for grpcio extension in TensorFlow 2.13.0 easyconfigs to take into account alternate sysroot;
51-
# # see https://github.com/easybuilders/easybuild-easyconfigs/pull/19268
5252
# options:
53+
# # see https://github.com/easybuilders/easybuild-easyconfigs/pull/19268
5354
# from-pr: 19268
5455
- TensorFlow-2.13.0-foss-2023a.eb
5556
- X11-20230603-GCCcore-12.3.0.eb
5657
# originally built with EB 4.8.2; PR 19339 included since EB 4.9.0
5758
# - HarfBuzz-5.3.1-GCCcore-12.3.0.eb:
5859
# options:
60+
# # see https://github.com/easybuilders/easybuild-easyconfigs/pull/19339
5961
# from-pr: 19339
6062
- HarfBuzz-5.3.1-GCCcore-12.3.0.eb
6163
- Qt5-5.15.10-GCCcore-12.3.0.eb
6264
- OSU-Micro-Benchmarks-7.1-1-gompi-2023a.eb
6365
# originally built with EB 4.8.2; PR 19363 included since EB 4.9.0
6466
# - LHAPDF-6.5.4-GCC-12.3.0.eb:
6567
# options:
68+
# # see https://github.com/easybuilders/easybuild-easyconfigs/pull/19363
6669
# from-pr: 19363
6770
- LHAPDF-6.5.4-GCC-12.3.0.eb
6871
# originally built with EB 4.8.2; PR 19397 included since EB 4.9.0
6972
# - LoopTools-2.15-GCC-12.3.0.eb:
7073
# options:
74+
# # see https://github.com/easybuilders/easybuild-easyconfigs/pull/19397
7175
# from-pr: 19397
7276
- LoopTools-2.15-GCC-12.3.0.eb
7377
# originally built with EB 4.8.2; PR 19185 included since EB 4.9.0
7478
# - R-4.3.2-gfbf-2023a.eb:
7579
# options:
80+
# # https://github.com/easybuilders/easybuild-easyconfigs/pull/19185
7681
# from-pr: 19185
7782
- R-4.3.2-gfbf-2023a.eb
7883
# originally built with EB 4.8.2; source URL has changed recently
@@ -87,16 +92,19 @@ easyconfigs:
8792
# originally built with EB 4.8.2; PR 19455 included since EB 4.9.0
8893
# - ALL-0.9.2-foss-2023a.eb:
8994
# options:
95+
# # https://github.com/easybuilders/easybuild-easyconfigs/pull/19455
9096
# from-pr: 19455
9197
- ALL-0.9.2-foss-2023a.eb
9298
# originally built with EB 4.8.2; PR 19735 included since EB 4.9.1
9399
# - CDO-2.2.2-gompi-2023a.eb:
94100
# options:
101+
# # https://github.com/easybuilders/easybuild-easyconfigs/pull/19735
95102
# from-pr: 19735
96103
- CDO-2.2.2-gompi-2023a.eb
97104
# originally built with EB 4.8.2; PR 19820 included since EB 4.9.1
98105
# - BWA-0.7.17-20220923-GCCcore-12.3.0.eb:
99106
# options:
107+
# # https://github.com/easybuilders/easybuild-easyconfigs/pull/19820
100108
# from-pr: 19820
101109
- BWA-0.7.17-20220923-GCCcore-12.3.0.eb
102110
# from here on apps were originally built with EB 4.9.0
@@ -113,14 +121,14 @@ easyconfigs:
113121
from-commit: e610fe1ac5393d1de668a466fdaaea74c580ee03
114122
# PR 19592 was included since EB 4.9.1
115123
# - ESPResSo-4.2.1-foss-2023a.eb:
116-
# # see https://github.com/easybuilders/easybuild-easyconfigs/pull/19592
117124
# options:
125+
# # see https://github.com/easybuilders/easybuild-easyconfigs/pull/19592
118126
# from-pr: 19592
119127
- ESPResSo-4.2.1-foss-2023a.eb
120128
# PR 19679 was included since EB 4.9.1
121129
# - Rivet-3.1.9-gompi-2023a-HepMC3-3.2.6.eb:
122-
# # see https://github.com/easybuilders/easybuild-easyconfigs/pull/19679
123130
# options:
131+
# # see https://github.com/easybuilders/easybuild-easyconfigs/pull/19679
124132
# from-pr: 19679
125133
- Rivet-3.1.9-gompi-2023a-HepMC3-3.2.6.eb
126134
- Pillow-10.0.0-GCCcore-12.3.0.eb
@@ -150,15 +158,103 @@ easyconfigs:
150158
from-commit: 0437ff1ad34283398f55d4a6e01e6540b1ae9688
151159
# PR 19646 was included since EB 4.9.1
152160
# - snakemake-8.4.2-foss-2023a.eb:
153-
# # see https://github.com/easybuilders/easybuild-easyconfigs/pull/19646
154161
# options:
162+
# # see https://github.com/easybuilders/easybuild-easyconfigs/pull/19646
155163
# from-pr: 19646
156164
- snakemake-8.4.2-foss-2023a.eb
157165
# PRs 19471 and 3036 were included since EB 4.9.1
158166
# - LAMMPS-2Aug2023_update2-foss-2023a-kokkos.eb:
159-
# # see https://github.com/easybuilders/easybuild-easyconfigs/pull/19471
160-
# # see https://github.com/easybuilders/easybuild-easyblocks/pull/3036
161167
# options:
168+
# # see https://github.com/easybuilders/easybuild-easyconfigs/pull/19471
162169
# from-pr: 19471
170+
# # see https://github.com/easybuilders/easybuild-easyblocks/pull/3036
163171
# include-easyblocks-from-pr: 3036
164172
- LAMMPS-2Aug2023_update2-foss-2023a-kokkos.eb
173+
## PR 19573 was included since EB 4.9.1
174+
## - PyTorch-2.1.2-foss-2023a.eb:
175+
## options:
176+
## # see https://github.com/easybuilders/easybuild-easyconfigs/pull/19573
177+
## from-pr: 19573
178+
# - PyTorch-2.1.2-foss-2023a.eb
179+
- matplotlib-3.7.2-gfbf-2023a.eb
180+
# PR 19554 was included since EB 4.9.1
181+
# - PyQt5-5.15.10-GCCcore-12.3.0.eb:
182+
# options:
183+
# # see https://github.com/easybuilders/easybuild-easyconfigs/pull/19554
184+
# from-pr: 19554
185+
- PyQt5-5.15.10-GCCcore-12.3.0.eb
186+
# PR 19996 was included since EB 4.9.1
187+
# - Pillow-SIMD-9.5.0-GCCcore-12.3.0.eb:
188+
# options:
189+
# # see https://github.com/easybuilders/easybuild-easyconfigs/pull/19996
190+
# from-pr: 19996
191+
- Pillow-SIMD-9.5.0-GCCcore-12.3.0.eb
192+
- dask-2023.9.2-foss-2023a.eb
193+
- JupyterNotebook-7.0.2-GCCcore-12.3.0.eb
194+
# PR 20086 was included since EB 4.9.1
195+
# - ImageMagick-7.1.1-15-GCCcore-12.3.0.eb:
196+
# options:
197+
# # see https://github.com/easybuilders/easybuild-easyconfigs/pull/20086
198+
# from-pr: 20086
199+
- ImageMagick-7.1.1-15-GCCcore-12.3.0.eb
200+
# PR 20050 was included since EB 4.9.1
201+
# - Z3-4.12.2-GCCcore-12.3.0.eb:
202+
# options:
203+
# # The Z3 dependency of PyTorch had it's versionsuffix removed
204+
# # and we need to workaround the problem this creates,
205+
# # see https://github.com/EESSI/software-layer/pull/501 for details
206+
# # see https://github.com/easybuilders/easybuild-easyconfigs/pull/20050
207+
# from-pr: 20050
208+
- Z3-4.12.2-GCCcore-12.3.0.eb
209+
# PR 20007 was included since EB 4.9.1
210+
# - PyOpenGL-3.1.7-GCCcore-12.3.0.eb:
211+
# options:
212+
# # see https://github.com/easybuilders/easybuild-easyconfigs/pull/20007
213+
# from-pr: 20007
214+
- PyOpenGL-3.1.7-GCCcore-12.3.0.eb
215+
- OpenJPEG-2.5.0-GCCcore-12.3.0.eb
216+
- Highway-1.0.4-GCCcore-12.3.0.eb
217+
- ELPA-2023.05.001-foss-2023a.eb
218+
# libxc was handled as follows when building NVIDIA Grace stack
219+
# - libxc-6.2.2-GCC-12.3.0.eb
220+
- libxc-6.2.2-GCC-12.3.0.eb:
221+
options:
222+
# possible change in gitlabs tarball packaging, affected by .gitattributes
223+
# https://github.com/easybuilders/easybuild-easyconfigs/pull/22580
224+
from-commit: 456d64bbeacf465e8f7e7ff378864e26352d045d
225+
# ParMETIS was handled as follows when building NVIDIA Grace stack
226+
# (it wasn't listed separately when building stack for Sapphire Rapids)
227+
- ParMETIS-4.0.3-gompi-2023a.eb:
228+
options:
229+
# source URLs for ParMETIS-4.0.3 have changed, corresponding PR is
230+
# https://github.com/easybuilders/easybuild-easyconfigs/pull/22579
231+
# ParMETIS-4.0.3 is a dependency of SuperLU_DIST-8.1.2
232+
from-commit: 977e5208a720f23ace41b83b84da8b717d0aeada
233+
# PR 20162 was included since EB 4.9.1
234+
# - SuperLU_DIST-8.1.2-foss-2023a.eb:
235+
# options:
236+
# # see https://github.com/easybuilders/easybuild-easyconfigs/pull/20162
237+
# from-pr: 20162
238+
- SuperLU_DIST-8.1.2-foss-2023a.eb
239+
# PRs 19686 and 3086 were included since EB 4.9.1
240+
# - PETSc-3.20.3-foss-2023a.eb:
241+
# options:
242+
# # see https://github.com/easybuilders/easybuild-easyblocks/pull/3086
243+
# include-easyblocks-from-pr: 3086
244+
# # see https://github.com/easybuilders/easybuild-easyconfigs/pull/20162
245+
# from-pr: 19686
246+
- PETSc-3.20.3-foss-2023a.eb
247+
# PR 20142 was included since EB 4.9.1
248+
# - MODFLOW-6.4.4-foss-2023a.eb:
249+
# options:
250+
# # see https://github.com/easybuilders/easybuild-easyconfigs/pull/20142
251+
# from-pr: 20142
252+
- MODFLOW-6.4.4-foss-2023a.eb
253+
# add all dependencies of R-bundle-CRAN-2023.12-foss-2023a.eb; due to a rebuild we will install the bundle itself with EB 4.9.4
254+
- NLopt-2.7.1-GCCcore-12.3.0.eb
255+
- nettle-3.9.1-GCCcore-12.3.0.eb
256+
- Xvfb-21.1.8-GCCcore-12.3.0.eb
257+
- libsndfile-1.2.2-GCCcore-12.3.0.eb
258+
- PostgreSQL-16.1-GCCcore-12.3.0.eb
259+
- ImageMagick-7.1.1-15-GCCcore-12.3.0.eb
260+
- GDAL-3.7.1-foss-2023a.eb

eb_hooks.py

Lines changed: 64 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -121,27 +121,38 @@ def parse_hook(ec, *args, **kwargs):
121121

122122
def post_ready_hook(self, *args, **kwargs):
123123
"""
124-
Post-ready hook: limit parallellism for selected builds, because they require a lot of memory per used core.
124+
Post-ready hook: limit parallellism for selected builds based on software name and CPU target.
125+
parallelism needs to be limited because some builds require a lot of memory per used core.
125126
"""
126127
# 'parallel' easyconfig parameter is set via EasyBlock.set_parallel in ready step based on available cores.
127-
# here we reduce parallellism to only use half of that for selected software,
128-
# to avoid failing builds/tests due to out-of-memory problems;
129-
memory_hungry_build = self.name in ['libxc', 'MBX', 'TensorFlow']
130-
# on A64FX systems, (HBM) memory is typically scarce, so we need to use fewer cores for some builds
128+
# get current parallelism setting
129+
parallel = self.cfg['parallel']
130+
if parallel == 1:
131+
return # no need to limit if already using 1 core
132+
133+
# get CPU target
131134
cpu_target = get_eessi_envvar('EESSI_SOFTWARE_SUBDIR')
132-
memory_hungry_build_a64fx = cpu_target == CPU_TARGET_A64FX and self.name in ['Qt5', 'ROOT']
133-
if memory_hungry_build or memory_hungry_build_a64fx:
134-
parallel = self.cfg['parallel']
135-
if cpu_target == CPU_TARGET_A64FX and self.name in ['TensorFlow']:
136-
# limit parallelism to 8, builds with 12 and 16 failed on Deucalion
137-
if parallel > 8:
138-
self.cfg['parallel'] = 8
139-
msg = "limiting parallelism to %s (was %s) for %s on %s to avoid out-of-memory failures during building/testing"
140-
print_msg(msg % (self.cfg['parallel'], parallel, self.name, cpu_target), log=self.log)
141-
elif parallel > 1:
142-
self.cfg['parallel'] = parallel // 2
143-
msg = "limiting parallelism to %s (was %s) for %s to avoid out-of-memory failures during building/testing"
144-
print_msg(msg % (self.cfg['parallel'], parallel, self.name), log=self.log)
135+
136+
# check if we have limits defined for this software
137+
if self.name in PARALLELISM_LIMITS:
138+
limits = PARALLELISM_LIMITS[self.name]
139+
140+
# first check for CPU-specific limit
141+
if cpu_target in limits:
142+
operation_func, operation_args = limits[cpu_target]
143+
new_parallel = operation_func(parallel, operation_args)
144+
# then check for generic limit (applies to all CPU targets)
145+
elif '*' in limits:
146+
operation_func, operation_args = limits['*']
147+
new_parallel = operation_func(parallel, operation_args)
148+
else:
149+
return # no applicable limits found
150+
151+
# apply the limit if it's different from current
152+
if new_parallel != parallel:
153+
self.cfg['parallel'] = new_parallel
154+
msg = "limiting parallelism to %s (was %s) for %s on %s to avoid out-of-memory failures during building/testing"
155+
print_msg(msg % (new_parallel, parallel, self.name, cpu_target), log=self.log)
145156

146157

147158
def pre_prepare_hook(self, *args, **kwargs):
@@ -1213,3 +1224,38 @@ def post_module_hook(self, *args, **kwargs):
12131224
}
12141225

12151226
POST_MODULE_HOOKS = {}
1227+
1228+
# Define parallelism limit operations
1229+
def divide_by_factor(parallel, factor):
1230+
"""Divide parallelism by given factor"""
1231+
return max(1, parallel // factor)
1232+
1233+
def set_maximum(parallel, max_value):
1234+
"""Set parallelism to maximum value"""
1235+
return min(parallel, max_value)
1236+
1237+
# Data structure defining parallelism limits for different software and CPU targets
1238+
# Format: {software_name: {cpu_target: (operation_function, operation_args)}}
1239+
# '*' for a CPU target means the operation applies to all CPU targets
1240+
# Information is processed in the post_ready_hook function. First it checks if the
1241+
# specific CPU target is defined in the data structure below. If not, it checks for
1242+
# the generic '*' entry.
1243+
PARALLELISM_LIMITS = {
1244+
'libxc': {
1245+
'*': (divide_by_factor, 2),
1246+
CPU_TARGET_A64FX: (set_maximum, 12),
1247+
},
1248+
'MBX': {
1249+
'*': (divide_by_factor, 2),
1250+
},
1251+
'TensorFlow': {
1252+
'*': (divide_by_factor, 2),
1253+
CPU_TARGET_A64FX: (set_maximum, 8),
1254+
},
1255+
'Qt5': {
1256+
CPU_TARGET_A64FX: (divide_by_factor, 2),
1257+
},
1258+
'ROOT': {
1259+
CPU_TARGET_A64FX: (divide_by_factor, 2),
1260+
},
1261+
}

0 commit comments

Comments
 (0)