<div dir="ltr"><div>This (and similar definitions for later nvhpc versions) works for me with Intel 2020 MKL. No need to follow the suggestion in the two last lines: I fixed configure some time ago. You may try it anyway.<br></div><div><br></div><div>Paolo<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 8, 2022 at 1:15 PM Giovanni Cantele <<a href="mailto:giovanni.cantele@spin.cnr.it">giovanni.cantele@spin.cnr.it</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;">Dear Pietro, I tried both, but it does not work.<div><br></div><div>My LD_LIBRARY_PATH after sourcing vars.sh is</div><div>/nfsexports/intel/oneapi/mkl/2021.1.1/env/../lib/intel64:/nfsexports/nvidia/hpc_sdk/Linux_x86_64/20.11/cuda/lib64:/nfsexports/nvidia/hpc_sdk/Linux_x86_64/20.11/compilers/lib:/nfsexports/nvidia/hpc_sdk/Linux_x86_64/20.11/math_libs/lib64:/nfsexports/nvidia/hpc_sdk/Linux_x86_64/20.11/comm_libs/mpi/lib:/nfsexports/nvidia/hpc_sdk/Linux_x86_64/20.11/comm_libs/nccl/lib:/nfsexports/nvidia/hpc_sdk/Linux_x86_64/20.11/comm_libs/nvshmem/lib:/usr/mpi/gcc/openmpi-4.1.0rc5/lib64:</div><div>that indeed contains the bat to MKL library.</div><div><br></div><div>In install/config.log I find, among the others, this message:</div><div>configure:5252: nvfortran -o conftest -fast -Mcache_align -Mpreprocess -Mlarge_arrays -mp  -mp   conftest.f -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core   >&5<br>/usr/bin/ld: cannot find -lmkl_intel_lp64<br>/usr/bin/ld: cannot find -lmkl_intel_thread<br>/usr/bin/ld: cannot find -lmkl_core</div><div><br></div><div>It is like although LD_LIBRARY_PATH contains the correct path to the library, ld cannot find it. On the other hand, if I pass the whole link command using LDFLAGS, then configure for some reason finds</div><div>gfrotran in place of nvfortran and then exits with errors.</div><div><br></div><div>Giovanni<br><div><br><blockquote type="cite"><div>On 8 Mar 2022, at 13:00, Pietro Davide Delugas <<a href="mailto:pdelugas@sissa.it" target="_blank">pdelugas@sissa.it</a>> wrote:</div><br><div><div style="font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt">dear Giovanni<span> </span><br></div><div style="font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt">you could  try just adding the /.../mkl/lib/intel64/ to the LD_LIBRARY_PATH or<span> </span><br></div><div style="font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt">source of the /mkl/<version>/env/vars.sh script and then running the configure script<span> </span><br></div><div style="font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt"><br></div><div style="font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt">Hope this solves your problem </div><div style="font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt">greetings<span> </span><br></div><div style="font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt">Pietro<span> </span><br></div><div id="gmail-m_-3211311163227725913appendonsend" style="font-family:Helvetica;font-size:18px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"></div><hr style="font-family:Helvetica;font-size:18px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;display:inline-block;width:1797.31px"><span style="font-family:Helvetica;font-size:18px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline"></span><div id="gmail-m_-3211311163227725913divRplyFwdMsg" dir="ltr" style="font-family:Helvetica;font-size:18px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><font style="font-size:11pt" face="Calibri, sans-serif"><b>Da:</b><span> </span>users <<a href="mailto:users-bounces@lists.quantum-espresso.org" target="_blank">users-bounces@lists.quantum-espresso.org</a>> per conto di Giovanni Cantele <<a href="mailto:giovanni.cantele@spin.cnr.it" target="_blank">giovanni.cantele@spin.cnr.it</a>><br><b>Inviato:</b><span> </span>martedì 8 marzo 2022 12:46<br><b>A:</b><span> </span>Quantum ESPRESSO users Forum <<a href="mailto:users@lists.quantum-espresso.org" target="_blank">users@lists.quantum-espresso.org</a>><br><b>Oggetto:</b><span> </span>[QE-users] qe-gpu 7.0 - compilation issue (MKL not detected)</font><div> </div></div><div style="font-family:Helvetica;font-size:18px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">Dear all,<div><br></div><div>I’m trying to configure the compilation of qe-7.0 on GPUs. I’m using the following script to launch configure:</div><div>-------------------------------------------------------------------------------------------------------------------</div><div>export VERSION=21.3<br>export VERSION=20.11<br>export CUDA_VERSION=11.1<br><br>export NVHPC=/nfsexports/nvidia/hpc_sdk<br><br>nvcudadir=$NVHPC/Linux_x86_64/$VERSION/cuda<br>nvcompdir=$NVHPC/Linux_x86_64/$VERSION/compilers<br>nvmathdir=$NVHPC/Linux_x86_64/$VERSION/math_libs<br>nvcommdir=$NVHPC/Linux_x86_64/$VERSION/comm_libs<br><br>export OPAL_PREFIX=$nvcommdir/mpi<br><br>export MANPATH=$MANPATH:$nvcompdir/man<br><br>PATH=$nvcudadir/bin:$nvcompdir/bin:$nvcommdir/mpi/bin:$PATH<br>export PATH<br><br>CPATH=$nvcudadir/include:$nvmathdir/include:$nvcommdir/mpi/include:$nvcommdir/nccl/include:$nvcommdir/nvshmem/include:$CPATH<br>export CPATH<br><br>LD_LIBRARY_PATH=$nvcudadir/lib64:$nvcompdir/lib:$nvmathdir/lib64:$nvcommdir/mpi/lib:$nvcommdir/nccl/lib:$nvcommdir/nvshmem/lib:$LD_LIBRARY_PATH<br>export LD_LIBRARY_PATH<br>. /nfsexports/intel/oneapi/mkl/latest/env/vars.sh<br><br>export OMPI_FC=nvfortran<br>export CUDA_HOME=$nvcudadir/$CUDA_VERSION<br><br>./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><div>-------------------------------------------------------------------------------------------------------------------</div></div><div><br></div><div><br></div><div>Now, the problem is that I’m not able to make configure to recognise Intel MKL (2021.1.1 version).</div><div><br></div><div>The correct line to link to them is</div><div> -L${MKLROOT}/lib/intel64 -lmkl_intel_ilp64 -lmkl_pgi_thread -lmkl_core -pgf90libs -mp -lpthread -lm -ldl</div><div>and adding </div><div> -i8  -I"${MKLROOT}/include”</div><div>to the compiler options.</div><div><br></div><div>However, if I try to run the above configure command adding</div><div>LDFLAGS=“-L${MKLROOT}/lib/intel64 -lmkl_intel_ilp64 -lmkl_pgi_thread -lmkl_core -pgf90libs -mp -lpthread -lm -ldl”</div><div>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>with MKLROOT correctly set up), the cuda environment is correctly detected but MKL are not automatically detected.</div><div><br></div><div>Could you please check the above script and, possibly, give any hint useful to solve the issue?</div><div><br></div><div>I thank you all in advance.</div><div><br></div><div>Giovanni</div><div><br></div><div><br></div><div><br><div><div style="text-align:start;text-indent:0px"><span style="letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px">-- <br><br>Giovanni Cantele, PhD<br>CNR-SPIN<br>c/o Dipartimento di Fisica<br>Universita' di Napoli "Federico II"<br>Complesso Universitario M. S. Angelo - Ed. 6<br>Via Cintia, I-80126, Napoli, Italy<br><a href="mailto:giovanni.cantele@spin.cnr.it" target="_blank">e-mail: giovanni.cantele@spin.cnr.it</a><br>Phone: +39 081 676910<br>Skype contact: giocan74<br><br>ResearcherID: <a href="http://www.researcherid.com/rid/A-1951-2009" target="_blank">http://www.researcherid.com/rid/A-1951-2009</a><br>Web page:<span> </span></span><a href="https://sites.google.com/view/giovanni-cantele/home" target="_blank">https://sites.google.com/view/giovanni-cantele/home</a></div></div><br></div></div><span style="font-family:Helvetica;font-size:18px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline">_______________________________________________</span><br style="font-family:Helvetica;font-size:18px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><span style="font-family:Helvetica;font-size:18px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline">The Quantum ESPRESSO community stands by the Ukrainian</span><br style="font-family:Helvetica;font-size:18px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><span style="font-family:Helvetica;font-size:18px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline">people and expresses its concerns about the devastating</span><br style="font-family:Helvetica;font-size:18px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><span style="font-family:Helvetica;font-size:18px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline">effects that the Russian military offensive has on their</span><br style="font-family:Helvetica;font-size:18px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><span style="font-family:Helvetica;font-size:18px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline">country and on the free and peaceful scientific, cultural,</span><br style="font-family:Helvetica;font-size:18px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><span style="font-family:Helvetica;font-size:18px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline">and economic cooperation amongst peoples</span><br style="font-family:Helvetica;font-size:18px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><span style="font-family:Helvetica;font-size:18px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline">_______________________________________________</span><br style="font-family:Helvetica;font-size:18px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><span style="font-family:Helvetica;font-size:18px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline">Quantum ESPRESSO is supported by MaX (</span><a href="http://www.max-centre.eu/" style="font-family:Helvetica;font-size:18px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">www.max-centre.eu</a><span style="font-family:Helvetica;font-size:18px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline">)</span><br style="font-family:Helvetica;font-size:18px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><span style="font-family:Helvetica;font-size:18px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline">users mailing list<span> </span></span><a href="mailto:users@lists.quantum-espresso.org" style="font-family:Helvetica;font-size:18px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">users@lists.quantum-espresso.org</a><br style="font-family:Helvetica;font-size:18px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><a href="https://lists.quantum-espresso.org/mailman/listinfo/users" style="font-family:Helvetica;font-size:18px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">https://lists.quantum-espresso.org/mailman/listinfo/users</a></div></blockquote></div><br><div>
<div style="text-align:start;text-indent:0px"><span style="color:rgb(0,0,0);letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px">-- <br><br>Giovanni Cantele, PhD<br>CNR-SPIN<br>c/o Dipartimento di Fisica<br>Universita' di Napoli "Federico II"<br>Complesso Universitario M. S. Angelo - Ed. 6<br>Via Cintia, I-80126, Napoli, Italy<br><a href="mailto:giovanni.cantele@spin.cnr.it" target="_blank">e-mail: giovanni.cantele@spin.cnr.it</a><br>Phone: +39 081 676910<br>Skype contact: giocan74<br><br>ResearcherID: <a href="http://www.researcherid.com/rid/A-1951-2009" target="_blank">http://www.researcherid.com/rid/A-1951-2009</a><br>Web page:<span> </span></span><a href="https://sites.google.com/view/giovanni-cantele/home" target="_blank">https://sites.google.com/view/giovanni-cantele/home</a></div>
</div>
<br></div></div>_______________________________________________<br>
The Quantum ESPRESSO community stands by the Ukrainian<br>
people and expresses its concerns about the devastating<br>
effects that the Russian military offensive has on their<br>
country and on the free and peaceful scientific, cultural,<br>
and economic cooperation amongst peoples<br>
_______________________________________________<br>
Quantum ESPRESSO is supported by MaX (<a href="http://www.max-centre.eu" rel="noreferrer" target="_blank">www.max-centre.eu</a>)<br>
users mailing list <a href="mailto:users@lists.quantum-espresso.org" target="_blank">users@lists.quantum-espresso.org</a><br>
<a href="https://lists.quantum-espresso.org/mailman/listinfo/users" rel="noreferrer" target="_blank">https://lists.quantum-espresso.org/mailman/listinfo/users</a></blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Paolo Giannozzi, Dip. Scienze Matematiche Informatiche e Fisiche,<br>Univ. Udine, via delle Scienze 206, 33100 Udine, Italy<br>Phone +39-0432-558216, fax +39-0432-558222<br><br></div></div></div></div></div>