<!DOCTYPE html>
<!-- BaNnErBlUrFlE-BoDy-start -->
<!-- Preheader Text : BEGIN -->
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;">
> On 1 Apr 2024, at 23: 38, Satish Balay <balay@ mcs. anl. gov> wrote: > > On Sun, 31 Mar 2024, Zongze Yang wrote: >>> --- >>> petsc@ npro petsc % ./configure --download-bison --download-chaco --download-ctetgen
</div>
<!-- Preheader Text : END -->
<!-- Email Banner : BEGIN -->
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;">ZjQcmQRYFpfptBannerStart</div>
<!--[if ((ie)|(mso))]>
<table border="0" cellspacing="0" cellpadding="0" width="100%" style="padding: 16px 0px 16px 0px; direction: ltr" ><tr><td>
<table border="0" cellspacing="0" cellpadding="0" style="padding: 0px 10px 5px 6px; width: 100%; border-radius:4px; border-top:4px solid #90a4ae;background-color:#D0D8DC;"><tr><td valign="top">
<table align="left" border="0" cellspacing="0" cellpadding="0" style="padding: 4px 8px 4px 8px">
<tr><td style="color:#000000; font-family: 'Arial', sans-serif; font-weight:bold; font-size:14px; direction: ltr">
This Message Is From an External Sender
</td></tr>
<tr><td style="color:#000000; font-weight:normal; font-family: 'Arial', sans-serif; font-size:12px; direction: ltr">
This message came from outside your organization.
</td></tr>
</table>
</td></tr></table>
</td></tr></table>
<![endif]-->
<![if !((ie)|(mso))]>
<div dir="ltr" id="pfptBanner2qzqdjp" style="all: revert !important; display:block !important; text-align: left !important; margin:16px 0px 16px 0px !important; padding:8px 16px 8px 16px !important; border-radius: 4px !important; min-width: 200px !important; background-color: #D0D8DC !important; background-color: #D0D8DC; border-top: 4px solid #90a4ae !important; border-top: 4px solid #90a4ae;">
<div id="pfptBanner2qzqdjp" style="all: unset !important; float:left !important; display:block !important; margin: 0px 0px 1px 0px !important; max-width: 600px !important;">
<div id="pfptBanner2qzqdjp" style="all: unset !important; display:block !important; visibility: visible !important; background-color: #D0D8DC !important; color:#000000 !important; color:#000000; font-family: 'Arial', sans-serif !important; font-family: 'Arial', sans-serif; font-weight:bold !important; font-weight:bold; font-size:14px !important; line-height:18px !important; line-height:18px">
This Message Is From an External Sender
</div>
<div id="pfptBanner2qzqdjp" style="all: unset !important; display:block !important; visibility: visible !important; background-color: #D0D8DC !important; color:#000000 !important; color:#000000; font-weight:normal; font-family: 'Arial', sans-serif !important; font-family: 'Arial', sans-serif; font-size:12px !important; line-height:18px !important; line-height:18px; margin-top:2px !important;">
This message came from outside your organization.
</div>
</div>
<div style="clear: both !important; display: block !important; visibility: hidden !important; line-height: 0 !important; font-size: 0.01px !important; height: 0px"> </div>
</div>
<![endif]>
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;">ZjQcmQRYFpfptBannerEnd</div>
<!-- Email Banner : END -->
<!-- BaNnErBlUrFlE-BoDy-end -->
<html>
<head><!-- BaNnErBlUrFlE-HeAdEr-start -->
<style>
#pfptBanner2qzqdjp { all: revert !important; display: block !important;
visibility: visible !important; opacity: 1 !important;
background-color: #D0D8DC !important;
max-width: none !important; max-height: none !important }
.pfptPrimaryButton2qzqdjp:hover, .pfptPrimaryButton2qzqdjp:focus {
background-color: #b4c1c7 !important; }
.pfptPrimaryButton2qzqdjp:active {
background-color: #90a4ae !important; }
</style>
<!-- BaNnErBlUrFlE-HeAdEr-end -->
<meta charset="us-ascii"></head><body><pre style="font-family: sans-serif; font-size: 100%; white-space: pre-wrap; word-wrap: break-word">
> On 1 Apr 2024, at 23:38, Satish Balay <balay@mcs.anl.gov> wrote:
>
> On Sun, 31 Mar 2024, Zongze Yang wrote:
>>> ---
>>> petsc@npro petsc % ./configure --download-bison --download-chaco --download-ctetgen --download-eigen --download-fftw --download-hdf5 --download-hpddm --download-hwloc --download-hypre --download-libpng --download-metis --download-mmg --download-mumps --download-netcdf --download-openblas
>> --download-openblas-make-options="'USE_THREAD=0 USE_LOCKING=1 USE_OPENMP=0'" --download-p4est --download-parmmg --download-pnetcdf --download-pragmatic --download-ptscotch --download-scalapack --download-slepc --download-suitesparse --download-superlu_dist --download-tetgen --download-tri
>> angle --with-c2html=0 --with-debugging=1 --with-fortran-bindings=0 --with-shared-libraries=1 --with-x=0 --with-zlib --download-openmpi=<a href="https://urldefense.us/v3/__https://download.open-mpi.org/release/open-mpi/v5.0/openmpi-5.0.3rc1.tar.bz2__;!!G_uCfscf7eWS!aCLPUhLfLFG5UwNlUWgGGhXZlw905gJwDd
>>">https://urldefense.us/v3/__https://download.open-mpi.org/release/open-mpi/v5.0/openmpi-5.0.3rc1.tar.bz2__;!!G_uCfscf7eWS!aCLPUhLfLFG5UwNlUWgGGhXZlw905gJwDd
>></a>AryIrltDIXJcdmOP6Is44FzBVrY5ndwzmIqMhI515mnNjTuHoR-tzq$ --download-pastix=<a href="https://urldefense.us/v3/__https://web.cels.anl.gov/projects/petsc/download/externalpackages/pastix_5.2.3-p1.tar.bz2__;!!G_uCfscf7eWS!aCLPUhLfLFG5UwNlUWgGGhXZlw905gJwDdAryIrltDIXJcdmOP6Is44FzBVrY5ndwzmIqMhI515mnNjTuA
>>">https://urldefense.us/v3/__https://web.cels.anl.gov/projects/petsc/download/externalpackages/pastix_5.2.3-p1.tar.bz2__;!!G_uCfscf7eWS!aCLPUhLfLFG5UwNlUWgGGhXZlw905gJwDdAryIrltDIXJcdmOP6Is44FzBVrY5ndwzmIqMhI515mnNjTuA
>></a>fJ49xl$ && make && make check
>>
>> There's an error encountered during configuration with the above options:
>> ```
>> TESTING: FortranMPICheck from config.packages.MPI(config/BuildSystem/config/packages/MPI.py:676)
>> *********************************************************************************************
>> UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for details):
>> ---------------------------------------------------------------------------------------------
>> Fortran error! mpi_init() could not be located!
>> *********************************************************************************************
>> ```
>> Please refer to the attached file for further information.
>
> So I'm getting:
>
>>>>>>>
> *** Fortran compiler
> checking whether the compiler supports GNU Fortran... yes
> checking whether gfortran accepts -g... yes
> checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
> checking the name lister (/usr/bin/nm -B) interface... BSD nm
> checking whether ln -s works... yes
> checking if Fortran compiler works... yes
> checking for extra arguments to build a shared library... impossible -- -static
> checking for gfortran warnings flags... none
> checking for Fortran flag to compile .f files... none
> checking for Fortran flag to compile .f90 files... none
> checking if Fortran compilers preprocess .F90 files without additional flag... yes
> checking to see if Fortran compilers need additional linker flags... -Wl,-flat_namespace
> checking external symbol convention... single underscore
> checking if C and Fortran are link compatible... yes
> checking to see if Fortran compiler likes the C++ exception flags... skipped (no C++ exceptions flags)
> checking to see if mpifort compiler needs additional linker flags... none
> <<<<
>
> However you are getting:
>
>>>>>
> *** Fortran compiler
> checking whether the compiler supports GNU Fortran... yes
> checking whether gfortran accepts -g... yes
> checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
> checking the name lister (/usr/bin/nm -B) interface... BSD nm
> checking whether ln -s works... yes
> checking if Fortran compiler works... yes
> checking for extra arguments to build a shared library... impossible -- -static
> checking for gfortran warnings flags... none
> checking for Fortran flag to compile .f files... none
> checking for Fortran flag to compile .f90 files... none
> checking if Fortran compilers preprocess .F90 files without additional flag... yes
> checking to see if Fortran compilers need additional linker flags... -Wl,-flat_namespace
> checking external symbol convention... single underscore
> checking if C and Fortran are link compatible... yes
> checking to see if Fortran compiler likes the C++ exception flags... skipped (no C++ exceptions flags)
> checking to see if mpifort compiler needs additional linker flags... -Wl,-commons,use_dylibs
> <<<<
>
> So gfortran [or ld from this newer xcode?] is behaving differently - and openmpi is picking up and using this broken/unsupported option - and likely triggering subsequent errors.
I noticed this in the config.log of OpenMPI:
```
configure:30230: checking to see if mpifort compiler needs additional linker flags
configure:30247: gfortran -o conftest -fPIC -ffree-line-length-none -ffree-line-length-0 -Wno-lto-type-mismatch -g -O0 -fallow-argument-mismatch -Wl,-flat_namespace -Wl,-commons,use_dylibs conftest.f90 >&5
ld: warning: -commons use_dylibs is no longer supported, using error treatment instead
configure:30247: $? = 0
configure:30299: result: -Wl,-commons,use_dylibs
```
So, I find it odd that this flag isn't picked up on your platform, as it only checked the exit value.
Best wishes,
Zongze
>
>>>>
> ld: warning: -commons use_dylibs is no longer supported, using error treatment instead
> ld: common symbol '_mpi_fortran_argv_null_' from '/private/var/folders/tf/v4zjvtw12yb3tszk813gmnvw0000gn/T/petsc-xyn64q55/config.libraries/conftest.o' conflicts with definition from dylib '_mpi_fortran_argv_null_' from '/Users/zzyang/workspace/repos/petsc/arch-darwin-c-debug/lib/libmpi_usempif08.40.dylib'
> <<<
>
> Or perhaps openmpi configure is affected by this new warning that this newer xcode spews
>>>>
> ld: warning: duplicate -rpath '/opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/current/gcc' ignored
> <<<
>
> I'm not sure what to suggest here [other than using Linux - and avoiding these hassles with MacOS :( ]..
>
> Satish
</pre></body></html>