<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:DengXian;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"\@DengXian";
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Menlo;
panose-1:2 11 6 9 3 8 4 2 2 4;}
@font-face
{font-family:"Segoe UI Symbol";
panose-1:2 11 5 2 4 2 4 2 2 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
p.p1, li.p1, div.p1
{mso-style-name:p1;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.s1
{mso-style-name:s1;}
span.EmailStyle20
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style></head><body lang=EN-CA link=blue vlink=purple style='word-wrap:break-word;-webkit-nbsp-mode: space;line-break:after-white-space'><div class=WordSection1><p class=MsoNormal>Hi Samar,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thanks for your suggestion. Unfortunately, it does not work. I checked the mpif90 wrapper and the option "-Wl,-flat_namespace” is present. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='font-size:8.5pt;font-family:Menlo;color:black'>(base) </span><b><span style='font-size:8.5pt;font-family:"Segoe UI Symbol",sans-serif;color:#39C026'>➜</span></b><b><span style='font-size:8.5pt;font-family:Menlo;color:#39C026'> </span></b><b><span style='font-size:8.5pt;font-family:Menlo;color:#38B9C7'>bin</span></b><span style='font-size:8.5pt;font-family:Menlo;color:black'> ./mpif90 -show<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:8.5pt;font-family:Menlo;color:black'>ifort -I/Users/danyangsu/Soft/PETSc/petsc-3.16.3/macos-intel-dbg/include -Wl,-flat_namespace -Wl,-commons,use_dylibs -I/Users/danyangsu/Soft/PETSc/petsc-3.16.3/macos-intel-dbg/lib -L/Users/danyangsu/Soft/PETSc/petsc-3.16.3/macos-intel-dbg/lib -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thanks anyway,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Danyang<o:p></o:p></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:12.0pt;color:black'>From: </span></b><span style='font-size:12.0pt;color:black'>Samar Khatiwala <samar.khatiwala@earth.ox.ac.uk><br><b>Date: </b>Wednesday, January 12, 2022 at 2:01 PM<br><b>To: </b>Danyang Su <danyang.su@gmail.com><br><b>Cc: </b>PETSc <petsc-users@mcs.anl.gov><br><b>Subject: </b>Re: [petsc-users] PETSc configuration error on macOS Monterey with Intel oneAPI<o:p></o:p></span></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><p class=MsoNormal>Hi Danyang,<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><div><p class=MsoNormal>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” <o:p></o:p></p></div><div><p class=MsoNormal>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 <o:p></o:p></p></div><div><p class=MsoNormal>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 <o:p></o:p></p></div><div><p class=MsoNormal>"--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).<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Samar<o:p></o:p></p></div><div><p class=MsoNormal><br><br><o:p></o:p></p><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><p class=MsoNormal>On Jan 12, 2022, at 9:41 PM, Danyang Su <<a href="mailto:danyang.su@gmail.com">danyang.su@gmail.com</a>> wrote:<o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=p1><span class=s1>Hi All,</span><o:p></o:p></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><o:p></o:p></p><div><p class=MsoNormal><span class=s1> </span><o:p></o:p></p></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><o:p></o:p></p><div><p class=MsoNormal><span class=s1> </span><o:p></o:p></p></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><o:p></o:p></p><div><p class=MsoNormal><span class=s1> </span><o:p></o:p></p></div><p class=p1><span class=s1>Any suggestions for that?</span><o:p></o:p></p><div><p class=MsoNormal><span class=s1> </span><o:p></o:p></p></div><p class=p1><span class=s1>There is no problem if I use GNU compiler and MPICH.</span><o:p></o:p></p><div><p class=MsoNormal><span class=s1> </span><o:p></o:p></p></div><p class=p1><span class=s1>Thanks,</span><o:p></o:p></p><div><p class=MsoNormal><span class=s1> </span><o:p></o:p></p></div><p class=MsoNormal><span class=s1>Danyang</span> <o:p></o:p></p></div></div></blockquote></div><p class=MsoNormal><o:p> </o:p></p></div></div></body></html>