Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29106 Discussions

llbm-profdata is not available after loading environment

foxtran
New Contributor II
408 Views

Hello!

I have tried to apply profile-guided optimization to our application. Unfortunately, llvm-profdata is not available after loading compilers set via `source ..../intel/2024.1/setvars.sh` command.

For example, for 2021.1.0 toolkit:

(base) [USER@HOST ~]$ llvm-profdata
-bash: llvm-profdata: command not found
(base) [USER@HOST ~]$ source ${COMPILERS_PATH}/intel/2024.1/setvars.sh

:: initializing oneAPI environment ...
   -bash: BASH_VERSION = 4.4.20(1)-release
   args: Using "$@" for setvars.sh arguments:
:: advisor -- latest
:: ccl -- latest
:: compiler -- latest
:: dal -- latest
:: debugger -- latest
:: dev-utilities -- latest
:: dnnl -- latest
:: dpcpp-ct -- latest
:: dpl -- latest
:: ipp -- latest
:: ippcp -- latest
:: mkl -- latest
:: mpi -- latest
:: tbb -- latest
:: vtune -- latest
:: oneAPI environment initialized ::

(base) [USER@HOST ~]$ llvm-profdata
-bash: llvm-profdata: command not found

 

Current trick which I'm using in profiling script:

$(which ifx | sed "s;/ifx;/compiler/llvm-profdata;") merge ${BUILD_DIR}/....

 

It would be nice to load llvm utils, collected in `compiler/`, with compilers. Especially, if LLVM is installed/loaded since llvm-profdata may be incompatible between LLVM in system and LLVM in Intel toolkit.

0 Kudos
1 Reply
foxtran
New Contributor II
368 Views

I found what is a problem: Intel Fortran compiler documentation refers to LLVM documentation with its own flags, and I followed by it. In HW-PGO article (https://www.intel.com/content/www/us/en/developer/articles/technical/hwpgo.html), the right way to call llvm tools is mentioned. It would be nice to update documentation with info from tech article.

0 Kudos
Reply