From ae00d7c3583008a6baeb860787c779bae320c05a Mon Sep 17 00:00:00 2001 From: Andrey Parfenov Date: Fri, 7 Jul 2023 05:47:54 +0200 Subject: add info about spack env from spack-configs for oneAPI build tools (#38751) Signed-off-by: Andrey Parfenov --- .../docs/build_systems/inteloneapipackage.rst | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/lib/spack/docs/build_systems/inteloneapipackage.rst b/lib/spack/docs/build_systems/inteloneapipackage.rst index 410294c1b0..102e26f4fb 100644 --- a/lib/spack/docs/build_systems/inteloneapipackage.rst +++ b/lib/spack/docs/build_systems/inteloneapipackage.rst @@ -76,6 +76,53 @@ To build with with ``icx``, do :: spack install patchelf%oneapi + +Using oneAPI Spack environment +------------------------------- + +In this example, we build lammps with ``icx`` using Spack environment for oneAPI packages created by Intel. The +compilers are installed with Spack like in example above. + +Install the oneAPI compilers:: + + spack install intel-oneapi-compilers + +Add the compilers to your ``compilers.yaml`` so Spack can use them:: + + spack compiler add `spack location -i intel-oneapi-compilers`/compiler/latest/linux/bin/intel64 + spack compiler add `spack location -i intel-oneapi-compilers`/compiler/latest/linux/bin + +Verify that the compilers are available:: + + spack compiler list + +Clone `spack-configs `_ repo and activate Intel oneAPI CPU environment:: + + git clone https://github.com/spack/spack-configs + spack env activate spack-configs/INTEL/CPU + spack concretize -f + +`Intel oneAPI CPU environment `_ contains applications tested and validated by Intel, this list is constantly extended. And currently it supports: + +- `GROMACS `_ +- `HPCG `_ +- `HPL `_ +- `LAMMPS `_ +- `OpenFOAM `_ +- `STREAM `_ +- `WRF `_ + +To build lammps with oneAPI compiler from this environment just run:: + + spack install lammps + +Compiled binaries can be find using:: + + spack cd -i lammps + +You can do the same for all other applications from this environment. + + Using oneAPI MPI to Satisfy a Virtual Dependence ------------------------------------------------------ -- cgit v1.2.3-60-g2f50