Intel compilers may therefore be configured in one of two ways with
Spack: using modules, or using compiler flags.
...
...
@@ -556,11 +559,6 @@ configuration in ``compilers.yaml`` illustrates this technique:
Command Line Configuration
""""""""""""""""""""""""""
. warning::
As of the writing of this manual, added compilers flags are broken;
see `GitHub Issue <https://github.com/LLNL/spack/pull/1532>`_.
One can also control which GCC is seen by the Intel compiler by adding
flags to the ``icc`` command:
...
...
@@ -616,7 +614,7 @@ distinguishable by their names. "Old" compilers:
Older installations of PGI contains just the old compilers; whereas
newer installations contain the old and the new. The new compiler is
considered preferable, as some packages
(``hdf4``) will not build with the old compiler.
(``hdf``) will not build with the old compiler.
When auto-detecting a PGI compiler, there are cases where Spack will
find the old compilers, when you really want it to find the new
...
...
@@ -641,7 +639,7 @@ Other issues:
.. note::
It is believed the problem with ``hdf4`` is that everything is
It is believed the problem with HDF 4 is that everything is
compiled with the ``F77`` compiler, but at some point some Fortran
90 code slipped in there. So compilers that can handle both FORTRAN
77 and Fortran 90 (``gfortran``, ``pgfortran``, etc) are fine. But
...
...
@@ -653,9 +651,40 @@ Other issues:
NAG
^^^
At this point, the NAG compiler is `known to not
work<https://github.com/LLNL/spack/issues/590>`.
The Numerical Algorithms Group provides a licensed Fortran compiler. Like Clang,
this requires you to set up a :ref:`mixed-toolchains`. It is recommended to use
GCC for your C/C++ compilers.
The NAG Fortran compilers are a bit more strict than other compilers, and many
packages will fail to install with error messages like:
.. code-block:: none
Error: mpi_comm_spawn_multiple_f90.f90: Argument 3 to MPI_COMM_SPAWN_MULTIPLE has data type DOUBLE PRECISION in reference from MPI_COMM_SPAWN_MULTIPLEN and CHARACTER in reference from MPI_COMM_SPAWN_MULTIPLEA
In order to convince the NAG compiler not to be too picky about calling conventions,
you can use ``FFLAGS=-mismatch`` and ``FCFLAGS=-mismatch``. This can be done through
the command line:
.. code-block:: console
$ spack install openmpi fflags=\"-mismatch\"
Or it can be set permanently in your ``compilers.yaml``: