LLVM 14

LLVM 14

LLVM project released version 14.0.6 of their source code. Immediately after that the LLVM compiler infrastructure was compiled and installed in the Discoverer HPC software repository (made available to all HPC users).


It is worth mentioning here the way the source code was compiled, since the details of that process reflect the good practice in compiling for AMD Zen2 CPU. The compile recipe is publicly available at:


https://gitlab.discoverer.bg/vkolev/recipes/-/tree/main/llvm/


In the recipe, it is better to employ GCC 11 compilers than to rely on their latest (12) version. That compiler version affinity has its roots in the specific C++ code syntax handling in GCC 12 – the LLVM project 14 C++ source code sticks better to the GCC 11 C++ compiler.


To add to the LLVM compilers the capability to compile application source code that implements shared-memory parallelism (intensively used in HPC), the OpenMP library included in the LLVM source code distribution has to be built and installed as part of the LLVM compiler infrastructure. Latter is also done for the installation available in the software repository of Discoverer HPC cluster.


The Flang Fortran compiler supports MLIR.


Why did the LLVM project source code compile using GCC? Note that compiling compilers does not really need some compiler specific optimizations. Employing here Intel oneAPI compilers could hardly create better LLVM compiler infrastructure. On the other side three compiler set vendors provide their own LLVM compiler infrastructure: Intel oneAPI, AMD AOCC, NVIDIA HPC SDK. But their LLVM compilers are products of specific code patching and library linking. Those LLMV compilers are not binary compatible with those provided with the original LLVM compiler infrastructure. For instance, the Intel oneAPI LLVM compilers (icx, icpx, ifx) interact specifically with Intel oneAPI compiler-rt libraries (that includes Intel oneAPI OpenMP library). Similar model can be observed for NVIDIA HPC SDK compilers (nvc, nvc++, nvfortran).

Leave a Reply

Your email address will not be published. Required fields are marked *

WordPress Appliance - Powered by TurnKey Linux