Skip to content

Commit 89940af

Browse files
authored
Merge pull request #386 from boegel/2023.06-eessi.io-tensorflow-2023a
2 parents 4b1133c + 04d39a7 commit 89940af

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,8 @@ easyconfigs:
1212
options:
1313
from-pr: 19270
1414
- SciPy-bundle-2023.07-gfbf-2023a.eb
15+
- TensorFlow-2.13.0-foss-2023a.eb:
16+
# patch setup.py for grpcio extension in TensorFlow 2.13.0 easyconfigs to take into account alternate sysroot;
17+
# see https://github.com/easybuilders/easybuild-easyconfigs/pull/19268
18+
options:
19+
from-pr: 19268

eb_hooks.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,21 @@ def parse_hook(ec, *args, **kwargs):
6969
PARSE_HOOKS[ec.name](ec, eprefix)
7070

7171

72+
def post_ready_hook(self, *args, **kwargs):
73+
"""
74+
Post-ready hook: limit parallellism for selected builds, because they require a lot of memory per used core.
75+
"""
76+
# 'parallel' easyconfig parameter is set via EasyBlock.set_parallel in ready step based on available cores.
77+
# here we reduce parallellism to only use half of that for selected software,
78+
# to avoid failing builds/tests due to out-of-memory problems
79+
if self.name in ['TensorFlow']:
80+
parallel = self.cfg['parallel']
81+
if parallel > 1:
82+
self.cfg['parallel'] = parallel // 2
83+
msg = "limiting parallelism to %s (was %s) for %s to avoid out-of-memory failures during building/testing"
84+
print_msg(msg % (self.cfg['parallel'], parallel, self.name), log=self.log)
85+
86+
7287
def pre_prepare_hook(self, *args, **kwargs):
7388
"""Main pre-prepare hook: trigger custom functions."""
7489

0 commit comments

Comments
 (0)