<div dir="ltr"><div dir="ltr">On Thu, Feb 10, 2022 at 8:30 AM Juan Salazar via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>> wrote:<br></div><div class="gmail_quote"><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;">Hello,<div><br></div><div>I am having issues compiling PETsc on a cluster using the following configure command. </div><div><br></div><div><div style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue"">./configure  --force \</div><div style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue"">    --with-64-bit-indices=1 \</div><div style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue"">    --with-precision=double \</div><div style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue"">    --with-debugging=0 \</div><div style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue"">    --COPTFLAGS=-O3 \</div><div style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue"">    --CXXOPTFLAGS=-O3 \</div><div style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue"">    --FOPTFLAGS=-O3 \</div><div style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue"">    PETSC_ARCH=$WM_OPTIONS \</div><div style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue"">    --with-blaslapack-dir=$MKLROOT  \</div><div style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue"">    --with-mkl_sparse-dir=$MKLROOT \</div><div style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue"">    --with-mkl_sparse_optimize-dir=$MKLROOT \</div><div style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue"">    --with-mpi-dir=$MPI_ARCH_PATH  \</div><div style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue"">    --download-hypre </div></div><div style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue""><br></div><div style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue"">Where</div><div style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue""><br></div><div style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue"">MKLROOT=/scratch/app_sequana/intel-oneapi/2021.1.0-2659/mkl/2021.1.1</div><div style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue"">WM_OPTIONS=linux64GccDPInt64Opt</div><div style="margin:0px;font-stretch:normal;line-height:normal"><span style="font-family:"Helvetica Neue";font-size:13px;color:rgb(0,0,0)">MPI_ARCH_PATH=</span><font color="#000000" face="Helvetica Neue" size="2"><span>/scratch/app_sequana/openmpi/2.1.1</span></font></div><div style="margin:0px;font-stretch:normal;line-height:normal"><font color="#000000" face="Helvetica Neue" size="2"><span><br></span></font></div><div style="margin:0px;font-stretch:normal;line-height:normal"><font color="#000000" face="Helvetica Neue" size="2"><span>-----</span></font></div><div style="margin:0px;font-stretch:normal;line-height:normal"><font color="#000000" face="Helvetica Neue" size="2"><span>$ make --version<br>GNU Make 3.82<br>Built for x86_64-redhat-linux-gnu<br></span></font><div style="color:rgb(0,0,0);margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue"">------</div><div><br></div></div><div style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue""><br></div><div style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue"">------</div><div style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue""><span style="font-size:small">$ls $MKLROOT/lib/intel64 </span></div><div style="margin:0px;font-stretch:normal;line-height:normal"><font face="Helvetica Neue" size="2"><br></font></div><div style="margin:0px;font-stretch:normal;line-height:normal"><font face="Helvetica Neue" size="2">libmkl_avx2.so.1                  libmkl_blacs_sgimpt_ilp64.so    libmkl_gf_lp64.a          libmkl_mc3.so.1              libmkl_sycl.so<br>libmkl_avx512_mic.so.1            libmkl_blacs_sgimpt_ilp64.so.1  libmkl_gf_lp64.so         libmkl_mc.so.1               libmkl_sycl.so.1<br>libmkl_avx512.so.1                libmkl_blacs_sgimpt_lp64.a      libmkl_gf_lp64.so.1       libmkl_pgi_thread.a          libmkl_tbb_thread.a<br>libmkl_avx.so.1                   libmkl_blacs_sgimpt_lp64.so     libmkl_gnu_thread.a       libmkl_pgi_thread.so         libmkl_tbb_thread.so<br>libmkl_blacs_intelmpi_ilp64.a     libmkl_blacs_sgimpt_lp64.so.1   libmkl_gnu_thread.so      libmkl_pgi_thread.so.1       libmkl_tbb_thread.so.1<br>libmkl_blacs_intelmpi_ilp64.so    libmkl_blas95_ilp64.a           libmkl_gnu_thread.so.1    libmkl_rt.so                 libmkl_vml_avx2.so.1<br>libmkl_blacs_intelmpi_ilp64.so.1  libmkl_blas95_lp64.a            libmkl_intel_ilp64.a      libmkl_rt.so.1               libmkl_vml_avx512_mic.so.1<br>libmkl_blacs_intelmpi_lp64.a      libmkl_cdft_core.a              libmkl_intel_ilp64.so     libmkl_scalapack_ilp64.a     libmkl_vml_avx512.so.1<br>libmkl_blacs_intelmpi_lp64.so     libmkl_cdft_core.so             libmkl_intel_ilp64.so.1   libmkl_scalapack_ilp64.so    libmkl_vml_avx.so.1<br>libmkl_blacs_intelmpi_lp64.so.1   libmkl_cdft_core.so.1           libmkl_intel_lp64.a       libmkl_scalapack_ilp64.so.1  libmkl_vml_cmpt.so.1<br>libmkl_blacs_openmpi_ilp64.a      libmkl_core.a                   libmkl_intel_lp64.so      libmkl_scalapack_lp64.a      libmkl_vml_def.so.1<br>libmkl_blacs_openmpi_ilp64.so     libmkl_core.so                  libmkl_intel_lp64.so.1    libmkl_scalapack_lp64.so     libmkl_vml_mc2.so.1<br>libmkl_blacs_openmpi_ilp64.so.1   libmkl_core.so.1                libmkl_intel_thread.a     libmkl_scalapack_lp64.so.1   libmkl_vml_mc3.so.1<br>libmkl_blacs_openmpi_lp64.a       libmkl_def.so.1                 libmkl_intel_thread.so    libmkl_sequential.a          libmkl_vml_mc.so.1<br>libmkl_blacs_openmpi_lp64.so      libmkl_gf_ilp64.a               libmkl_intel_thread.so.1  libmkl_sequential.so         locale<br>libmkl_blacs_openmpi_lp64.so.1    libmkl_gf_ilp64.so              libmkl_lapack95_ilp64.a   libmkl_sequential.so.1<br>libmkl_blacs_sgimpt_ilp64.a       libmkl_gf_ilp64.so.1            libmkl_lapack95_lp64.a    libmkl_sycl.a</font></div><div style="margin:0px;font-stretch:normal;line-height:normal"><span style="color:rgb(0,0,0);font-family:"Helvetica Neue";font-size:13px">------</span></div><div style="margin:0px;font-stretch:normal;line-height:normal"><br></div><div style="margin:0px;font-stretch:normal;line-height:normal">I am running code  that requires  mat_type mpiaijmkl, but unfortunately it seems that <span style="color:rgb(0,0,0)">mpiaijmkl.c is not compiled and I get the error: </span><font color="#000000"><span> PETSC ERROR: Unknown Mat type given: mpiaijmkl</span></font></div><div style="margin:0px;font-stretch:normal;line-height:normal"><span style="color:rgb(0,0,0)"><br></span></div><div style="margin:0px;font-stretch:normal;line-height:normal"><span style="color:rgb(0,0,0);font-family:"Helvetica Neue";font-size:13px">------</span></div><div style="margin:0px;font-stretch:normal;line-height:normal"><font color="#000000"><span>$ls linux64GccDPInt64Opt/obj/mat/impls/aij/mpi/</span></font></div><div style="margin:0px;font-stretch:normal;line-height:normal"><font color="#000000"><span><br>aijperm  fdmpiaij.d  ftn-custom  mpb_aij.d  mpiaij.o    mpimatmatmatmult.d  mpimatmatmult.o           mpiov.d    mpiptap.o<br>aijsell  fdmpiaij.o  mmaij.d     mpb_aij.o  mpiaijpc.d  mpimatmatmatmult.o  mpimattransposematmult.d  mpiov.o<br>crl      ftn-auto    mmaij.o     mpiaij.d   mpiaijpc.o  mpimatmatmult.d     mpimattransposematmult.o  mpiptap.d</span></font></div><div style="margin:0px;font-stretch:normal;line-height:normal"><span style="color:rgb(0,0,0);font-family:"Helvetica Neue";font-size:13px">------</span></div><div style="margin:0px;font-stretch:normal;line-height:normal"><span style="color:rgb(0,0,0);font-family:"Helvetica Neue";font-size:13px"><br></span></div><div style="margin:0px;font-stretch:normal;line-height:normal"><font color="#000000"><span>In the make.log I see:</span></font></div><div style="margin:0px;font-stretch:normal;line-height:normal"><font color="#000000"><span><br></span></font></div><div style="margin:0px;font-stretch:normal;line-height:normal"><font color="#000000"><span>PETSC_HAVE_MKL 1</span></font></div><div style="margin:0px;font-stretch:normal;line-height:normal"><font color="#000000"><span><br></span></font></div><div style="margin:0px;font-stretch:normal;line-height:normal"><font color="#000000">But the variable PETSC_HAVE_MKL_SPARSE is not set, and according to src/mat/impls/aij/mpi/aijmkl/makefile it should be set to 1 for the file to be included in the compilation.</font></div><div style="margin:0px;font-stretch:normal;line-height:normal"><br></div><div style="margin:0px;font-stretch:normal;line-height:normal"><font color="#000000">I have searched in the user list and  tried different configure options, but so far without success. Any guidance is highly appreciated. Attached are the configure and make logs.</font></div></div></blockquote><div><br></div><div>Hi Juan,</div><div><br></div><div>I believe the problem is that you specify --with-mkl_sparse-dir, but that is not used because the BLAS/LAPACK logic checks for that, and you just</div><div>need --with-mkl_sparse. Normally the "dir" option would do this automatically, but since it is not used, that logic does not kick in. Please tell me if</div><div>this works.</div><div><br></div><div>  Thanks,</div><div><br></div><div>     Matt</div><div> </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;"><div style="margin:0px;font-stretch:normal;line-height:normal"><font color="#000000">Cheers,</font></div><div style="margin:0px;font-stretch:normal;line-height:normal"><font color="#000000">Juan S.</font></div></div></blockquote></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>