<head><!-- BaNnErBlUrFlE-HeAdEr-start -->
<style>
#pfptBannertd4wrba { all: revert !important; display: block !important;
visibility: visible !important; opacity: 1 !important;
background-color: #D0D8DC !important;
max-width: none !important; max-height: none !important }
.pfptPrimaryButtontd4wrba:hover, .pfptPrimaryButtontd4wrba:focus {
background-color: #b4c1c7 !important; }
.pfptPrimaryButtontd4wrba: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;">
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>
<!-- 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="pfptBannertd4wrba" 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="pfptBannertd4wrba" style="all: unset !important; float:left !important; display:block !important; margin: 0px 0px 1px 0px !important; max-width: 600px !important;">
<div id="pfptBannertd4wrba" 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="pfptBannertd4wrba" 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">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 style="white-space-collapse: preserve;"><br></span></div><div><br></div><div><span style="white-space-collapse: preserve;">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 style="white-space-collapse: preserve;"> <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!ewaycO7hltMdcVaaqzKPkHOnR0ZWqvS6IBWoUl2SPh2YM875bucnoBPzOb64iTZFmHL94VlaV3i5LEim3RbpQg$" 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!ewaycO7hltMdcVaaqzKPkHOnR0ZWqvS6IBWoUl2SPh2YM875bucnoBPzOb64iTZFmHL94VlaV3i5LEgCCaywpQ$" 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>