Skip to content

Commit

Permalink
Merge pull request #2666 from damianam/namd_no_cuda
Browse files Browse the repository at this point in the history
add support to NAMD easyblock to opt out of building with CUDA support even if CUDA is included as dependency
  • Loading branch information
ocaisa authored Feb 4, 2022
2 parents 75adf18 + 5119142 commit ba0e745
Showing 1 changed file with 6 additions and 1 deletion.
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

0 comments on commit ba0e745

Please sign in to comment.