<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
dear Giovanni <br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
you could  try just adding the /.../mkl/lib/intel64/ to the LD_LIBRARY_PATH or <br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
source of the /mkl/<version>/env/vars.sh script and then running the configure script
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hope this solves your problem </div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
greetings <br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Pietro <br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Da:</b> users <users-bounces@lists.quantum-espresso.org> per conto di Giovanni Cantele <giovanni.cantele@spin.cnr.it><br>
<b>Inviato:</b> martedì 8 marzo 2022 12:46<br>
<b>A:</b> Quantum ESPRESSO users Forum <users@lists.quantum-espresso.org><br>
<b>Oggetto:</b> [QE-users] qe-gpu 7.0 - compilation issue (MKL not detected)</font>
<div> </div>
</div>
<div class="" style="word-wrap:break-word; line-break:after-white-space">Dear all,
<div class=""><br class="">
</div>
<div class="">I’m trying to configure the compilation of qe-7.0 on GPUs. I’m using the following script to launch configure:</div>
<div class="">-------------------------------------------------------------------------------------------------------------------</div>
<div class="">export VERSION=21.3<br class="">
export VERSION=20.11<br class="">
export CUDA_VERSION=11.1<br class="">
<br class="">
export NVHPC=/nfsexports/nvidia/hpc_sdk<br class="">
<br class="">
nvcudadir=$NVHPC/Linux_x86_64/$VERSION/cuda<br class="">
nvcompdir=$NVHPC/Linux_x86_64/$VERSION/compilers<br class="">
nvmathdir=$NVHPC/Linux_x86_64/$VERSION/math_libs<br class="">
nvcommdir=$NVHPC/Linux_x86_64/$VERSION/comm_libs<br class="">
<br class="">
export OPAL_PREFIX=$nvcommdir/mpi<br class="">
<br class="">
export MANPATH=$MANPATH:$nvcompdir/man<br class="">
<br class="">
PATH=$nvcudadir/bin:$nvcompdir/bin:$nvcommdir/mpi/bin:$PATH<br class="">
export PATH<br class="">
<br class="">
CPATH=$nvcudadir/include:$nvmathdir/include:$nvcommdir/mpi/include:$nvcommdir/nccl/include:$nvcommdir/nvshmem/include:$CPATH<br class="">
export CPATH<br class="">
<br class="">
LD_LIBRARY_PATH=$nvcudadir/lib64:$nvcompdir/lib:$nvmathdir/lib64:$nvcommdir/mpi/lib:$nvcommdir/nccl/lib:$nvcommdir/nvshmem/lib:$LD_LIBRARY_PATH<br class="">
export LD_LIBRARY_PATH<br class="">
. /nfsexports/intel/oneapi/mkl/latest/env/vars.sh<br class="">
<br class="">
export OMPI_FC=nvfortran<br class="">
export CUDA_HOME=$nvcudadir/$CUDA_VERSION<br class="">
<br class="">
./configure --enable-openmp  --with-cuda=$CUDA_HOME --with-cuda-cc=70 --with-cuda-runtime=11.1 --without-scalapack -with-cuda=yes --enable-cuda-env-check=no </div>
<div class="">
<div class="" style="color:rgb(0,0,0)">-------------------------------------------------------------------------------------------------------------------</div>
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Now, the problem is that I’m not able to make configure to recognise Intel MKL (2021.1.1 version).</div>
<div class=""><br class="">
</div>
<div class="">The correct line to link to them is</div>
<div class=""> -L${MKLROOT}/lib/intel64 -lmkl_intel_ilp64 -lmkl_pgi_thread -lmkl_core -pgf90libs -mp -lpthread -lm -ldl</div>
<div class="">and adding </div>
<div class=""> -i8  -I"${MKLROOT}/include”</div>
<div class="">to the compiler options.</div>
<div class=""><br class="">
</div>
<div class="">However, if I try to run the above configure command adding</div>
<div class="">LDFLAGS=“-L${MKLROOT}/lib/intel64 -lmkl_intel_ilp64 -lmkl_pgi_thread -lmkl_core -pgf90libs -mp -lpthread -lm -ldl”</div>
<div class="">the configure stops finding the cuda enviroment, selects gfortran as compiler and exits with error. On the other hand, if I skip LDFLAGS (but</div>
<div class="">with MKLROOT correctly set up), the cuda environment is correctly detected but MKL are not automatically detected.</div>
<div class=""><br class="">
</div>
<div class="">Could you please check the above script and, possibly, give any hint useful to solve the issue?</div>
<div class=""><br class="">
</div>
<div class="">I thank you all in advance.</div>
<div class=""><br class="">
</div>
<div class="">Giovanni</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div class="">
<div class="" style="text-align:start; text-indent:0px; word-wrap:break-word; line-break:after-white-space">
<span class="" style="color:rgb(0,0,0); letter-spacing:normal; text-transform:none; white-space:normal; word-spacing:0px">-- <br class="">
<br class="">
Giovanni Cantele, PhD<br class="">
CNR-SPIN<br class="">
c/o Dipartimento di Fisica<br class="">
Universita' di Napoli "Federico II"<br class="">
Complesso Universitario M. S. Angelo - Ed. 6<br class="">
Via Cintia, I-80126, Napoli, Italy<br class="">
<a href="mailto:giovanni.cantele@spin.cnr.it" class="">e-mail: giovanni.cantele@spin.cnr.it</a><br class="">
Phone: +39 081 676910<br class="">
Skype contact: giocan74<br class="">
<br class="">
ResearcherID: http://www.researcherid.com/rid/A-1951-2009<br class="">
Web page:<span class="x_Apple-converted-space"> </span></span><a href="https://sites.google.com/view/giovanni-cantele/home" class="">https://sites.google.com/view/giovanni-cantele/home</a></div>
</div>
<br class="">
</div>
</div>
</body>
</html>