<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Oct 23, 2016 at 3:56 PM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Thanks Satish,<br>
<br>
I have fixed this in barry/fix-<wbr>matmpixxxsetpreallocation-<wbr>reentrant (in next for testing)<br>
<br>
Fande,<br>
<br>
This will also make MatMPIAIJSetPreallocation() work properly with multiple calls (you will not need a MatReset()).<br>
<br>
Barry<br></blockquote><div><br></div><div>Thanks, Barry.<br><br></div><div>Fande,<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
> On Oct 21, 2016, at 6:48 PM, Satish Balay <<a href="mailto:balay@mcs.anl.gov">balay@mcs.anl.gov</a>> wrote:<br>
><br>
> On Fri, 21 Oct 2016, Barry Smith wrote:<br>
><br>
>><br>
>> valgrind first<br>
><br>
> balay@asterix /home/balay/download-pine/x/<wbr>superlu_dist_test<br>
> $ mpiexec -n 2 $VG ./ex16 -f ~/datafiles/matrices/small<br>
> First MatLoad!<br>
> Mat Object: 2 MPI processes<br>
> type: mpiaij<br>
> row 0: (0, 4.) (1, -1.) (6, -1.)<br>
> row 1: (0, -1.) (1, 4.) (2, -1.) (7, -1.)<br>
> row 2: (1, -1.) (2, 4.) (3, -1.) (8, -1.)<br>
> row 3: (2, -1.) (3, 4.) (4, -1.) (9, -1.)<br>
> row 4: (3, -1.) (4, 4.) (5, -1.) (10, -1.)<br>
> row 5: (4, -1.) (5, 4.) (11, -1.)<br>
> row 6: (0, -1.) (6, 4.) (7, -1.) (12, -1.)<br>
> row 7: (1, -1.) (6, -1.) (7, 4.) (8, -1.) (13, -1.)<br>
> row 8: (2, -1.) (7, -1.) (8, 4.) (9, -1.) (14, -1.)<br>
> row 9: (3, -1.) (8, -1.) (9, 4.) (10, -1.) (15, -1.)<br>
> row 10: (4, -1.) (9, -1.) (10, 4.) (11, -1.) (16, -1.)<br>
> row 11: (5, -1.) (10, -1.) (11, 4.) (17, -1.)<br>
> row 12: (6, -1.) (12, 4.) (13, -1.) (18, -1.)<br>
> row 13: (7, -1.) (12, -1.) (13, 4.) (14, -1.) (19, -1.)<br>
> row 14: (8, -1.) (13, -1.) (14, 4.) (15, -1.) (20, -1.)<br>
> row 15: (9, -1.) (14, -1.) (15, 4.) (16, -1.) (21, -1.)<br>
> row 16: (10, -1.) (15, -1.) (16, 4.) (17, -1.) (22, -1.)<br>
> row 17: (11, -1.) (16, -1.) (17, 4.) (23, -1.)<br>
> row 18: (12, -1.) (18, 4.) (19, -1.) (24, -1.)<br>
> row 19: (13, -1.) (18, -1.) (19, 4.) (20, -1.) (25, -1.)<br>
> row 20: (14, -1.) (19, -1.) (20, 4.) (21, -1.) (26, -1.)<br>
> row 21: (15, -1.) (20, -1.) (21, 4.) (22, -1.) (27, -1.)<br>
> row 22: (16, -1.) (21, -1.) (22, 4.) (23, -1.) (28, -1.)<br>
> row 23: (17, -1.) (22, -1.) (23, 4.) (29, -1.)<br>
> row 24: (18, -1.) (24, 4.) (25, -1.) (30, -1.)<br>
> row 25: (19, -1.) (24, -1.) (25, 4.) (26, -1.) (31, -1.)<br>
> row 26: (20, -1.) (25, -1.) (26, 4.) (27, -1.) (32, -1.)<br>
> row 27: (21, -1.) (26, -1.) (27, 4.) (28, -1.) (33, -1.)<br>
> row 28: (22, -1.) (27, -1.) (28, 4.) (29, -1.) (34, -1.)<br>
> row 29: (23, -1.) (28, -1.) (29, 4.) (35, -1.)<br>
> row 30: (24, -1.) (30, 4.) (31, -1.)<br>
> row 31: (25, -1.) (30, -1.) (31, 4.) (32, -1.)<br>
> row 32: (26, -1.) (31, -1.) (32, 4.) (33, -1.)<br>
> row 33: (27, -1.) (32, -1.) (33, 4.) (34, -1.)<br>
> row 34: (28, -1.) (33, -1.) (34, 4.) (35, -1.)<br>
> row 35: (29, -1.) (34, -1.) (35, 4.)<br>
> Second MatLoad!<br>
> Mat Object: 2 MPI processes<br>
> type: mpiaij<br>
> ==4592== Invalid read of size 4<br>
> ==4592== at 0x5814014: MatView_MPIAIJ_<wbr>ASCIIorDraworSocket (mpiaij.c:1402)<br>
> ==4592== by 0x5814A75: MatView_MPIAIJ (mpiaij.c:1440)<br>
> ==4592== by 0x53373D7: MatView (matrix.c:989)<br>
> ==4592== by 0x40107E: main (ex16.c:30)<br>
> ==4592== Address 0xa47b460 is 20 bytes after a block of size 28 alloc'd<br>
> ==4592== at 0x4C2FF83: memalign (vg_replace_malloc.c:858)<br>
> ==4592== by 0x4FD121A: PetscMallocAlign (mal.c:28)<br>
> ==4592== by 0x5842C70: MatSetUpMultiply_MPIAIJ (mmaij.c:41)<br>
> ==4592== by 0x5809943: MatAssemblyEnd_MPIAIJ (mpiaij.c:747)<br>
> ==4592== by 0x536B299: MatAssemblyEnd (matrix.c:5298)<br>
> ==4592== by 0x5829C05: MatLoad_MPIAIJ (mpiaij.c:3032)<br>
> ==4592== by 0x5337FEA: MatLoad (matrix.c:1101)<br>
> ==4592== by 0x400D9F: main (ex16.c:22)<br>
> ==4592==<br>
> ==4591== Invalid read of size 4<br>
> ==4591== at 0x5814014: MatView_MPIAIJ_<wbr>ASCIIorDraworSocket (mpiaij.c:1402)<br>
> ==4591== by 0x5814A75: MatView_MPIAIJ (mpiaij.c:1440)<br>
> ==4591== by 0x53373D7: MatView (matrix.c:989)<br>
> ==4591== by 0x40107E: main (ex16.c:30)<br>
> ==4591== Address 0xa482958 is 24 bytes before a block of size 7 alloc'd<br>
> ==4591== at 0x4C2FF83: memalign (vg_replace_malloc.c:858)<br>
> ==4591== by 0x4FD121A: PetscMallocAlign (mal.c:28)<br>
> ==4591== by 0x4F31FB5: PetscStrallocpy (str.c:197)<br>
> ==4591== by 0x4F0D3F5: PetscClassRegLogRegister (classlog.c:253)<br>
> ==4591== by 0x4EF96E2: PetscClassIdRegister (plog.c:2053)<br>
> ==4591== by 0x51FA018: VecInitializePackage (dlregisvec.c:165)<br>
> ==4591== by 0x51F6DE9: VecCreate (veccreate.c:35)<br>
> ==4591== by 0x51C49F0: VecCreateSeq (vseqcr.c:37)<br>
> ==4591== by 0x5843191: MatSetUpMultiply_MPIAIJ (mmaij.c:104)<br>
> ==4591== by 0x5809943: MatAssemblyEnd_MPIAIJ (mpiaij.c:747)<br>
> ==4591== by 0x536B299: MatAssemblyEnd (matrix.c:5298)<br>
> ==4591== by 0x5829C05: MatLoad_MPIAIJ (mpiaij.c:3032)<br>
> ==4591== by 0x5337FEA: MatLoad (matrix.c:1101)<br>
> ==4591== by 0x400D9F: main (ex16.c:22)<br>
> ==4591==<br>
> [0]PETSC ERROR: --------------------- Error Message ------------------------------<wbr>------------------------------<wbr>--<br>
> [0]PETSC ERROR: Argument out of range<br>
> [0]PETSC ERROR: Column too large: col 96 max 35<br>
> [0]PETSC ERROR: See <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.mcs.anl.gov_petsc_documentation_faq.html&d=CwIFAg&c=54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=DUUt3SRGI0_JgtNaS3udV68GRkgV4ts7XKfj2opmiCY&m=yCFQeqGFVZhJtXzPwmjejP5oiMeddVxB4a_mxWbQYkA&s=lWoiLmjuyX1M9FCbfQAwkLK2cAGeDvnXO-fMCKllDTE&e=" rel="noreferrer" target="_blank">https://urldefense.proofpoint.<wbr>com/v2/url?u=http-3A__www.mcs.<wbr>anl.gov_petsc_documentation_<wbr>faq.html&d=CwIFAg&c=<wbr>54IZrppPQZKX9mLzcGdPfFD1hxrcB_<wbr>_aEkJFOKJFd00&r=DUUt3SRGI0_<wbr>JgtNaS3udV68GRkgV4ts7XKfj2opmi<wbr>CY&m=<wbr>yCFQeqGFVZhJtXzPwmjejP5oiMeddV<wbr>xB4a_mxWbQYkA&s=<wbr>lWoiLmjuyX1M9FCbfQAwkLK2cAGeDv<wbr>nXO-fMCKllDTE&e=</a> for trouble shooting.<br>
> [0]PETSC ERROR: Petsc Development GIT revision: v3.7.4-1729-g4c4de23 GIT Date: 2016-10-20 22:22:58 +0000<br>
> [0]PETSC ERROR: ./ex16 on a arch-idx64-slu named asterix by balay Fri Oct 21 18:47:51 2016<br>
> [0]PETSC ERROR: Configure options --download-metis --download-parmetis --download-superlu_dist PETSC_ARCH=arch-idx64-slu<br>
> [0]PETSC ERROR: #1 MatSetValues_MPIAIJ() line 585 in /home/balay/petsc/src/mat/<wbr>impls/aij/mpi/mpiaij.c<br>
> [0]PETSC ERROR: #2 MatAssemblyEnd_MPIAIJ() line 724 in /home/balay/petsc/src/mat/<wbr>impls/aij/mpi/mpiaij.c<br>
> [0]PETSC ERROR: #3 MatAssemblyEnd() line 5298 in /home/balay/petsc/src/mat/<wbr>interface/matrix.c<br>
> [0]PETSC ERROR: #4 MatView_MPIAIJ_<wbr>ASCIIorDraworSocket() line 1410 in /home/balay/petsc/src/mat/<wbr>impls/aij/mpi/mpiaij.c<br>
> [0]PETSC ERROR: #5 MatView_MPIAIJ() line 1440 in /home/balay/petsc/src/mat/<wbr>impls/aij/mpi/mpiaij.c<br>
> [0]PETSC ERROR: #6 MatView() line 989 in /home/balay/petsc/src/mat/<wbr>interface/matrix.c<br>
> [0]PETSC ERROR: #7 main() line 30 in /home/balay/download-pine/x/<wbr>superlu_dist_test/ex16.c<br>
> [0]PETSC ERROR: PETSc Option Table entries:<br>
> [0]PETSC ERROR: -display :0.0<br>
> [0]PETSC ERROR: -f /home/balay/datafiles/<wbr>matrices/small<br>
> [0]PETSC ERROR: -malloc_dump<br>
> [0]PETSC ERROR: ----------------End of Error Message -------send entire error message to petsc-maint@mcs.anl.gov-------<wbr>---<br>
> application called MPI_Abort(MPI_COMM_WORLD, 63) - process 0<br>
> [cli_0]: aborting job:<br>
> application called MPI_Abort(MPI_COMM_WORLD, 63) - process 0<br>
> ==4591== 16,965 (2,744 direct, 14,221 indirect) bytes in 1 blocks are definitely lost in loss record 1,014 of 1,016<br>
> ==4591== at 0x4C2FF83: memalign (vg_replace_malloc.c:858)<br>
> ==4591== by 0x4FD121A: PetscMallocAlign (mal.c:28)<br>
> ==4591== by 0x52F3B14: MatCreate (gcreate.c:84)<br>
> ==4591== by 0x581390A: MatView_MPIAIJ_<wbr>ASCIIorDraworSocket (mpiaij.c:1371)<br>
> ==4591== by 0x5814A75: MatView_MPIAIJ (mpiaij.c:1440)<br>
> ==4591== by 0x53373D7: MatView (matrix.c:989)<br>
> ==4591== by 0x40107E: main (ex16.c:30)<br>
> ==4591==<br>
><br>
> ==============================<wbr>==============================<wbr>=======================<br>
> = BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES<br>
> = PID 4591 RUNNING AT asterix<br>
> = EXIT CODE: 63<br>
> = CLEANING UP REMAINING PROCESSES<br>
> = YOU CAN IGNORE THE BELOW CLEANUP MESSAGES<br>
> ==============================<wbr>==============================<wbr>=======================<br>
> balay@asterix /home/balay/download-pine/x/<wbr>superlu_dist_test<br>
> $<br>
<br>
</blockquote></div><br></div></div>