It turns out some values in d_nnz were wrong. The program runs fine after I 
fixed the issue. 
Thank you all for your help!
Regards,Qin


Sent from Yahoo Mail for iPhone


On Thursday, January 14, 2021, 5:40 PM, Barry Smith <[email protected]> wrote:


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 <[email protected]> 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 <[email protected]> wrote:
On Thu, Jan 14, 2021 at 4:38 PM Qin Lu <[email protected]> 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

[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 for 
trouble shooting.

[2]PETSC ERROR: Petsc Release Version 3.12.5, Mar, 29, 2020


Sent from Yahoo Mail for iPhone


On Thursday, January 14, 2021, 2:30 PM, Matthew Knepley <[email protected]> 
wrote:

On Thu, Jan 14, 2021 at 11:58 AM Qin Lu via petsc-users 
<[email protected]> 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
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/






-- 
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/






Reply via email to