Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion easybuild/easyblocks/n/namd.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def extra_options():
'charm_arch': [None, "Charm++ target architecture", MANDATORY],
'charm_extra_cxxflags': ['', "Extra C++ compiler options to use for building Charm++", CUSTOM],
'charm_opts': ['--with-production', "Charm++ build options", CUSTOM],
'cuda': [None, "Enable CUDA build if CUDA is among the dependencies", CUSTOM],
'namd_basearch': [None, "NAMD base target architecture (compiler family is appended)", CUSTOM],
'namd_cfg_opts': ['', "NAMD configure options", CUSTOM],
'runtest': [True, "Run NAMD test case after building", CUSTOM],
Expand Down Expand Up @@ -152,8 +153,12 @@ def configure_step(self):

# NAMD dependencies: CUDA, TCL, FFTW
cuda = get_software_root('CUDA')
if cuda:
if cuda and (self.cfg['cuda'] is None or self.cfg['cuda']):
self.cfg.update('namd_cfg_opts', "--with-cuda --cuda-prefix %s" % cuda)
elif not self.cfg['cuda']:
self.log.warning("CUDA is disabled")
elif not cuda and self.cfg['cuda']:
raise EasyBuildError("CUDA is not a dependency, but support for CUDA is enabled.")

tcl = get_software_root('Tcl')
if tcl:
Expand Down