[petsc-users] Error of MatMPIAIJSetPreallocation
Barry Smith
bsmith at petsc.dev
Thu Jan 14 17:40:11 CST 2021
A merge request to catch more cases of integer overflow https://gitlab.com/petsc/petsc/-/merge_requests/3562
> On Jan 14, 2021, at 5:18 PM, Barry Smith <bsmith at petsc.dev> wrote:
>
>
> These giant sizes are sometime an indication of integer overflow. Did you previously build PETSc with the --with-64-bit-indices ? Are you sure the d_nnz and o_nnz arguments are correct and not too large?
>
> Barry
>
>
>
>> On Jan 14, 2021, at 4:13 PM, Matthew Knepley <knepley at gmail.com <mailto:knepley at gmail.com>> wrote:
>>
>> On Thu, Jan 14, 2021 at 4:38 PM Qin Lu <lu_qin_2000 at yahoo.com <mailto:lu_qin_2000 at yahoo.com>> wrote:
>> Hi Matthew,
>>
>> Thanks for your response! Does CHKERRQ work for FORTRAN-90?
>>
>> Yes, see the examples.
>>
>> I linked my program with debug version of Petsc lib and got more error messages as attached below. I only used 8 processes, but the message said a big number, as well as a huge memory size, which must be wrong since the problem size is not very big. Does this mean the non-zero sizes passed to the subroutine are not correct?
>>
>> Yes, the sizes passed are too large.
>>
>> Thanks,
>>
>> Matt
>>
>> Thanks,
>> Qin
>>
>> ==== error messages =====
>> [2]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------
>>
>> [2]PETSC ERROR: Out of memory. This could be due to allocating
>>
>> [2]PETSC ERROR: too large an object or bleeding by not properly
>>
>> [2]PETSC ERROR: destroying unneeded objects.
>>
>> [2]PETSC ERROR: Memory allocated 0 Memory used by process 2049617920 <tel:2049617920>
>> [2]PETSC ERROR: Try running with -malloc_dump or -malloc_view for info.
>>
>> [2]PETSC ERROR: Memory requested 18446744073458206720
>>
>> [2]PETSC ERROR: See https://www.mcs.anl.gov/petsc/documentation/faq.html <https://www.mcs.anl.gov/petsc/documentation/faq.html> for trouble shooting.
>>
>> [2]PETSC ERROR: Petsc Release Version 3.12.5, Mar, 29, 2020
>>
>>
>>
>> Sent from Yahoo Mail for iPhone <https://overview.mail.yahoo.com/?.src=iOS>
>>
>> On Thursday, January 14, 2021, 2:30 PM, Matthew Knepley <knepley at gmail.com <mailto:knepley at gmail.com>> wrote:
>>
>> On Thu, Jan 14, 2021 at 11:58 AM Qin Lu via petsc-users <petsc-users at mcs.anl.gov <mailto:petsc-users at mcs.anl.gov>> wrote:
>> Hello,
>>
>> My program got error 55 from calling MatMPIAIJSetPreallocation with Petsc version 3.12.5, what does this error mean? Interestingly, the same program using an older version 3.4.2 works fine. I did make necessary interface change in my program when I upgraded to 3.12.5.
>>
>> 1) You should always call CHKERRQ(ierr) after a Petsc call. Then you will get the full error message and stack to send in.
>>
>> 2) Your error code is here:
>>
>> https://gitlab.com/petsc/petsc/-/blob/v3.12.5/include/petscerror.h#L17 <https://gitlab.com/petsc/petsc/-/blob/v3.12.5/include/petscerror.h#L17>
>>
>> 3) It is a memory error. You asked for more memory than your machine could allocate.
>>
>> Thanks,
>>
>> Matt
>>
>> Thanks in advance for your help.
>>
>> Regards,
>> Qin
>>
>>
>> --
>> What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
>> -- Norbert Wiener
>>
>> https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
>>
>>
>>
>> --
>> What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
>> -- Norbert Wiener
>>
>> https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210114/8ba420d5/attachment.html>
More information about the petsc-users
mailing list