diff --git a/easybuild/easyblocks/a/amber.py b/easybuild/easyblocks/a/amber.py index 1c77c10696..d646b36b5c 100644 --- a/easybuild/easyblocks/a/amber.py +++ b/easybuild/easyblocks/a/amber.py @@ -141,6 +141,17 @@ def configure_step(self): if self.toolchain.options.get('openmp', None): self.cfg.update('configopts', '-DOPENMP=TRUE') + # note: for Amber 20, a patch is required to fix the CMake scripts so they're aware of FlexiBLAS: + # - cmake/patched-cmake-modules/FindBLASFixed.cmake + # - cmake/patched-cmake-modules/FindLAPACKFixed.cmake + flexiblas_root = get_software_root('FlexiBLAS') + if flexiblas_root: + self.cfg.update('configopts', '-DBLA_VENDOR=FlexiBLAS') + else: + openblas_root = get_software_root('OpenBLAS') + if openblas_root: + self.cfg.update('configopts', '-DBLA_VENDOR=OpenBLAS') + cudaroot = get_software_root('CUDA') if cudaroot: self.with_cuda = True @@ -213,13 +224,14 @@ def configuremake_install_step(self): # define environment variables for MPI, BLAS/LAPACK & dependencies mklroot = get_software_root('imkl') - openblasroot = get_software_root('OpenBLAS') + flexiblas_root = get_software_root('FlexiBLAS') + openblas_root = get_software_root('OpenBLAS') if mklroot: env.setvar('MKL_HOME', os.getenv('MKLROOT')) - elif openblasroot: + elif flexiblas_root or openblas_root: lapack = os.getenv('LIBLAPACK') if lapack is None: - raise EasyBuildError("LIBLAPACK (from OpenBLAS) not found in environment.") + raise EasyBuildError("$LIBLAPACK for OpenBLAS or FlexiBLAS not defined in build environment!") else: env.setvar('GOTO', lapack)