Skip to content

Commit

Permalink
Merge pull request #386 from boegel/2023.06-eessi.io-tensorflow-2023a
Browse files Browse the repository at this point in the history
  • Loading branch information
bedroge authored Nov 29, 2023
2 parents 4b1133c + 04d39a7 commit 89940af
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@ easyconfigs:
options:
from-pr: 19270
- SciPy-bundle-2023.07-gfbf-2023a.eb
- TensorFlow-2.13.0-foss-2023a.eb:
# patch setup.py for grpcio extension in TensorFlow 2.13.0 easyconfigs to take into account alternate sysroot;
# see https://github.com/easybuilders/easybuild-easyconfigs/pull/19268
options:
from-pr: 19268
15 changes: 15 additions & 0 deletions eb_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,21 @@ def parse_hook(ec, *args, **kwargs):
PARSE_HOOKS[ec.name](ec, eprefix)


def post_ready_hook(self, *args, **kwargs):
"""
Post-ready hook: limit parallellism for selected builds, because they require a lot of memory per used core.
"""
# 'parallel' easyconfig parameter is set via EasyBlock.set_parallel in ready step based on available cores.
# here we reduce parallellism to only use half of that for selected software,
# to avoid failing builds/tests due to out-of-memory problems
if self.name in ['TensorFlow']:
parallel = self.cfg['parallel']
if parallel > 1:
self.cfg['parallel'] = parallel // 2
msg = "limiting parallelism to %s (was %s) for %s to avoid out-of-memory failures during building/testing"
print_msg(msg % (self.cfg['parallel'], parallel, self.name), log=self.log)


def pre_prepare_hook(self, *args, **kwargs):
"""Main pre-prepare hook: trigger custom functions."""

Expand Down

0 comments on commit 89940af

Please sign in to comment.