From 93670ff09d3d0d0c6405ff860a8ff5ee980ecf3a Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 11 Jun 2025 10:52:04 +0200 Subject: [PATCH 1/2] enhance SuperLU easyblock to set configure options for ParMETIS (or disable it if ParMETIS is not a dependency) --- easybuild/easyblocks/s/superlu.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/easybuild/easyblocks/s/superlu.py b/easybuild/easyblocks/s/superlu.py index cb9ae3e749d..a099a8e7c89 100644 --- a/easybuild/easyblocks/s/superlu.py +++ b/easybuild/easyblocks/s/superlu.py @@ -118,6 +118,19 @@ def configure_step(self): # This BLAS library is not supported yet raise EasyBuildError("BLAS library '%s' is not supported yet", toolchain_blas) + parmetis_root = get_software_root('ParMETIS') + if parmetis_root: + self.cfg.update('configopts', '-DTPL_ENABLE_PARMETISLIB=ON') + parmetis_include = os.path.join(parmetis_root, 'include') + self.cfg.update('configopts', '-DTPL_PARMETIS_INCLUDE_DIRS=%s' % parmetis_include) + parmetis_libs = ';'.join([ + os.path.join(parmetis_root, 'lib', 'libparmetis.a'), + os.path.join(parmetis_root, 'lib', 'libmetis.a'), + ]) + self.cfg.update('configopts', '-DTPL_PARMETIS_LIBRARIES=%s' % parmetis_libs) + else: + self.cfg.update('configopts', '-DTPL_ENABLE_PARMETISLIB=OFF') + super().configure_step() def test_step(self): From ac76ee76b8b444c07acc6f9820859241af749297 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 11 Jun 2025 14:58:03 +0200 Subject: [PATCH 2/2] wrap value passed to TPL_PARMETIS_LIBRARIES in single quotes, since it includes semicolons --- easybuild/easyblocks/s/superlu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyblocks/s/superlu.py b/easybuild/easyblocks/s/superlu.py index a099a8e7c89..8b387e1797f 100644 --- a/easybuild/easyblocks/s/superlu.py +++ b/easybuild/easyblocks/s/superlu.py @@ -127,7 +127,7 @@ def configure_step(self): os.path.join(parmetis_root, 'lib', 'libparmetis.a'), os.path.join(parmetis_root, 'lib', 'libmetis.a'), ]) - self.cfg.update('configopts', '-DTPL_PARMETIS_LIBRARIES=%s' % parmetis_libs) + self.cfg.update('configopts', "-DTPL_PARMETIS_LIBRARIES='%s'" % parmetis_libs) else: self.cfg.update('configopts', '-DTPL_ENABLE_PARMETISLIB=OFF')