<head><!-- BaNnErBlUrFlE-HeAdEr-start -->
<style>
#pfptBannersaquwud { all: revert !important; display: block !important;
visibility: visible !important; opacity: 1 !important;
background-color: #D0D8DC !important;
max-width: none !important; max-height: none !important }
.pfptPrimaryButtonsaquwud:hover, .pfptPrimaryButtonsaquwud:focus {
background-color: #b4c1c7 !important; }
.pfptPrimaryButtonsaquwud:active {
background-color: #90a4ae !important; }
</style>
<!-- BaNnErBlUrFlE-HeAdEr-end -->
</head><!-- BaNnErBlUrFlE-BoDy-start -->
<!-- Preheader Text : BEGIN -->
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;">
How big is your matrix? On Thu, Jul 18, 2024 at 4: 53 PM neil liu <liufield@ gmail. com> wrote: Dear Pestc team, I am trying to solve a complex linear system by Petsc KSP. When I committed out this piece code, no errors came out. Will my
</div>
<!-- Preheader Text : END -->
<!-- Email Banner : BEGIN -->
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;">ZjQcmQRYFpfptBannerStart</div>
<!--[if ((ie)|(mso))]>
<table border="0" cellspacing="0" cellpadding="0" width="100%" style="padding: 16px 0px 16px 0px; direction: ltr" ><tr><td>
<table border="0" cellspacing="0" cellpadding="0" style="padding: 0px 10px 5px 6px; width: 100%; border-radius:4px; border-top:4px solid #90a4ae;background-color:#D0D8DC;"><tr><td valign="top">
<table align="left" border="0" cellspacing="0" cellpadding="0" style="padding: 4px 8px 4px 8px">
<tr><td style="color:#000000; font-family: 'Arial', sans-serif; font-weight:bold; font-size:14px; direction: ltr">
This Message Is From an External Sender
</td></tr>
<tr><td style="color:#000000; font-weight:normal; font-family: 'Arial', sans-serif; font-size:12px; direction: ltr">
This message came from outside your organization.
</td></tr>
</table>
</td></tr></table>
</td></tr></table>
<![endif]-->
<![if !((ie)|(mso))]>
<div dir="ltr" id="pfptBannersaquwud" style="all: revert !important; 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="pfptBannersaquwud" style="all: unset !important; float:left !important; display:block !important; margin: 0px 0px 1px 0px !important; max-width: 600px !important;">
<div id="pfptBannersaquwud" style="all: unset !important; 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="pfptBannersaquwud" style="all: unset !important; 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>
<![endif]>
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;">ZjQcmQRYFpfptBannerEnd</div>
<!-- Email Banner : END -->
<!-- BaNnErBlUrFlE-BoDy-end -->
<div dir="ltr">How big is your matrix?</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 18, 2024 at 4:53 PM neil liu <<a href="mailto:liufield@gmail.com">liufield@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg-8116173276348038952">
<div style="font-size:1px;color:rgb(255,255,255);line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;display:none">
Dear Pestc team, I am trying to solve a complex linear system by Petsc KSP. When I committed out this piece code, no errors came out. Will my coding part affect ksp? I am using a direct solver, -pc_type LU. PetscErrorCode ElementInfo: : solveLinearSystem(
</div>
<div style="font-size:1px;color:rgb(255,255,255);line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;display:none">ZjQcmQRYFpfptBannerStart</div>
<u></u>
<div dir="ltr" id="m_-8116173276348038952pfptBanner798y335" style="display:block;text-align:left;margin:16px 0px;padding:8px 16px;border-radius:4px;min-width:200px;background-color:rgb(208,216,220);border-top:4px solid rgb(144,164,174)">
<div id="m_-8116173276348038952pfptBanner798y335" style="float:left;display:block;margin:0px 0px 1px;max-width:600px">
<div id="m_-8116173276348038952pfptBanner798y335" style="display:block;background-color:rgb(208,216,220);color:rgb(0,0,0);font-family:Arial,sans-serif;font-weight:bold;font-size:14px;line-height:18px">
This Message Is From an External Sender
</div>
<div id="m_-8116173276348038952pfptBanner798y335" style="font-weight:normal;display:block;background-color:rgb(208,216,220);color:rgb(0,0,0);font-family:Arial,sans-serif;font-size:12px;line-height:18px;margin-top:2px">
This message came from outside your organization.
</div>
</div>
<div style="height:0px;clear:both;display:block;line-height:0;font-size:0.01px"> </div>
</div>
<u></u>
<div style="font-size:1px;color:rgb(255,255,255);line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;display:none">ZjQcmQRYFpfptBannerEnd</div>
<div dir="ltr">Dear Pestc team,<div><br></div><div>I am trying to solve a complex linear system by Petsc KSP. When I committed out this piece code, no errors came out. Will my coding part affect ksp? I am using a direct solver, -pc_type LU. </div><div><br></div><div><b>PetscErrorCode ElementInfo::solveLinearSystem( ){ </b></div><div><b>PetscFunctionBegin; </b></div><div><b>KSP ksp; </b></div><div><b>KSPCreate(PETSC_COMM_WORLD, &ksp); </b></div><div><b>KSPSetType(ksp, KSPFGMRES); </b></div><div><b>KSPSetOperators(ksp, A, A); </b></div><div><b>KSPSetFromOptions(ksp); KSPSolve(ksp, b, x); </b></div><div><b>KSPDestroy(&ksp); </b></div><div><b>PetscFunctionReturn(PETSC_SUCCESS);</b></div><div><b> }</b><span><br></span></div><div><br></div><div><span>The output with -malloc_test and -malloc_view is attached. It shows the following </span>errors,</div><div><b>Line 5
in the attached file
</b></div>[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------<br>[0]PETSC ERROR: Out of memory. This could be due to allocating<br>[0]PETSC ERROR: too large an object or bleeding by not properly<br>[0]PETSC ERROR: destroying unneeded objects.<br><div>[0] Maximum memory PetscMalloc()ed 19474398848 maximum size of entire process 740352000 (<b><i>This only used 20% of my 64Gb memory .</i></b>)</div><div><span> <b>Line 111 in the attached file</b></span></div><div>[0]PETSC ERROR: Memory requested <b>18446744069642786816 </b>
(<b><i>This is too big.)</i></b><br>[0]PETSC ERROR: See <a href="https://urldefense.us/v3/__https://petsc.org/release/faq/__;!!G_uCfscf7eWS!ccZ34UzQhUBbNR8XsOs-FZm2yIW4bzLaYbGGphZTOcDpU5XZNTG_3iagHL_C6Z_e84LvVq04MoQToMzMYfU72jU$" target="_blank">https://petsc.org/release/faq/</a> for trouble shooting.<br>[0]PETSC ERROR: Petsc Release Version 3.21.1, unknown<br>[0]PETSC ERROR: ./app on a arch-linux-c-debug named <a href="https://urldefense.us/v3/__http://kirin.remcominc.com/__;!!G_uCfscf7eWS!ccZ34UzQhUBbNR8XsOs-FZm2yIW4bzLaYbGGphZTOcDpU5XZNTG_3iagHL_C6Z_e84LvVq04MoQToMzM1VQhXLw$" target="_blank">kirin.remcominc.com</a> by xiaodong.liu Thu Jul 18 16:11:52 2024<br>[0]PETSC ERROR: Configure options --with-cc=gcc --with-fc=gfortran --with-cxx=g++ --download-fblaslapack --download-mpich --with-scalar-type=complex --download-triangle<br>[0]PETSC ERROR: #1 PetscMallocAlign() at /home/xiaod<br></div></div>
</div></blockquote></div>