Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PETSc #319

Open
ErkinYildiz opened this issue Feb 6, 2023 · 4 comments
Open

PETSc #319

ErkinYildiz opened this issue Feb 6, 2023 · 4 comments

Comments

@ErkinYildiz
Copy link

Dear community

after having solved the Trilinos issue, deal.ii works just fine. However, all examples that involve PETSc cannot run, of course,
since deal.ii was configured with the option DEAL_II_WITH_PETSC = OFF

I did attempt at installing PETSc through Candi, with the following outcome:


candi tries now to download, configure, build and install:

Project: deal.II-toolchain

Platform: deal.II-toolchain/platforms/supported/macos.platform

Fetching petsc 3.16.4

Verifying petsc-lite-3.16.4.tar.gz

petsc-lite-3.16.4.tar.gz: OK(md5)

petsc-lite-3.16.4.tar.gz already downloaded and verified.

Unpacking petsc-lite-3.16.4.tar.gz

Building petsc 3.16.4

=============================================================================================

                  Configuring PETSc to compile on your system                            

=============================================================================================

============================================================================================= ***** WARNING: CPPFLAGS (set to -I/opt/homebrew/opt/openblas/include) found in environment variables - ignoring use ./configure CPPFLAGS=$CPPFLAGS if you really want to use that value ****** ============================================================================================= ============================================================================================= ***** WARNING: LDFLAGS (set to -L/opt/homebrew/opt/openblas/lib) found in environment variables - ignoring use ./configure LDFLAGS=$LDFLAGS if you really want to use that value ****** ============================================================================================= ============================================================================================= ***** WARNING: You have a version of GNU make older than 4.0. It will work, but may not support all the parallel testing options. You can install the latest GNU make with your package manager, such as brew or macports, or use the --download-make option to get the latest GNU make ***** ============================================================================================= TESTING: checklsame from config.packages.BlasLapack(config/BuildSystem/config/packages/BlasLapack.py:662) *******************************************************************************

     UNABLE to CONFIGURE with GIVEN OPTIONS    (see configure.log for details):

The BLAS/LAPACK libraries -Wl,-rpath,/opt/homebrew/Cellar/open-mpi/4.1.4_2/lib -L/opt/homebrew/Cellar/open-mpi/4.1.4_2/lib -Wl,-rpath,/opt/homebrew/opt/libevent/lib -L/opt/homebrew/opt/libevent/lib -Wl,-rpath,/opt/homebrew/Cellar/gcc/12.2.0/lib/gcc/current/gcc/aarch64-apple-darwin22/12 -L/opt/homebrew/Cellar/gcc/12.2.0/lib/gcc/current/gcc/aarch64-apple-darwin22/12 -Wl,-rpath,/opt/homebrew/Cellar/gcc/12.2.0/lib/gcc/current/gcc -L/opt/homebrew/Cellar/gcc/12.2.0/lib/gcc/current/gcc -Wl,-rpath,/usr/local/lib -L/usr/local/lib -Wl,-rpath,/opt/homebrew/Cellar/gcc/12.2.0/lib/gcc/current -L/opt/homebrew/Cellar/gcc/12.2.0/lib/gcc/current -llapack -lblas -llapack -lblas -lc++ -ldl -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran -lemutls_w -lquadmath

cannot be used with a shared library

Either run ./configure with --with-shared-libraries=0 or use a different BLAS/LAPACK library


I could indeed figure out that home-brew openblas is present at /opt/homebrew/opt/openblas and the error message suggests what should be done
./configure with --with-shared-libraries=0
but I cannot see how and where I should use such a command. Any help appreciated.

Erkin

@tjhei
Copy link
Member

tjhei commented Feb 6, 2023

What kind of system are you on? ARM or x64?

What are your compilers mpicxx -v, mpicc -v?

How are you running candi?

@ErkinYildiz
Copy link
Author

I am using the ARM system.

erkinyildiz@Erkins-MacBook-Pro ~ % mpicxx -v
Apple clang version 14.0.0 (clang-1400.0.29.202)
Target: arm64-apple-darwin22.2.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

erkinyildiz@Erkins-MacBook-Pro ~ % mpicc -v
Apple clang version 14.0.0 (clang-1400.0.29.202)
Target: arm64-apple-darwin22.2.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

I am running Candi
After brewing

brew install cmake open-mpi gcc@11
deal.ii has been installed according to

git clone https://github.com/dealii/candi
cd candi
./candi.sh -j 8 --packages="hdf5 p4est trilinos dealii"

@tjhei
Copy link
Member

tjhei commented Feb 6, 2023

Can you use the updated instructions at https://github.com/dealii/dealii/wiki/Apple-ARM-M1-OSX
(see the brew install --cc=clang ... line)? You probably need to start over (not sure how to delete all brew packages)

@ErkinYildiz
Copy link
Author

Hi Timo, after I started over from the scratch and used the command that you suggested me, I got an error in this way.

=============================================================================================
Configuring PETSc to compile on your system

============================================================================================= ***** WARNING: CPPFLAGS (set to -I/opt/homebrew/opt/openblas/include) found in environment variables - ignoring use ./configure CPPFLAGS=$CPPFLAGS if you really want to use that value ****** ============================================================================================= ============================================================================================= ***** WARNING: LDFLAGS (set to -L/opt/homebrew/opt/openblas/lib) found in environment variables - ignoring use ./configure LDFLAGS=$LDFLAGS if you really want to use that value ****** ============================================================================================= ============================================================================================= ***** WARNING: You have a version of GNU make older than 4.0. It will work, but may not support all the parallel testing options. You can install the latest GNU make with your package manager, such as brew or macports, or use the --download-make option to get the latest GNU make ***** ============================================================================================= TESTING: checklsame from config.packages.BlasLapack(config/BuildSystem/config/packages/BlasLapack.py:662) *******************************************************************************
UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for details):

The BLAS/LAPACK libraries -Wl,-rpath,/opt/homebrew/Cellar/open-mpi/4.1.4_2/lib -L/opt/homebrew/Cellar/open-mpi/4.1.4_2/lib -Wl,-rpath,/opt/homebrew/opt/libevent/lib -L/opt/homebrew/opt/libevent/lib -Wl,-rpath,/opt/homebrew/Cellar/gcc/12.2.0/lib/gcc/current/gcc/aarch64-apple-darwin22/12 -L/opt/homebrew/Cellar/gcc/12.2.0/lib/gcc/current/gcc/aarch64-apple-darwin22/12 -Wl,-rpath,/opt/homebrew/Cellar/gcc/12.2.0/lib/gcc/current/gcc -L/opt/homebrew/Cellar/gcc/12.2.0/lib/gcc/current/gcc -Wl,-rpath,/usr/local/lib -L/usr/local/lib -Wl,-rpath,/opt/homebrew/Cellar/gcc/12.2.0/lib/gcc/current -L/opt/homebrew/Cellar/gcc/12.2.0/lib/gcc/current -llapack -lblas -llapack -lblas -lc++ -ldl -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran -lemutls_w -lquadmath
cannot be used with a shared library
Either run ./configure with --with-shared-libraries=0 or use a different BLAS/LAPACK library


Failure with exit status: 1
Exit message: petsc ./configure failed
erkinyildiz@Erkins-MacBook-Pro candi %

What should I do next?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants