<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-7">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof"><span style="font-family: Times, "Times New Roman", serif; color: rgb(0, 0, 0);">Hello everyone,
</span><br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-family: Times, "Times New Roman", serif; color: rgb(0, 0, 0);">I am trying to use Petsc coupled with Hypre BoomerAMG as preconditioner in our in-house code to simulate the transient motion of complex fluid with finite elements. The problem
is that after a random number of iterations, an error arises when the Hypre is called.
</span><br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-family: Times, "Times New Roman", serif; color: rgb(0, 0, 0);">The error that I get in the terminal is the following: </span></div>
<div class="elementToProof ContentPasted0" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-family: Times, "Times New Roman", serif; color: rgb(0, 0, 0);">[16]PETSC ERROR: ------------------------------------------------------------------------</span>
<div class="ContentPasted0"><span style="font-family: Times, "Times New Roman", serif; color: rgb(0, 0, 0);">[16]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range</span></div>
<div class="ContentPasted0"><span style="font-family: Times, "Times New Roman", serif; color: rgb(0, 0, 0);">[16]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger</span></div>
<div class="ContentPasted0"><span style="font-family: Times, "Times New Roman", serif; color: rgb(0, 0, 0);">[16]PETSC ERROR: or see https://petsc.org/release/faq/#valgrind and https://petsc.org/release/faq/</span></div>
<div class="ContentPasted0"><span style="font-family: Times, "Times New Roman", serif; color: rgb(0, 0, 0);">[16]PETSC ERROR: --------------------- Stack Frames ------------------------------------</span></div>
<div class="ContentPasted0"><span style="font-family: Times, "Times New Roman", serif; color: rgb(0, 0, 0);">[16]PETSC ERROR: The line numbers in the error traceback are not always exact.</span></div>
<div class="ContentPasted0"><span style="font-family: Times, "Times New Roman", serif; color: rgb(0, 0, 0);">[16]PETSC ERROR: #1 Hypre solve</span></div>
<div class="ContentPasted0"><span style="font-family: Times, "Times New Roman", serif; color: rgb(0, 0, 0);">[16]PETSC ERROR: #2 PCApply_HYPRE() at /home/pmosx/Libraries/petsc/src/ksp/pc/impls/hypre/hypre.c:451</span></div>
<div class="ContentPasted0"><span style="font-family: Times, "Times New Roman", serif; color: rgb(0, 0, 0);">[16]PETSC ERROR: #3 PCApply() at /home/pmosx/Libraries/petsc/src/ksp/pc/interface/precon.c:486</span></div>
<div class="ContentPasted0"><span style="font-family: Times, "Times New Roman", serif; color: rgb(0, 0, 0);">[16]PETSC ERROR: #4 PCApplyBAorAB() at /home/pmosx/Libraries/petsc/src/ksp/pc/interface/precon.c:756</span></div>
<div class="ContentPasted0"><span style="font-family: Times, "Times New Roman", serif; color: rgb(0, 0, 0);">[16]PETSC ERROR: #5 KSP_PCApplyBAorAB() at /home/pmosx/Libraries/petsc/include/petsc/private/kspimpl.h:443</span></div>
<div class="ContentPasted0"><span style="font-family: Times, "Times New Roman", serif; color: rgb(0, 0, 0);">[16]PETSC ERROR: #6 KSPGMRESCycle() at /home/pmosx/Libraries/petsc/src/ksp/ksp/impls/gmres/gmres.c:146</span></div>
<div class="ContentPasted0"><span style="font-family: Times, "Times New Roman", serif; color: rgb(0, 0, 0);">[16]PETSC ERROR: #7 KSPSolve_GMRES() at /home/pmosx/Libraries/petsc/src/ksp/ksp/impls/gmres/gmres.c:227</span></div>
<div class="ContentPasted0"><span style="font-family: Times, "Times New Roman", serif; color: rgb(0, 0, 0);">[16]PETSC ERROR: #8 KSPSolve_Private() at /home/pmosx/Libraries/petsc/src/ksp/ksp/interface/itfunc.c:910</span></div>
<div class="ContentPasted0"><span style="font-family: Times, "Times New Roman", serif; color: rgb(0, 0, 0);">[16]PETSC ERROR: #9 KSPSolve() at /home/pmosx/Libraries/petsc/src/ksp/ksp/interface/itfunc.c:1082</span></div>
<div class="ContentPasted0"><br>
</div>
<div class="ContentPasted0"><span style="font-family: Times, "Times New Roman", serif; color: rgb(0, 0, 0);">On the same time, I use valgrind and when the program stops, it reports the following:
</span><br>
</div>
<div class="ContentPasted0 ContentPasted1"><span style="font-family: Times, "Times New Roman", serif; color: rgb(0, 0, 0);">==1261647== Invalid read of size 8</span>
<div class="ContentPasted1"><span style="font-family: Times, "Times New Roman", serif; color: rgb(0, 0, 0);">==1261647== at 0x4841C74: _intel_fast_memcpy (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)</span></div>
<div class="ContentPasted1"><span style="font-family: Times, "Times New Roman", serif; color: rgb(0, 0, 0);">==1261647== by 0x16231F73: hypre_GaussElimSolve (in /home/pmosx/Libraries/PETSC_INS_DIR_INTELDebug/lib/libHYPRE-2.29.0.so)</span></div>
<div class="ContentPasted1"><span style="font-family: Times, "Times New Roman", serif; color: rgb(0, 0, 0);">==1261647== by 0x1622DB4F: hypre_BoomerAMGCycle (in /home/pmosx/Libraries/PETSC_INS_DIR_INTELDebug/lib/libHYPRE-2.29.0.so)</span></div>
<div class="ContentPasted1"><span style="font-family: Times, "Times New Roman", serif; color: rgb(0, 0, 0);">==1261647== by 0x1620002E: hypre_BoomerAMGSolve (in /home/pmosx/Libraries/PETSC_INS_DIR_INTELDebug/lib/libHYPRE-2.29.0.so)</span></div>
<div class="ContentPasted1"><span style="font-family: Times, "Times New Roman", serif; color: rgb(0, 0, 0);">==1261647== by 0x12B6F8F8: PCApply_HYPRE (in /home/pmosx/Libraries/PETSC_INS_DIR_INTELDebug/lib/libpetsc.so.3.20.1)</span></div>
<div class="ContentPasted1"><span style="font-family: Times, "Times New Roman", serif; color: rgb(0, 0, 0);">==1261647== by 0x12C38785: PCApply (in /home/pmosx/Libraries/PETSC_INS_DIR_INTELDebug/lib/libpetsc.so.3.20.1)</span></div>
<div class="ContentPasted1"><span style="font-family: Times, "Times New Roman", serif; color: rgb(0, 0, 0);">==1261647== by 0x12C36A39: PCApplyBAorAB (in /home/pmosx/Libraries/PETSC_INS_DIR_INTELDebug/lib/libpetsc.so.3.20.1)</span></div>
<div class="ContentPasted1"><span style="font-family: Times, "Times New Roman", serif; color: rgb(0, 0, 0);">==1261647== by 0x126299E1: KSPGMRESCycle (in /home/pmosx/Libraries/PETSC_INS_DIR_INTELDebug/lib/libpetsc.so.3.20.1)</span></div>
<div class="ContentPasted1"><span style="font-family: Times, "Times New Roman", serif; color: rgb(0, 0, 0);">==1261647== by 0x12628051: KSPSolve_GMRES (in /home/pmosx/Libraries/PETSC_INS_DIR_INTELDebug/lib/libpetsc.so.3.20.1)</span></div>
<div class="ContentPasted1"><span style="font-family: Times, "Times New Roman", serif; color: rgb(0, 0, 0);">==1261647== by 0x127A532E: KSPSolve_Private (in /home/pmosx/Libraries/PETSC_INS_DIR_INTELDebug/lib/libpetsc.so.3.20.1)</span></div>
<div class="ContentPasted1"><span style="font-family: Times, "Times New Roman", serif; color: rgb(0, 0, 0);">==1261647== by 0x127A3C8A: KSPSolve (in /home/pmosx/Libraries/PETSC_INS_DIR_INTELDebug/lib/libpetsc.so.3.20.1)</span></div>
<div class="ContentPasted1"><span style="font-family: Times, "Times New Roman", serif; color: rgb(0, 0, 0);">==1261647== by 0x12C50AF1: kspsolve_ (in /home/pmosx/Libraries/PETSC_INS_DIR_INTELDebug/lib/libpetsc.so.3.20.1)</span></div>
<div class="ContentPasted1"><span style="font-family: Times, "Times New Roman", serif; color: rgb(0, 0, 0);">==1261647== Address 0x0 is not stack'd, malloc'd or (recently) free'd</span></div>
<div class="ContentPasted1"><span style="font-family: Times, "Times New Roman", serif; color: rgb(0, 0, 0);">==1261647==</span></div>
<div class="ContentPasted1"><br>
</div>
</div>
<div class="ContentPasted0 ContentPasted1 ContentPasted2"><span style="font-family: Times, "Times New Roman", serif; font-size: 12pt; color: rgb(0, 0, 0);">This is indeed a very peculiar error. I cannot understand why it happens. In our solution procedure,
we split the equations and we solve them segregated. I create two different ksp (1_ksp and 2_ksp) using
</span><span style="font-family: Times, "Times New Roman", serif; font-size: 12pt; color: rgb(0, 0, 0);">KSPSetOptionsPrefix. Might this choice create a confusion and results in this error?
<br>
</span></div>
<br>
<div class="ContentPasted0 ContentPasted1 ContentPasted2"><span style="font-family: Times, "Times New Roman", serif; font-size: 12pt; color: rgb(0, 0, 0);">Any help is much appreciated.
</span><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><br>
</span></div>
<div class="ContentPasted0 ContentPasted1 ContentPasted2"><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><br>
</span></div>
<div class="ContentPasted0 ContentPasted1 ContentPasted2"><span style="font-family: Times, "Times New Roman", serif; font-size: 12pt; color: rgb(0, 0, 0);">Pantelis
</span><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><br>
</span></div>
</div>
</body>
</html>