<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: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi Chris,</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Can you try to dump the value of <code>*comm</code> at the assertion? I suspect the value is corrupted and it results in a wrong comm handle passed to
<code>MPI_Comm_free. </code></div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hui</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Chris Hewson via discuss <discuss@mpich.org><br>
<b>Sent:</b> Wednesday, June 18, 2025 1:41 PM<br>
<b>To:</b> discuss@mpich.org <discuss@mpich.org><br>
<b>Cc:</b> Chris Hewson <chris@resfrac.com><br>
<b>Subject:</b> [mpich-discuss] Assertion Failure</font>
<div> </div>
</div>
<style>
<!--
#x_pfptBannerudmcxi4
{display:block!important;
visibility:visible!important;
opacity:1!important;
background-color:#D0D8DC!important;
max-width:none!important;
max-height:none!important}
-->
</style>
<div>
<div style="display:none!important; display:none; visibility:hidden; font-size:1px; color:#ffffff; line-height:1px; height:0px; max-height:0px; opacity:0; overflow:hidden">
Hi All, I am having a consistent issue when using mpich with petsc. When calling another external library (mkl's pardiso), I will get the following assertion failure: Assertion failed in file src/binding/c/c_binding. c at line 29448: ((*comm)&(0x03ffffff))</div>
<div style="display:none!important; display:none; visibility:hidden; font-size:1px; color:#ffffff; line-height:1px; max-height:0px; opacity:0; overflow:hidden">
ZjQcmQRYFpfptBannerStart</div>
<div dir="ltr" id="x_pfptBannerudmcxi4" style="display:block!important; text-align:left!important; margin:16px 0px 16px 0px!important; padding:8px 16px 8px 16px!important; border-radius:4px!important; min-width:200px!important; background-color:#D0D8DC!important; background-color:#D0D8DC; border-top:4px solid #90a4ae!important; border-top:4px solid #90a4ae">
<div id="x_pfptBannerudmcxi4" style="float:left!important; display:block!important; margin:0px 0px 1px 0px!important; max-width:600px!important">
<div id="x_pfptBannerudmcxi4" style="display:block!important; visibility:visible!important; background-color:#D0D8DC!important; color:#000000!important; color:#000000; font-family:'Arial',sans-serif!important; font-family:'Arial',sans-serif; font-weight:bold!important; font-weight:bold; font-size:14px!important; line-height:18px!important; line-height:18px">
This Message Is From an External Sender </div>
<div id="x_pfptBannerudmcxi4" style="display:block!important; visibility:visible!important; background-color:#D0D8DC!important; color:#000000!important; color:#000000; font-weight:normal; font-family:'Arial',sans-serif!important; font-family:'Arial',sans-serif; font-size:12px!important; line-height:18px!important; line-height:18px; margin-top:2px!important">
This message came from outside your organization. </div>
</div>
<div style="clear:both!important; display:block!important; visibility:hidden!important; line-height:0!important; font-size:0.01px!important; height:0px">
</div>
</div>
<div style="display:none!important; display:none; visibility:hidden; font-size:1px; color:#ffffff; line-height:1px; max-height:0px; opacity:0; overflow:hidden">
ZjQcmQRYFpfptBannerEnd</div>
<div dir="ltr">
<div>
<div>Hi All,</div>
<div><br>
</div>
<div>I am having a consistent issue when using mpich with petsc. When calling another external library (mkl's pardiso), I will get the following assertion failure:</div>
<div><br>
</div>
<div>Assertion failed in file src/binding/c/c_binding.c at line 29448: ((*comm)&(0x03ffffff)) < MPIR_COMM_N_BUILTIN</div>
<div><br>
</div>
<div>I'm not really too sure why, if I turn assertions off in mpich, the program will seg fault later on. Stack trace for this looks like this:</div>
<div><br>
</div>
<div>Assertion failed in file src/binding/c/c_binding.c at line 29448: ((*comm)&(0x03ffffff)) < MPIR_COMM_N_BUILTIN<br>
resfrac73bfaea(+0x1e992e0) [0x55b9357d52e0]<br>
resfrac73bfaea(+0x1e07ca8) [0x55b935743ca8]<br>
resfrac73bfaea(PMPI_Comm_free+0x580) [0x55b935642570]<br>
resfrac73bfaea(MKLMPI_Comm_free+0x38) [0x55b9385830f8]<br>
resfrac73bfaea(mkl_pds_lp64_reduce_rhs_real+0x4aa) [0x55b938edc2aa]<br>
resfrac73bfaea(mkl_pds_lp64_slv_omp_real+0x1c46) [0x55b93869a4c6]<br>
resfrac73bfaea(mkl_pds_lp64_solve_slave+0xd84) [0x55b935ba8514]<br>
resfrac73bfaea(mkl_pds_lp64_cluster_sparse_solver+0xec4) [0x55b935ba4b74]<br>
resfrac73bfaea(+0xdef3de) [0x55b93472b3de]<br>
resfrac73bfaea(MatSolve+0x521) [0x55b9349f17ef]<br>
resfrac73bfaea(+0x1a29db7) [0x55b935365db7]<br>
resfrac73bfaea(PCApply+0x73c) [0x55b934c53065]<br>
resfrac73bfaea(+0x19ee12d) [0x55b93532a12d]<br>
resfrac73bfaea(+0x115a74c) [0x55b934a9674c]<br>
resfrac73bfaea(KSPSolve+0x1b) [0x55b934a98d04]<br>
resfrac73bfaea(_ZN11nextstim_ns18PetscSolveParallelERNS_17SystemOfEquationsE+0x28b7) [0x55b934046767]<br>
resfrac73bfaea(_ZN11nextstim_ns21SlavePoolWaitAndSolveEv+0x5c7) [0x55b9341d5037]<br>
resfrac73bfaea(main+0x5db) [0x55b933eb292b]<br>
/lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x7f14c99d5d90]<br>
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x7f14c99d5e40]<br>
resfrac73bfaea(_start+0x25) [0x55b933ecb0d5]</div>
<div><br>
</div>
<div>The mpich configuration and version that we're using:</div>
<div>MPICH Version: 4.3.0<br>
MPICH Release date: Mon Feb 3 09:09:47 AM CST 2025<br>
MPICH ABI: 17:0:5<br>
MPICH Device: ch3:sock<br>
MPICH configure: --prefix=/opt/anl/petsc-3.23.2 MAKE=/usr/bin/make --libdir=/opt/anl/petsc-3.23.2/lib CC=gcc CFLAGS=-fPIC -Wno-lto-type-mismatch -Wno-stringop-overflow -O0 AR=/usr/bin/ar ARFLAGS=cr CXX=g++ CXXFLAGS=-Wno-lto-type-mismatch -Wno-psabi -O0 -std=gnu++20
FFLAGS=-ffree-line-length-none -ffree-line-length-0 -Wno-lto-type-mismatch -O0 -fallow-argument-mismatch FC=gfortran F77=gfortran FCFLAGS=-ffree-line-length-none -ffree-line-length-0 -Wno-lto-type-mismatch -O0 -fallow-argument-mismatch --disable-shared --with-pm=hydra
--disable-java --with-hwloc=embedded --enable-fast=no --enable-error-messages=all --with-device=ch3:sock --enable-g=meminit,dbg PYTHON=/opt/intel/oneapi/intelpython/python3.12/bin/python3 --disable-maintainer-mode --disable-dependency-tracking<br>
MPICH CC: gcc -fPIC -Wno-lto-type-mismatch -Wno-stringop-overflow -O0 -g -O0<br>
MPICH CXX: g++ -Wno-lto-type-mismatch -Wno-psabi -O0 -std=gnu++20 -g -O0<br>
MPICH F77: gfortran -ffree-line-length-none -ffree-line-length-0 -Wno-lto-type-mismatch -O0 -fallow-argument-mismatch -g -O0<br>
MPICH FC: gfortran -ffree-line-length-none -ffree-line-length-0 -Wno-lto-type-mismatch -O0 -fallow-argument-mismatch -g -O0<br>
</div>
<div><br>
</div>
<div>Any information or help on this would be greatly appreciated.</div>
</div>
<div>
<div dir="ltr" class="x_gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr"><b><br>
</b></div>
<div dir="ltr"><b>Chris Hewson</b>
<div>Senior Reservoir Simulation Engineer</div>
<div>ResFrac</div>
<div>+1.587.575.9792</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>