<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Danyang,<div class=""><br class=""></div><div class=""><div>I had trouble configuring PETSc on MacOS Monterey with ifort when using mpich (which I was building myself). I tracked it down to an errant "-Wl,-flat_namespace” </div><div>option in the mpif90 wrapper. I rebuilt mpich with the "--enable-two-level-namespace” configuration option and the problem went away. I don’t know if there’s a similar </div><div>issue with openmpi but you could check the corresponding mpif90 wrapper (mpif90 -show) whether "-Wl,-flat_namespace” is present or not. If so, perhaps passing </div><div>"--enable-two-level-namespace” to PETSc configure might fix the problem (although I don’t know how you would set this flag *just* for building openmpi).</div><div><br class=""></div><div>Samar</div><div><br class=""><blockquote type="cite" class=""><div class="">On Jan 12, 2022, at 9:41 PM, Danyang Su <<a href="mailto:danyang.su@gmail.com" class="">danyang.su@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">

  
  <div class=""><p class="p1"><span class="s1">Hi All,</span></p><p class="p1"><span class="s1">I got an error in PETSc configuration
        on macOS Monterey with Intel oneAPI using the following options:</span></p><div class=""><span class="s1"> </span><br class="webkit-block-placeholder"></div><p class="p1"><span class="s1">./configure --with-cc=icc
        --with-cxx=icpc --with-fc=ifort
        --with-blas-lapack-dir=/opt/intel/oneapi/mkl/2022.0.0/lib/
        --with-debugging=1 PETSC_ARCH=macos-intel-dbg --download-mumps
        --download-parmetis --download-metis --download-hypre
        --download-superlu --download-hdf5=yes --download-openmpi</span></p><div class=""><span class="s1"> </span><br class="webkit-block-placeholder"></div><p class="p1"><span class="s1">Error with downloaded OpenMPI: Cannot
        compile/link FC with
        /Users/danyangsu/Soft/PETSc/petsc-3.16.3/macos-intel-dbg/bin/mpif90.</span></p><div class=""><span class="s1"> </span><br class="webkit-block-placeholder"></div><p class="p1"><span class="s1">Any suggestions for that?</span></p><div class=""><span class="s1"> </span><br class="webkit-block-placeholder"></div><p class="p1"><span class="s1">There is no problem if I use GNU
        compiler and MPICH.</span></p><div class=""><span class="s1"> </span><br class="webkit-block-placeholder"></div><p class="p1"><span class="s1">Thanks,</span></p><div class=""><span class="s1"> </span><br class="webkit-block-placeholder"></div>
    <span class="s1">Danyang</span>
  </div>

</div></blockquote></div><br class=""></div></body></html>