Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for custom easyconfig parameter in R easyblock to build on top of multi-threaded BLAS/LAPACK #1294

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 13 additions & 1 deletion easybuild/easyblocks/r/r.py
Expand Up @@ -34,6 +34,7 @@

import easybuild.tools.environment as env
from easybuild.easyblocks.generic.configuremake import ConfigureMake
from easybuild.framework.easyconfig import CUSTOM
from easybuild.tools.build_log import print_warning
from easybuild.tools.modules import get_software_root
from easybuild.tools.systemtools import get_shared_lib_ext
Expand All @@ -48,6 +49,13 @@ class EB_R(ConfigureMake):
Install specified version of libraries, install hard-coded library version
or latest library version (in that order of preference)
"""
@staticmethod
def extra_options():
"""Custom easyconfig parameters for R."""
extra_vars = {
'mt_blas_lapack': [False, "Build R on top of multi-threaded BLAS/LAPACK library.", CUSTOM],
}
return ConfigureMake.extra_options(extra_vars)

def prepare_for_extensions(self):
"""
Expand All @@ -63,7 +71,11 @@ def configure_step(self):
# define $BLAS_LIBS to build R correctly against BLAS/LAPACK library
# $LAPACK_LIBS should *not* be specified since that may lead to using generic LAPACK
# see https://github.com/easybuilders/easybuild-easyconfigs/issues/1435
env.setvar('BLAS_LIBS', os.getenv('LIBBLAS_MT'))
if self.cfg['mt_blas_lapack']:
env.setvar('BLAS_LIBS', os.getenv('LIBBLAS_MT'))
else:
env.setvar('BLAS_LIBS', os.getenv('LIBBLAS'))

self.cfg.update('configopts', "--with-blas --with-lapack")

# make sure correct config script is used for Tcl/Tk
Expand Down