Dear David,

This indeed looks like the culprit! I verified that the libHYPRE-2.32.0.dylib 
had many duplicate LC_RPATH instances. Upon removing them, the executable 
(src/snes/tutorials/ex19) complained that the next linked library also has 
duplicate LC_RPATH instances.

So the issue is related to duplicated links. I modified the configure command 
and removed LDFLAGs and CXX_LINKER_FLAGs.

./configure --with-debugging=0 --download-make --download-cmake 
--download-hypre --download-parmetis --download-metis --download-ptscotch 
--download-mumps --download-scalapack --with-precision=double 
--with-shared-libraries=1 --with-scalar-type=real --with-fc=mpifort 
--with-cc=mpicc --with-cxx=mpicxx CFLAGS="-g -O2 -fPIC" CXXFLAGS="-g -O2 -fPIC" 
FCFLAGS="-g -O2" FFLAGS="-g -O2" MAKEFLAGS=w --download-bison

And now everything works!

√ petsc-3.23.1 % make 
PETSC_DIR=/Volumes/OpenFOAM/jsalazar-9/ThirdParty/petsc-3.23.1 
PETSC_ARCH=arch-darwin-c-opt check
Running PETSc check examples to verify correct installation
Using PETSC_DIR=/Volumes/OpenFOAM/jsalazar-9/ThirdParty/petsc-3.23.1 and 
PETSC_ARCH=arch-darwin-c-opt
C/C++ example src/snes/tutorials/ex19 run successfully with 1 MPI process
C/C++ example src/snes/tutorials/ex19 run successfully with 2 MPI processes
C/C++ example src/snes/tutorials/ex19 run successfully with HYPRE
C/C++ example src/snes/tutorials/ex19 run successfully with MUMPS
Fortran example src/snes/tutorials/ex5f run successfully with 1 MPI process
Completed PETSc check examples

One thing I noticed is that I have LDFLAGS=-Wl,-ld_classic there are still 
duplicate LC_RPATH. However, If I remove LDFLAGS and instead have 
CXX_LINKER_FLAG=-Wl,-ld_classic there are no duplicate RC_PATH.

Thank you, I learned something today. Also thanks to Matthew, I have to be more 
careful about different paths, even if they lead to the same place. Sorry I 
took a long time to reply.

Juan S.

Reply via email to