Adding package namd (#4321)

* Initial version of the namd package

* Modified charm to consider compile against intel/intel-mpi

* Correction of namd to compile with intel-mkl and intel compiler

* Adding inclue64 in the prefix

* adding property for the build directory

* removing useless function build
This commit is contained in:
Nicolas Richart
2017-06-14 20:11:30 +02:00
committed by Adam J. Stewart
parent bc2c4a14c2
commit f06c23ef42
4 changed files with 194 additions and 21 deletions

View File

@@ -115,29 +115,43 @@ def install(self, spec, prefix):
# We assume that Spack's compiler wrappers make this work. If
# not, then we need to query the compiler vendor from Spack
# here.
compiler = "gcc"
compiler = os.path.basename(self.compiler.cc)
options = [compiler,
"--with-production", # Note: turn this into a variant
"-j%d" % make_jobs,
"--destination=%s" % prefix]
if "+mpi" in spec:
options.append("--basedir=%s" % spec["mpi"].prefix)
options = [compiler]
if compiler == 'icc':
options.append('ifort')
options.extend([
"--with-production", # Note: turn this into a variant
"-j%d" % make_jobs,
"--destination=%s" % prefix])
if 'backend=mpi' in spec:
# in intelmpi <prefix>/include and <prefix>/lib fails so --basedir
# cannot be used
options.extend([
'--incdir={0}'.format(incdir)
for incdir in spec["mpi"].headers.directories
])
options.extend([
'--libdir={0}'.format(libdir)
for libdir in spec["mpi"].libs.directories
])
if "+papi" in spec:
options.extend(["papi", "--basedir=%s" % spec["papi"].prefix])
if "+smp" in spec:
if "+multicore" in spec:
if 'backend=multicore' in spec:
# This is a Charm++ limitation; it would lead to a
# build error
raise InstallError("Cannot combine +smp with +multicore")
options.append("smp")
if "+tcp" in spec:
if "+net" not in spec:
if 'backend=net' not in spec:
# This is a Charm++ limitation; it would lead to a
# build error
raise InstallError(
"The +tcp variant requires "
"the +net communication mechanism")
"the backend=net communication mechanism")
options.append("tcp")
if "+shared" in spec:
options.append("--build-shared")