Building harminv with Intel® MKL and Intel® Compilers

We tried to build harminv with Intel software tools and thought; it would be useful to our users and so sharing the steps.

harminv is a free program (and accompanying library) to solve the problem of harmonic inversion — given a discrete-time, finite-length signal that consists of a sum of finitely-many sinusoids (possibly exponentially decaying) in a given bandwidth, it determines the frequencies, decay constants, amplitudes, and phases of those sinusoids. (ref: Wikipedia)

Follow these steps to set some of the environment variables such as compilers as Intel compilers, library paths for Intel® MKL, and OpenMP.

  $export CC=icc

  $export CXX=icpc

  $export F77=ifort




  $MKL=" -L${MKL_LIB_PATH} -L${OMP_LIB_PATH} -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core  -liomp5 -lpthread"

$./configure --with-blas="$MKL" --with-lapack="$MKL"


Check the configure output to cofirm MKL is used for BLAS and LAPACK.


checking for sgemm_ in  -L/opt/intel/composer_xe_2013_sp1/mkl/lib/intel64 -L/opt/intel/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core  -liomp5 -lpthread... yes

checking for cheev_ in  -L/opt/intel/composer_xe_2013_sp1/mkl/lib/intel64 -L/opt/intel/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core  -liomp5 -lpthread... yes


You can see sgemm from BLAS and cheev from LAPACK are found from MKL libraries, as yes.


Now, we can go ahead and run the make to build the harminv.


Make sure that we did everything allright and MKL and Intel compilers are linked by checking with ldd.


$ldd harminv =>  (0x00007fff0fbff000) => /opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/ (0x00007fdc5e4b7000) => /opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/ (0x00007fdc5d4f9000) => /opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/ (0x00007fdc5be3b000) => /opt/intel/composer_xe_2013_sp1.1.106/compiler/lib/intel64/ (0x00007fdc5bb20000) => /opt/intel/composer_xe_2013_sp1.1.106/compiler/lib/intel64/ (0x00007fdc5b8f0000) => /opt/intel/composer_xe_2013_sp1.1.106/compiler/lib/intel64/ (0x00007fdc5b5b0000) => /opt/intel/composer_xe_2013_sp1.1.106/compiler/lib/intel64/ (0x00007fdc5b0e9000) => /opt/intel/composer_xe_2013_sp1.1.106/compiler/lib/intel64/ (0x00007fdc5a4f1000) => /lib64/ (0x0000003d08c00000) => /opt/intel/composer_xe_2013_sp1.1.106/compiler/lib/intel64/ (0x00007fdc5a285000) => /lib64/ (0x0000003d09400000) => /lib64/ (0x0000003d14400000) => /lib64/ (0x0000003d09000000) => /lib64/ (0x0000003d08800000)

        /lib64/ (0x0000003d08000000) => /opt/intel/composer_xe_2013_sp1.1.106/compiler/lib/intel64/ (0x00007fdc5a02d000)


Installation of harminv is done by switching to root and running make install.

$make install


For more complete information about compiler optimizations, see our Optimization Notice.


Vipin Kumar E K (Intel)'s picture

Thanks ByoungSeon and good to know that this article helped. We will post the mpb too once it is ready.


ByoungSeon J.'s picture

Thanks for the nice and clear explanation. With your help, we could install harminv. Just a question - have you installed mpb as well? If you post install steps of mpb as well, it would be great help.

Best regards,


Add a Comment

Have a technical question? Visit our forums. Have site or software product issues? Contact support.