diff options
author | Massimiliano Culpo <massimiliano.culpo@googlemail.com> | 2016-05-07 15:08:27 +0200 |
---|---|---|
committer | Massimiliano Culpo <massimiliano.culpo@googlemail.com> | 2016-05-07 15:08:27 +0200 |
commit | 7d5bb088b424012372064cba76a2472943dd7db7 (patch) | |
tree | 8b5c696a155e66824f85bfa5d690fffb20c473bd /lib | |
parent | cfc25d0a927f47018a29668bbcdcc335ae04ffdb (diff) | |
parent | 7ec28231d91dab9eab3a21d253d682952db33478 (diff) | |
download | spack-7d5bb088b424012372064cba76a2472943dd7db7.tar.gz spack-7d5bb088b424012372064cba76a2472943dd7db7.tar.bz2 spack-7d5bb088b424012372064cba76a2472943dd7db7.tar.xz spack-7d5bb088b424012372064cba76a2472943dd7db7.zip |
Merge branch 'develop' of https://github.com/LLNL/spack into openmpi_variants
Conflicts:
var/spack/repos/builtin/packages/openmpi/package.py
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/docs/packaging_guide.rst | 17 | ||||
-rw-r--r-- | lib/spack/spack/compiler.py | 3 | ||||
-rw-r--r-- | lib/spack/spack/compilers/gcc.py | 11 |
3 files changed, 29 insertions, 2 deletions
diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst index 519c0da232..34d11308f5 100644 --- a/lib/spack/docs/packaging_guide.rst +++ b/lib/spack/docs/packaging_guide.rst @@ -1831,6 +1831,23 @@ successfully find ``libdwarf.h`` and ``libdwarf.so``, without the packager having to provide ``--with-libdwarf=/path/to/libdwarf`` on the command line. +Message Parsing Interface (MPI) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +It is common for high performance computing software/packages to use ``MPI``. +As a result of conretization, a given package can be built using different +implementations of MPI such as ``Openmpi``, ``MPICH`` or ``IntelMPI``. +In some scenarios to configure a package one have to provide it with appropriate MPI +compiler wrappers such as ``mpicc``, ``mpic++``. +However different implementations of ``MPI`` may have different names for those +wrappers. In order to make package's ``install()`` method indifferent to the +choice ``MPI`` implementation, each package which implements ``MPI`` sets up +``self.spec.mpicc``, ``self.spec.mpicxx``, ``self.spec.mpifc`` and ``self.spec.mpif77`` +to point to ``C``, ``C++``, ``Fortran 90`` and ``Fortran 77`` ``MPI`` wrappers. +Package developers are advised to use these variables, for example ``self.spec['mpi'].mpicc`` +instead of hard-coding ``join_path(self.spec['mpi'].prefix.bin, 'mpicc')`` for +the reasons outlined above. + + Forking ``install()`` ~~~~~~~~~~~~~~~~~~~~~ diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index d38c0b00b1..20896f9eec 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -97,6 +97,9 @@ class Compiler(object): # argument used to get C++11 options cxx11_flag = "-std=c++11" + # argument used to get C++14 options + cxx14_flag = "-std=c++1y" + def __init__(self, cspec, cc, cxx, f77, fc): def check(exe): diff --git a/lib/spack/spack/compilers/gcc.py b/lib/spack/spack/compilers/gcc.py index 64214db32d..2e57e44856 100644 --- a/lib/spack/spack/compilers/gcc.py +++ b/lib/spack/spack/compilers/gcc.py @@ -54,9 +54,16 @@ class Gcc(Compiler): if self.version < ver('4.3'): tty.die("Only gcc 4.3 and above support c++11.") elif self.version < ver('4.7'): - return "-std=gnu++0x" + return "-std=c++0x" else: - return "-std=gnu++11" + return "-std=c++11" + + @property + def cxx14_flag(self): + if self.version < ver('4.8'): + tty.die("Only gcc 4.8 and above support c++14.") + else: + return "-std=c++14" @classmethod def fc_version(cls, fc): |