[petsc-dev] issue with v3.21.5 build
Jaysaval, Piyoosh
Piyoosh.Jaysaval at pnnl.gov
Thu May 1 12:40:20 CDT 2025
Thanks to the PETSc team. I also faced this issue after upgrading to macOS 15.4.1 (and upgrading homebrew), and the following steps worked for me. I was able to use Homebrew's Python 3.10 with a virtual environment using the following commands:
brew install python at 3.10<mailto:python at 3.10>
python3.10 -m venv petsc-py310
source petsc-py310/bin/activate
I then configured/make/install petsc v3.21.5 as suggested by Satish below (both clang and homebrew options worked).
- Piyoosh
From: petsc-dev <petsc-dev-bounces at mcs.anl.gov> on behalf of Satish Balay <balay.anl at fastmail.org>
Date: Tuesday, April 29, 2025 at 09:50
To: Jeffrey Hyman <hymanjd at gmail.com>
Cc: petsc-dev <petsc-dev at mcs.anl.gov>
Subject: Re: [petsc-dev] issue with v3.21.5 build
Check twice before you click! This email originated from outside PNNL.
>>>
configure:7444: mpif90 -c -ffree-line-length-none -ffree-line-length-0 -Wno-lto-type-mismatch -O3 -Wno-unused-function -fallow-argument-mismatch -fallow-argument-mismatch -x f95 conftest.f90 >&5
./configure: line 2482: mpif90: command not found
<<<
I'm confused with all the attempts done here. The following 2 builds work for me with petsc v3.21.5:
balay at npro petsc % ./configure COPTFLAGS=-O3 CXXOPTFLAGS=-O3 FOPTFLAGS="-O3 -Wno-unused-function -fallow-argument-mismatch" \
--with-debugging=no --download-mpich=https://urldefense.us/v3/__https://gcc02.safelinks.protection.outlook.com/?url=https*3A*2F*2Furldefense.us*2Fv3*2F__https*3A*2F*2Fwww.mpich.org*2Fstatic*2Fdownloads*2F4.3.0*2Fmpich-4.3.0.tar.gz__*3B!!G_uCfscf7eWS!aDOCr6A3qNwv-FDpaZo00e9-xL6YxkXq-Q6Dp4fWaqPK1hQdnhQwoyz_x9WDJsSbPHVjh3wiZdxlsGt1KNfyUsrUuw*24&data=05*7C02*7Cpiyoosh.jaysaval*40pnnl.gov*7C21764b4715494250486608dd872d190a*7Cd6faa5f90ae240338c0130048a38deeb*7C0*7C0*7C638815350099013907*7CUnknown*7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ*3D*3D*7C0*7C*7C*7C&sdata=TLJsZ083jhyQ51V4ch1vru0ohgrFVNSYCFuSxtUefnQ*3D&reserved=0__;JSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJQ!!G_uCfscf7eWS!Z8WLlaRWLpgW_LG4whN-cqNmMnjIzeeIFRcsC3rsCqYZZwY5AtDC21_QMJWhyxnjlsasL-2itFCOFXUgXhYakOR0Aa8Ovw8HTg$ --download-hdf5=yes \
--with-hdf5-fortran-bindings=yes --download-fblaslapack=yes \
--download-metis=yes --download-parmetis=yes \
CC=gcc-14 CXX=g++-14 FC=gfortran-14 --download-make=yes \
--download-cmake=https://urldefense.us/v3/__https://gcc02.safelinks.protection.outlook.com/?url=https*3A*2F*2Furldefense.us*2Fv3*2F__https*3A*2F*2Fgitlab.kitware.com*2Fcmake*2Fcmake*2F-*2Farchive*2Fv3.31.7*2Fcmake-v3.31.7.tar.gz__*3B!!G_uCfscf7eWS!aDOCr6A3qNwv-FDpaZo00e9-xL6YxkXq-Q6Dp4fWaqPK1hQdnhQwoyz_x9WDJsSbPHVjh3wiZdxlsGt1KNfrRV7i-w*24&data=05*7C02*7Cpiyoosh.jaysaval*40pnnl.gov*7C21764b4715494250486608dd872d190a*7Cd6faa5f90ae240338c0130048a38deeb*7C0*7C0*7C638815350099030915*7CUnknown*7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ*3D*3D*7C0*7C*7C*7C&sdata=FPUiQ86FjRLrOMMLPBqmS30OV75FAx7BFriMHofU4*2F4*3D&reserved=0__;JSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJQ!!G_uCfscf7eWS!Z8WLlaRWLpgW_LG4whN-cqNmMnjIzeeIFRcsC3rsCqYZZwY5AtDC21_QMJWhyxnjlsasL-2itFCOFXUgXhYakOR0Aa9Wyd1dZQ$ \
--download-cmake-cc=clang --download-cmake-cxx=clang++
balay at npro petsc.x % ./configure COPTFLAGS=-O3 CXXOPTFLAGS=-O3 FOPTFLAGS="-O3 -Wno-unused-function -fallow-argument-mismatch" \
--with-debugging=no --download-mpich=https://urldefense.us/v3/__https://gcc02.safelinks.protection.outlook.com/?url=https*3A*2F*2Furldefense.us*2Fv3*2F__https*3A*2F*2Fwww.mpich.org*2Fstatic*2Fdownloads*2F4.3.0*2Fmpich-4.3.0.tar.gz__*3B!!G_uCfscf7eWS!aDOCr6A3qNwv-FDpaZo00e9-xL6YxkXq-Q6Dp4fWaqPK1hQdnhQwoyz_x9WDJsSbPHVjh3wiZdxlsGt1KNfyUsrUuw*24&data=05*7C02*7Cpiyoosh.jaysaval*40pnnl.gov*7C21764b4715494250486608dd872d190a*7Cd6faa5f90ae240338c0130048a38deeb*7C0*7C0*7C638815350099043467*7CUnknown*7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ*3D*3D*7C0*7C*7C*7C&sdata=oqpV9d0S6mmghdZLYdrxzp2uznO*2F*2FVcr94YeVOCWux8*3D&reserved=0__;JSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUl!!G_uCfscf7eWS!Z8WLlaRWLpgW_LG4whN-cqNmMnjIzeeIFRcsC3rsCqYZZwY5AtDC21_QMJWhyxnjlsasL-2itFCOFXUgXhYakOR0Aa_WYsBDpg$ --download-hdf5=yes \
--with-hdf5-fortran-bindings=yes --download-fblaslapack=yes \
--download-metis=yes --download-parmetis=yes \
CC=clang CXX=clang++ FC=gfortran-14 --download-make=yes \
--download-cmake=https://urldefense.us/v3/__https://gcc02.safelinks.protection.outlook.com/?url=https*3A*2F*2Furldefense.us*2Fv3*2F__https*3A*2F*2Fgitlab.kitware.com*2Fcmake*2Fcmake*2F-*2Farchive*2Fv3.31.7*2Fcmake-v3.31.7.tar.gz__*3B!!G_uCfscf7eWS!aDOCr6A3qNwv-FDpaZo00e9-xL6YxkXq-Q6Dp4fWaqPK1hQdnhQwoyz_x9WDJsSbPHVjh3wiZdxlsGt1KNfrRV7i-w*24&data=05*7C02*7Cpiyoosh.jaysaval*40pnnl.gov*7C21764b4715494250486608dd872d190a*7Cd6faa5f90ae240338c0130048a38deeb*7C0*7C0*7C638815350099055677*7CUnknown*7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ*3D*3D*7C0*7C*7C*7C&sdata=nq*2F5gH87OQjDUTVZjUz198IR4bwX18*2BEl2AcAEcIYFY*3D&reserved=0__;JSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSU!!G_uCfscf7eWS!Z8WLlaRWLpgW_LG4whN-cqNmMnjIzeeIFRcsC3rsCqYZZwY5AtDC21_QMJWhyxnjlsasL-2itFCOFXUgXhYakOR0Aa9AEPagKw$ \
--download-cmake-cc=clang --download-cmake-cxx=clang++
Here clang, python is from xcode, gcc-14 is from brew
>>>>>
balay at npro ~ % sw_vers
ProductName: macOS
ProductVersion: 15.4.1
BuildVersion: 24E263
balay at npro ~ % python3 --version
Python 3.9.6
balay at npro ~ % clang --version
Apple clang version 17.0.0 (clang-1700.0.13.3)
Target: arm64-apple-darwin24.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
balay at npro ~ % gcc-14 --version
gcc-14 (Homebrew GCC 14.2.0_1) 14.2.0
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I'll suggest:
- avoid conda
- start with a clean petsc git repo:
rm -rf arch*
git clean -f -d -x
git reset --hard
git checkout v3.21.5
- perhaps update to latest xcode [as this worked for me]
- reinstall brew - as suggested at https://urldefense.us/v3/__https://gcc02.safelinks.protection.outlook.com/?url=https*3A*2F*2Furldefense.us*2Fv3*2F__https*3A*2F*2Fpetsc.org*2Frelease*2Finstall*2Finstall*2F*installing-on-macos__*3BIw!!G_uCfscf7eWS!aDOCr6A3qNwv-FDpaZo00e9-xL6YxkXq-Q6Dp4fWaqPK1hQdnhQwoyz_x9WDJsSbPHVjh3wiZdxlsGt1KNdYSvk6nw*24&data=05*7C02*7Cpiyoosh.jaysaval*40pnnl.gov*7C21764b4715494250486608dd872d190a*7Cd6faa5f90ae240338c0130048a38deeb*7C0*7C0*7C638815350099067697*7CUnknown*7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ*3D*3D*7C0*7C*7C*7C&sdata=Des*2F62K4ub*2Bg2*2FennriYN4H9A9Xj5*2BJIrV9gqFUKe3Q*3D&reserved=0__;JSUlJSUlJSUlJSUlKiUlJSUlJSUlJSUlJSUlJSUlJSUlJSUl!!G_uCfscf7eWS!Z8WLlaRWLpgW_LG4whN-cqNmMnjIzeeIFRcsC3rsCqYZZwY5AtDC21_QMJWhyxnjlsasL-2itFCOFXUgXhYakOR0Aa_S0H7f1Q$ <https://urldefense.us/v3/__https://petsc.org/release/install/install/*installing-on-macos__;Iw!!G_uCfscf7eWS!aDOCr6A3qNwv-FDpaZo00e9-xL6YxkXq-Q6Dp4fWaqPK1hQdnhQwoyz_x9WDJsSbPHVjh3wiZdxlsGt1KNdYSvk6nw$>
- use xcode clang/clang++ instead of brew clang/clang++ (or gcc-14/gfortran-14) for cmake
- use xcode clang/clang++ for PETSc as-well [unless you really need a build with gcc-14. We primarily require gfortran from brew]
- use xcode/python [not brew/python].
Satish
On Tue, 29 Apr 2025, Jeffrey Hyman wrote:
> Made it a little further. Then some new clang errors.
>
> clang: error: unknown argument: '-mfp16-format=ieee'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20250501/960647f7/attachment.html>
More information about the petsc-dev
mailing list