<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Hello, I'm trying to compile the PETSc library version 3.19.1 with OpenMPI 4.1.4 and the OneAPI 2022 Update 2 Intel Compiler suite on a Mac with OSX Ventura 13.3.1.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
I can compile PETSc in debug mode with this configure and make lines. I can run the PETSC tests, which seem fine.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
When I compile the library in optimized mode, either using -O3 or O1, for example configuring with:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0">
<span style="font-family: "Courier New", monospace;">$ ./configure --prefix=/opt/petsc-oneapi22u3 --with-blaslapack-dir=/opt/intel/oneapi/mkl/2022.2.1 COPTFLAGS='-m64 -O1 -g -diag-disable=10441' CXXOPTFLAGS='-m64 -O1 -g -diag-disable=10441' FOPTFLAGS='-m64
-O1 -g' LDFLAGS='-m64' --with-debugging=0 --with-shared-libraries=0 --download-make</span><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0">
and using mpicc (icc), mpif90 (ifort) from Open MPI, the static lib compiles. Yet, I see right off the bat this segfault error in the first PETSc example:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0 ContentPasted1">
<span style="font-family: "Courier New", monospace;">$ make PETSC_DIR=/Users/mnv/Documents/Software/petsc-3.19.1 PETSC_ARCH=arch-darwin-c-opt test</span>
<div class="ContentPasted1"><span style="font-family: "Courier New", monospace;">/Users/mnv/Documents/Software/petsc-3.19.1/arch-darwin-c-opt/bin/make --no-print-directory -f /Users/mnv/Documents/Software/petsc-3.19.1/gmakefile.test PETSC_ARCH=arch-darwin-c-opt
PETSC_DIR=/Users/mnv/Documents/Software/petsc-3.19.1 test</span></div>
<div class="ContentPasted1"><span style="font-family: "Courier New", monospace;">/opt/intel/oneapi/intelpython/latest/bin/python3 /Users/mnv/Documents/Software/petsc-3.19.1/config/gmakegentest.py --petsc-dir=/Users/mnv/Documents/Software/petsc-3.19.1 --petsc-arch=arch-darwin-c-opt
--testdir=./arch-darwin-c-opt/tests</span></div>
<div class="ContentPasted1"><span style="font-family: "Courier New", monospace;">Using MAKEFLAGS: --no-print-directory -- PETSC_ARCH=arch-darwin-c-opt PETSC_DIR=/Users/mnv/Documents/Software/petsc-3.19.1</span></div>
<div class="ContentPasted1"><span style="font-family: "Courier New", monospace;"> CC arch-darwin-c-opt/tests/sys/classes/draw/tests/ex1.o</span></div>
<div class="ContentPasted1"><span style="font-family: "Courier New", monospace;">In file included from /Users/mnv/Documents/Software/petsc-3.19.1/include/petscsys.h(44),</span></div>
<div class="ContentPasted1"><span style="font-family: "Courier New", monospace;"> from /Users/mnv/Documents/Software/petsc-3.19.1/src/sys/classes/draw/tests/ex1.c(4):</span></div>
<div class="ContentPasted1"><span style="font-family: "Courier New", monospace;">/Users/mnv/Documents/Software/petsc-3.19.1/include/petscsystypes.h(68): warning #2621: attribute "warn_unused_result" does not apply here</span></div>
<div class="ContentPasted1"><span style="font-family: "Courier New", monospace;"> PETSC_ERROR_CODE_TYPEDEF enum PETSC_ERROR_CODE_NODISCARD {</span></div>
<div class="ContentPasted1"><span style="font-family: "Courier New", monospace;"> ^</span></div>
<div><br class="ContentPasted1">
</div>
<div class="ContentPasted1"><span style="font-family: "Courier New", monospace;"> CLINKER arch-darwin-c-opt/tests/sys/classes/draw/tests/ex1</span></div>
<div class="ContentPasted1"><span style="font-family: "Courier New", monospace;"> TEST arch-darwin-c-opt/tests/counts/sys_classes_draw_tests-ex1_1.counts</span></div>
<div class="ContentPasted1"><span style="font-family: "Courier New", monospace;">not ok sys_classes_draw_tests-ex1_1
<b># Error code: 139</b></span></div>
<div class="ContentPasted1"><b><span style="font-family: "Courier New", monospace;"># [excess:98681] *** Process received signal ***</span></b></div>
<div class="ContentPasted1"><b><span style="font-family: "Courier New", monospace;"># [excess:98681] Signal: Segmentation fault: 11 (11)</span></b></div>
<div class="ContentPasted1"><b><span style="font-family: "Courier New", monospace;"># [excess:98681] Signal code: Address not mapped (1)</span></b></div>
<div class="ContentPasted1"><b><span style="font-family: "Courier New", monospace;"># [excess:98681] Failing at address: 0x7f</span></b></div>
<div class="ContentPasted1"><b><span style="font-family: "Courier New", monospace;"># [excess:98681] *** End of error message ***</span></b></div>
<div class="ContentPasted1"><span style="font-family: "Courier New", monospace;"># --------------------------------------------------------------------------</span></div>
<div class="ContentPasted1"><span style="font-family: "Courier New", monospace;"># Primary job terminated normally, but 1 process returned</span></div>
<div class="ContentPasted1"><span style="font-family: "Courier New", monospace;"># a non-zero exit code. Per user-direction, the job has been aborted.</span></div>
<div class="ContentPasted1"><span style="font-family: "Courier New", monospace;"># --------------------------------------------------------------------------</span></div>
<div class="ContentPasted1"><span style="font-family: "Courier New", monospace;"># --------------------------------------------------------------------------</span></div>
<div class="ContentPasted1"><span style="font-family: "Courier New", monospace;"># mpiexec noticed that process rank 0 with PID 0 on node excess exited on signal 11 (Segmentation fault: 11).</span></div>
<div class="ContentPasted1"><span style="font-family: "Courier New", monospace;"># --------------------------------------------------------------------------</span></div>
<span style="font-family: "Courier New", monospace;"> ok sys_classes_draw_tests-ex1_1 # SKIP Command failed so no diff</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0 ContentPasted1">
<span style="font-family: "Courier New", monospace;"><br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0 ContentPasted1">
<span style="font-family: Calibri, Helvetica, sans-serif;">I see the same segfault error in all PETSc examples.
<br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0 ContentPasted1">
<span style="font-family: Calibri, Helvetica, sans-serif;">Any help is mostly appreciated, I'm starting to work with PETSc. Our plan is to use the linear solver from PETSc for the Poisson equation on our numerical scheme and test this on a GPU cluster. So also,
any guideline on how to interface PETSc with a fortran code and personal experience is also most appreciated!</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0 ContentPasted1">
<span style="font-family: Calibri, Helvetica, sans-serif;"><br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0 ContentPasted1">
<span style="font-family: Calibri, Helvetica, sans-serif;">Marcos<br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0 ContentPasted1">
<span style="font-family: Calibri, Helvetica, sans-serif;"><br>
</span><span style="font-family: "Courier New", monospace;"></span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
</body>
</html>