[petsc-users] MatDestroy problem with multiple matrices and SUPERLU_DIST

Deij-van Rijswijk, Menno M.Deij at marin.nl
Wed Apr 21 08:06:17 CDT 2021


Good afternoon,

In our code we're using two matrices that are preconditioned using SUPERLU_dist. Upon freeing the second matrix with MatDestroy, the program segfaults with the following stacktrace (see below). This happens with PETSc versions 3.14.5 and 3.15.0, whereas version 3.11.2 does not have this problem. In the code src\mat\impls\aij\mpi\superlu_dist\superlu_dist.c I see that Petsc_Superlu_dist_keyval_Delete_Fn has been added between 3.11.2 and 3.14.5, and the comment reads that it allows reusing the communicator when only a single matrix is used at the time. I'm wondering if using multiple matrices with SUPERLU_dist is problematic here?

Note: this is happening on single process and on multiple MPI processes.

Best regards,


Menno Deij - van Rijswijk



#0  0x000015554ffc7db4 in ompi_comm_free () from /home/mdeij/install-gnu/extLibs/lib/libmpi.so.40
#1  0x0000155550021536 in PMPI_Comm_free () from /home/mdeij/install-gnu/extLibs/lib/libmpi.so.40
#2  0x00001555534262ba in superlu_gridexit (grid=0x3689da0)
    at /home/mdeij/install-gnu/extLibs/Linux-x86_64-Intel/superlu_dist-6.3.0/SRC/superlu_grid.c:174
#3  0x0000155553df094b in Petsc_Superlu_dist_keyval_Delete_Fn (comm=0x26a4e50, keyval=16, attr_val=0x3689d90,
    extra_state=0x0)
    at /home/mdeij/build-libs-gnu/superbuild/petsc/src/src/mat/impls/aij/mpi/superlu_dist/superlu_dist.c:97
#4  0x000015554ffc145c in ompi_attr_delete_impl () from /home/mdeij/install-gnu/extLibs/lib/libmpi.so.40
#5  0x000015554ffc3fdf in ompi_attr_delete_all () from /home/mdeij/install-gnu/extLibs/lib/libmpi.so.40
#6  0x000015554ffc7ca7 in ompi_comm_free () from /home/mdeij/install-gnu/extLibs/lib/libmpi.so.40
#7  0x0000155550021536 in PMPI_Comm_free () from /home/mdeij/install-gnu/extLibs/lib/libmpi.so.40
#8  0x00001555538f31c5 in PetscCommDestroy (comm=0x29712e0)
    at /home/mdeij/build-libs-gnu/superbuild/petsc/src/src/sys/objects/tagm.c:217
#9  0x00001555538f55ab in PetscHeaderDestroy_Private (h=0x29712a0)
    at /home/mdeij/build-libs-gnu/superbuild/petsc/src/src/sys/objects/inherit.c:121
#10 0x0000155553b44626 in MatDestroy (A=0x26e1c98)
    at /home/mdeij/build-libs-gnu/superbuild/petsc/src/src/mat/interface/matrix.c:1310
#11 0x0000155553b87a86 in matdestroy_ (x=0x26e1c98, ierr=0x7fffffffc9cc)


dr. ir. Menno A. Deij-van Rijswijk | Researcher | Research & Development
MARIN | T +31 317 49 35 06 | M.Deij at marin.nl<mailto:M.Deij at marin.nl> | www.marin.nl<http://www.marin.nl>

[LinkedIn]<https://www.linkedin.com/company/marin> [YouTube] <http://www.youtube.com/marinmultimedia>  [Twitter] <https://twitter.com/MARIN_nieuws>  [Facebook] <https://www.facebook.com/marin.wageningen>
MARIN news: IWSA Open letter release for shipping decarbonisation<https://www.marin.nl/news/iwsa-open-letter-release-for-shipping-decarbonisation>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210421/9f219f38/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image350854.PNG
Type: image/png
Size: 293 bytes
Desc: image350854.PNG
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210421/9f219f38/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image623ac8.PNG
Type: image/png
Size: 331 bytes
Desc: image623ac8.PNG
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210421/9f219f38/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image6c0411.PNG
Type: image/png
Size: 333 bytes
Desc: image6c0411.PNG
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210421/9f219f38/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: imagea99443.PNG
Type: image/png
Size: 253 bytes
Desc: imagea99443.PNG
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210421/9f219f38/attachment-0003.png>


More information about the petsc-users mailing list