e. Install Intel Compilers & MPI

Intel Compilers

Next we’ll use Spack to install the Intel Compilers (ICC), we’ll use these to compile binaries such as WRF in the next few sections:

spack install --no-cache intel-oneapi-compilers@2022.0.2

This will take about ~4 mins to complete. Once it’s complete we can see the installed package by running spack find:

spack find

Intel compilers in Spack

To use a package, we load it in with spack load. In order for Spack to be able to use the compiler to build further packages, we need to inform Spack about them, this is done with spack compiler find. Finally, when we do not need a package we unload it.

spack load intel-oneapi-compilers
spack compiler find
spack unload

This will display the Intel compiler under:

spack compilers

Spack Compilers

Intel MPI

We will now install the Intel MPI library underneath the Intel compilers. We are also going to use the AWS EFA libfabric by setting external-libfabric in our Spack install. We told Spack this was already installed in the previous step. The AWS libfabric library is optimized for EFA and we recommend using it over the libfabric bundled with Intel MPI.

spack install --no-cache intel-oneapi-mpi+external-libfabric%intel

You can safely ignore the warning about patchelf: patchelf: cannot find section '.dynamic'. The input file is most likely statically linked

This will take less than a minute to complete.