[petsc-users] PETSc configuration error on macOS Monterey with Intel oneAPI

Samar Khatiwala samar.khatiwala at earth.ox.ac.uk
Thu Jan 13 03:16:18 CST 2022


Hi Danyang,

Just to reiterate, the presence of -Wl,-flat_namespace *is* the problem. I got rid of it by configuring mpich with --enable-two-level-namespace. I reported this problem to the PETSc 
folks a few weeks ago and they were going to patch MPICH.py (under config/BuildSystem/config/packages) to pass this flag. So you could try configuring with —download-mpich 
(or build your own mpich, which is pretty straightforward). If you’re wedded to openmpi, you could patch up OpenMPI.py yourself (maybe --enable-two-level-namespace is called 
something else for openmpi).

Best,

Samar

> On Jan 13, 2022, at 6:01 AM, Danyang Su <danyang.su at gmail.com> wrote:
> 
> Hi Samar,
>  
> Thanks for your suggestion. Unfortunately, it does not work. I checked the mpif90 wrapper and the option "-Wl,-flat_namespace” is present. 
>  
> (base) ➜  bin ./mpif90 -show
> 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
>  
> Thanks anyway,
>  
> Danyang
> From: Samar Khatiwala <samar.khatiwala at earth.ox.ac.uk>
> Date: Wednesday, January 12, 2022 at 2:01 PM
> To: Danyang Su <danyang.su at gmail.com>
> Cc: PETSc <petsc-users at mcs.anl.gov>
> Subject: Re: [petsc-users] PETSc configuration error on macOS Monterey with Intel oneAPI
>  
> Hi Danyang,
>  
> 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” 
> 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 
> 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 
> "--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).
>  
> Samar
> 
> 
>> On Jan 12, 2022, at 9:41 PM, Danyang Su <danyang.su at gmail.com <mailto:danyang.su at gmail.com>> wrote:
>>  
>> Hi All,
>> 
>> I got an error in PETSc configuration on macOS Monterey with Intel oneAPI using the following options:
>> 
>>  
>> ./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
>> 
>>  
>> Error with downloaded OpenMPI: Cannot compile/link FC with /Users/danyangsu/Soft/PETSc/petsc-3.16.3/macos-intel-dbg/bin/mpif90.
>> 
>>  
>> Any suggestions for that?
>> 
>>  
>> There is no problem if I use GNU compiler and MPICH.
>> 
>>  
>> Thanks,
>> 
>>  
>> Danyang

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20220113/c415c2ba/attachment-0001.html>


More information about the petsc-users mailing list