Skip to content

Accommodate intel-oneapi compilers like

This PR comes to fix two problems. The first problem is that the spec intel-oneapi-compilers-classic does not install a compiler with its name. Because of this, the manifest file will refer to compilers that do not exist.

To adress this problem, this PR introduces a new concept: compiler_spec. This is a new keyword that can be used in the stack file, in the PE section, along side with the compiler keyword. Here we are saying that we want to install the package compiler_spec, but use the compiler compiler in the matrix specs.

The following changes were made to achieve this:

  • Change spack list-compilers command to return compiler_spec instead of compiler if found ;
  • Remove compilers from pe_specs dictionary in SpackYaml class ;
  • Update modules.ymal.j2 template accordingly ;
  • Add @ symbol to test in intall compilers script to bypass intel-oneapi like compilers.

The next problem that this PR resolves is that the compiler_spec which has provided compiler do not load the modules compiled by compiler. This is a known issue that has not integrated v0.18.1 of spack. Mainly this happens because the module file generated does not contain two directives that are mandatory for the Lmod hierarchy works:

family("compilers")
prepend_path("MODULEPATH", "/path/to/intel/modules")

The following changes were made to achieve this:

  • The script of step 9 - install stack - was separated in two. The new script will only handle the module creation.
  • This new script creates a new module called compiler with the missing directives and hides the module generated by spack.

The init.sh script was adapted, but not the jenkins pipeline.

All tests were done using the following stack:

core:
  metadata:
    section: core
  compiler: <core_compiler>

gcc:
  metadata:
    section: pe
  stable:
    compiler: gcc@11.3.0

intel:
  metadata:
    section: pe
  stable:
    compiler: intel@2021.6.0
    compiler_spec: intel-oneapi-compilers-classic@2021.6.0

benchmarks:
  metadata: { section: packages }
  pe: [gcc_stable, intel_stable]
  packages:
    - stream
    - stream+openmp

Which result in the following compilers installed:

erothe-> spack compilers
==> Available compilers
-- gcc rhel8-x86_64 ---------------------------------------------
gcc@11.3.0  gcc@8.5.0

-- intel rhel8-x86_64 -------------------------------------------
intel@2021.6.0

And the following set of modules:

├── linux-rhel8-x86_64
    ├── gcc
    │   └── 11.3.0
    │       └── stream
    │           ├── 5.10.lua
    │           └── 5.10-openmp.lua
    └── intel
        └── 2021.6.0
            └── stream
                ├── 5.10.lua
                └── 5.10-openmp.lua

Merge request reports