<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:DengXian;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Aptos;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:"\@DengXian";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"Andale Mono";
        panose-1:2 11 5 9 0 0 0 0 0 4;}
@font-face
        {font-family:Menlo;
        panose-1:2 11 6 9 3 8 4 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:10.0pt;
        font-family:"Aptos",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#467886;
        text-decoration:underline;}
p.p1, li.p1, div.p1
        {mso-style-name:p1;
        margin:0in;
        background:black;
        font-size:9.0pt;
        font-family:"Andale Mono";
        color:white;}
p.p2, li.p2, div.p2
        {mso-style-name:p2;
        margin:0in;
        background:black;
        font-size:9.0pt;
        font-family:"Andale Mono";
        color:#B42419;}
span.s1
        {mso-style-name:s1;}
span.apple-converted-space
        {mso-style-name:apple-converted-space;}
span.EmailStyle23
        {mso-style-type:personal-reply;
        font-family:"Aptos",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        mso-ligatures:none;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="#467886" vlink="#96607D" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">I figure that it is most likely related to using VecGetArrayRead/VecRestoreArrayRead in one of the places.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I will update later.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">-Ling<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<div id="mail-editor-reference-message-container">
<div>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">petsc-users <petsc-users-bounces@mcs.anl.gov> on behalf of Zou, Ling via petsc-users <petsc-users@mcs.anl.gov><br>
<b>Date: </b>Monday, January 20, 2025 at 9:27</span><span style="font-size:12.0pt;font-family:"Arial",sans-serif;color:black"> </span><span style="font-size:12.0pt;color:black">AM<br>
<b>To: </b>petsc-users@mcs.anl.gov <petsc-users@mcs.anl.gov><br>
<b>Subject: </b>[petsc-users] Vector 'Vec_0x84000002_0' (argument #1) was locked for read-only access<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">Hi all,</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I updated PETSc to 3.22.1, and now my code run with the following error message.</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Any idea this may happen?</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">In the entire code, VecGetArray() are used in the following places:</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt;background:#1F1F1F"><span style="font-size:9.0pt;font-family:Menlo;color:#569CD6">void</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt;background:#1F1F1F"><span style="font-size:9.0pt;font-family:Menlo;color:#4EC9B0">PETScApp</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">::</span><span style="font-size:9.0pt;font-family:Menlo;color:#DCDCAA">setupPETScIC</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">()</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt;background:#1F1F1F"><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">{</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt;background:#1F1F1F"><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">  PetscScalar
</span><span style="font-size:9.0pt;font-family:Menlo;color:#D4D4D4">*</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">uu;</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt;background:#1F1F1F"><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC"> 
</span><span style="font-size:9.0pt;font-family:Menlo;color:#DCDCAA">VecGetArray</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">(u,
</span><span style="font-size:9.0pt;font-family:Menlo;color:#D4D4D4">&</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">uu);</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt;background:#1F1F1F"><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC"> 
</span><span style="font-size:9.0pt;font-family:Menlo;color:#9CDCFE">_sim</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">-></span><span style="font-size:9.0pt;font-family:Menlo;color:#DCDCAA">setupPETScIC</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">(uu);</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt;background:#1F1F1F"><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC"> 
</span><span style="font-size:9.0pt;font-family:Menlo;color:#DCDCAA">VecRestoreArray</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">(u,
</span><span style="font-size:9.0pt;font-family:Menlo;color:#D4D4D4">&</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">uu);</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt;background:#1F1F1F"><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">}</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt;background:#1F1F1F"><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">PetscErrorCode</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt;background:#1F1F1F"><span style="font-size:9.0pt;font-family:Menlo;color:#DCDCAA">snesFormFunction</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">(SNES</span><span style="font-size:9.0pt;font-family:Menlo;color:#6A9955">
 /*snes*/</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">, Vec u, Vec f,
</span><span style="font-size:9.0pt;font-family:Menlo;color:#569CD6">void</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">
</span><span style="font-size:9.0pt;font-family:Menlo;color:#D4D4D4">*</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC"> appCtx)</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt;background:#1F1F1F"><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">{</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt;background:#1F1F1F"><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">  PETScApp
</span><span style="font-size:9.0pt;font-family:Menlo;color:#D4D4D4">*</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC"> petscApp
</span><span style="font-size:9.0pt;font-family:Menlo;color:#D4D4D4">=</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC"> (PETScApp
</span><span style="font-size:9.0pt;font-family:Menlo;color:#D4D4D4">*</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">)appCtx;</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt;background:#1F1F1F"><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC"> </span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt;background:#1F1F1F"><span style="font-size:9.0pt;font-family:Menlo;color:#6A9955">  // zero out residuals</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt;background:#1F1F1F"><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC"> 
</span><span style="font-size:9.0pt;font-family:Menlo;color:#DCDCAA">VecZeroEntries</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">(</span><span style="font-size:9.0pt;font-family:Menlo;color:#9CDCFE">petscApp</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">-></span><span style="font-size:9.0pt;font-family:Menlo;color:#9CDCFE">res_tran</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">);</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt;background:#1F1F1F"><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC"> 
</span><span style="font-size:9.0pt;font-family:Menlo;color:#DCDCAA">VecZeroEntries</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">(</span><span style="font-size:9.0pt;font-family:Menlo;color:#9CDCFE">petscApp</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">-></span><span style="font-size:9.0pt;font-family:Menlo;color:#9CDCFE">res_spatial</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">);</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt;background:#1F1F1F"><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC"> </span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt;background:#1F1F1F"><span style="font-size:9.0pt;font-family:Menlo;color:#6A9955">  // get vectors</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt;background:#1F1F1F"><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">  PetscScalar
</span><span style="font-size:9.0pt;font-family:Menlo;color:#D4D4D4">*</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">uu,
</span><span style="font-size:9.0pt;font-family:Menlo;color:#D4D4D4">*</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">res_tran,
</span><span style="font-size:9.0pt;font-family:Menlo;color:#D4D4D4">*</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">res_spatial;</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt;background:#1F1F1F"><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC"> 
</span><span style="font-size:9.0pt;font-family:Menlo;color:#DCDCAA">VecGetArray</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">(u,
</span><span style="font-size:9.0pt;font-family:Menlo;color:#D4D4D4">&</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">uu);</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt;background:#1F1F1F"><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC"> 
</span><span style="font-size:9.0pt;font-family:Menlo;color:#DCDCAA">VecGetArray</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">(</span><span style="font-size:9.0pt;font-family:Menlo;color:#9CDCFE">petscApp</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">-></span><span style="font-size:9.0pt;font-family:Menlo;color:#9CDCFE">res_tran</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">,
</span><span style="font-size:9.0pt;font-family:Menlo;color:#D4D4D4">&</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">res_tran);</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt;background:#1F1F1F"><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC"> 
</span><span style="font-size:9.0pt;font-family:Menlo;color:#DCDCAA">VecGetArray</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">(</span><span style="font-size:9.0pt;font-family:Menlo;color:#9CDCFE">petscApp</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">-></span><span style="font-size:9.0pt;font-family:Menlo;color:#9CDCFE">res_spatial</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">,
</span><span style="font-size:9.0pt;font-family:Menlo;color:#D4D4D4">&</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">res_spatial);</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt;background:#1F1F1F"><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC"> </span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt;background:#1F1F1F"><span style="font-size:9.0pt;font-family:Menlo;color:#6A9955">  // use the most updated solution vector to update solution, to compute RHS and transient residuals</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt;background:#1F1F1F"><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC"> 
</span><span style="font-size:9.0pt;font-family:Menlo;color:#9CDCFE">petscApp</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">-></span><span style="font-size:9.0pt;font-family:Menlo;color:#9CDCFE">_sim</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">-></span><span style="font-size:9.0pt;font-family:Menlo;color:#DCDCAA">updateSolutions</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">(uu);</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt;background:#1F1F1F"><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC"> 
</span><span style="font-size:9.0pt;font-family:Menlo;color:#9CDCFE">petscApp</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">-></span><span style="font-size:9.0pt;font-family:Menlo;color:#9CDCFE">_sim</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">-></span><span style="font-size:9.0pt;font-family:Menlo;color:#DCDCAA">updateAuxVariables</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">();</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt;background:#1F1F1F"><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC"> 
</span><span style="font-size:9.0pt;font-family:Menlo;color:#9CDCFE">petscApp</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">-></span><span style="font-size:9.0pt;font-family:Menlo;color:#9CDCFE">_sim</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">-></span><span style="font-size:9.0pt;font-family:Menlo;color:#DCDCAA">computeTranRes</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">(res_tran);</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt;background:#1F1F1F"><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC"> 
</span><span style="font-size:9.0pt;font-family:Menlo;color:#9CDCFE">petscApp</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">-></span><span style="font-size:9.0pt;font-family:Menlo;color:#9CDCFE">_sim</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">-></span><span style="font-size:9.0pt;font-family:Menlo;color:#DCDCAA">computeSpatialRes</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">(res_spatial);</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt;background:#1F1F1F"><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC"> </span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt;background:#1F1F1F"><span style="font-size:9.0pt;font-family:Menlo;color:#6A9955">  // restore vectors</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt;background:#1F1F1F"><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC"> 
</span><span style="font-size:9.0pt;font-family:Menlo;color:#DCDCAA">VecRestoreArray</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">(u,
</span><span style="font-size:9.0pt;font-family:Menlo;color:#D4D4D4">&</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">uu);</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt;background:#1F1F1F"><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC"> 
</span><span style="font-size:9.0pt;font-family:Menlo;color:#DCDCAA">VecRestoreArray</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">(</span><span style="font-size:9.0pt;font-family:Menlo;color:#9CDCFE">petscApp</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">-></span><span style="font-size:9.0pt;font-family:Menlo;color:#9CDCFE">res_tran</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">,
</span><span style="font-size:9.0pt;font-family:Menlo;color:#D4D4D4">&</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">res_tran);</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt;background:#1F1F1F"><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC"> 
</span><span style="font-size:9.0pt;font-family:Menlo;color:#DCDCAA">VecRestoreArray</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">(</span><span style="font-size:9.0pt;font-family:Menlo;color:#9CDCFE">petscApp</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">-></span><span style="font-size:9.0pt;font-family:Menlo;color:#9CDCFE">res_spatial</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">,
</span><span style="font-size:9.0pt;font-family:Menlo;color:#D4D4D4">&</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">res_spatial);</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt;background:#1F1F1F"><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC"> </span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt;background:#1F1F1F"><span style="font-size:9.0pt;font-family:Menlo;color:#6A9955">  // assemble final residuals: f = transient + spatial</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt;background:#1F1F1F"><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC"> 
</span><span style="font-size:9.0pt;font-family:Menlo;color:#DCDCAA">VecWAXPY</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">(f,
</span><span style="font-size:9.0pt;font-family:Menlo;color:#B5CEA8">1.0</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">,
</span><span style="font-size:9.0pt;font-family:Menlo;color:#9CDCFE">petscApp</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">-></span><span style="font-size:9.0pt;font-family:Menlo;color:#9CDCFE">res_tran</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">,
</span><span style="font-size:9.0pt;font-family:Menlo;color:#9CDCFE">petscApp</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">-></span><span style="font-size:9.0pt;font-family:Menlo;color:#9CDCFE">res_spatial</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">);</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt;background:#1F1F1F"><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC"> </span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt;background:#1F1F1F"><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC"> 
</span><span style="font-size:9.0pt;font-family:Menlo;color:#DCDCAA">PetscFunctionReturn</span><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">(PETSC_SUCCESS);</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt;background:#1F1F1F"><span style="font-size:9.0pt;font-family:Menlo;color:#CCCCCC">}</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">PS: PETSc is available provided by moose env.</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">-Ling</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="p1"><span class="s1">Time Step 1, time = 0.1, dt = 0.1</span><o:p></o:p></p>
<p class="p2"><span class="s1">[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------</span><o:p></o:p></p>
<p class="p1"><span class="s1">[0]PETSC ERROR: Object is in wrong state</span><o:p></o:p></p>
<p class="p1"><span class="s1">[0]PETSC ERROR: Vector 'Vec_0x84000002_0' (argument #1) was locked for read-only access in unknown_function() at unknown file:0 (line numbers only accurate to function begin)</span><o:p></o:p></p>
<p class="p1"><span class="s1">[0]PETSC ERROR: WARNING! There are unused option(s) set! Could be the program crashed before usage or a spelling mistake, etc!</span><o:p></o:p></p>
<p class="p1"><span class="s1">[0]PETSC ERROR: </span><span class="apple-converted-space"> 
</span><span class="s1">Option left: name:-i value: tests/hc1d.i source: command line</span><o:p></o:p></p>
<p class="p1"><span class="s1">[0]PETSC ERROR: See <a href="https://urldefense.us/v3/__https:/petsc.org/release/faq/__;!!G_uCfscf7eWS!afeyp9qigjd3lpaTTPGFhRudAAw-yvYL974yeq5bR6xXsoGjkjeuvOHT8IxSXBtbGT-ULg-27kGV3D9K5Mo$">
https://petsc.org/release/faq/</a> for trouble shooting.</span><o:p></o:p></p>
<p class="p1"><span class="s1">[0]PETSC ERROR: Petsc Development GIT revision: unknown</span><span class="apple-converted-space"> 
</span><span class="s1">GIT Date: unknown</span><o:p></o:p></p>
<p class="p1"><span class="s1">[0]PETSC ERROR: ./open_phase-opt with 1 MPI process(es) and PETSC_ARCH</span><span class="apple-converted-space"> 
</span><span class="s1">on CSI365324.local by lingzou Mon Jan 20 09:20:20 2025</span><o:p></o:p></p>
<p class="p1"><span class="s1">[0]PETSC ERROR: Configure options: --with-64-bit-indices --with-cxx-dialect=C++17 --with-debugging=no --with-fortran-bindings=0 --with-mpi=1 --with-openmp=1 --with-strict-petscerrorcode=1 --with-shared-libraries=1 --with-sowing=0
 --download-fblaslapack=1 --download-hpddm=1 --download-hypre=1 --download-metis=1 --download-mumps=1 --download-ptscotch=1 --download-parmetis=1 --download-scalapack=1 --download-slepc=1 --download-strumpack=1 --download-superlu_dist=1 --with-hdf5-dir=/Users/lingzou/miniforge/envs/moose
 --with-make-np=8 --COPTFLAGS=-O3 --CXXOPTFLAGS=-O3 --FOPTFLAGS=-O3 --with-x=0 --with-ssl=0 --with-mpi-dir=/Users/lingzou/miniforge/envs/moose AR=arm64-apple-darwin20.0.0-ar RANLIB=arm64-apple-darwin20.0.0-ranlib CFLAGS="-ftree-vectorize -fPIC -fstack-protector-strong
 -O2 -pipe -isystem /Users/lingzou/miniforge/envs/moose/include -fdebug-prefix-map=/opt/civet0/build_0/_env/conda-bld/moose-mpi_1735973237402/work=/usr/local/src/conda/moose-mpi-base-2024.12.23 -fdebug-prefix-map=/Users/lingzou/miniforge/envs/moose=/usr/local/src/conda-prefix
 " CXXFLAGS="-ftree-vectorize -fPIC -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -fmessage-length=0 -isystem /Users/lingzou/miniforge/envs/moose/include -fdebug-prefix-map=/opt/civet0/build_0/_env/conda-bld/moose-mpi_1735973237402/work=/usr/local/src/conda/moose-mpi-base-2024.12.23
 -fdebug-prefix-map=/Users/lingzou/miniforge/envs/moose=/usr/local/src/conda-prefix</span><span class="apple-converted-space"> 
</span><span class="s1">" CPPFLAGS="-D_FORTIFY_SOURCE=2 -isystem /Users/lingzou/miniforge/envs/moose/include -mmacosx-version-min=11.3 " FFLAGS="-march=armv8.3-a -ftree-vectorize -fPIC -fno-stack-protector -O2 -pipe -isystem /Users/lingzou/miniforge/envs/moose/include
 -fdebug-prefix-map=/opt/civet0/build_0/_env/conda-bld/moose-mpi_1735973237402/work=/usr/local/src/conda/moose-mpi-base-2024.12.23 -fdebug-prefix-map=/Users/lingzou/miniforge/envs/moose=/usr/local/src/conda-prefix " FCFLAGS="-march=armv8.3-a -ftree-vectorize
 -fPIC -fno-stack-protector -O2 -pipe -isystem /Users/lingzou/miniforge/envs/moose/include -fdebug-prefix-map=/opt/civet0/build_0/_env/conda-bld/moose-mpi_1735973237402/work=/usr/local/src/conda/moose-mpi-base-2024.12.23 -fdebug-prefix-map=/Users/lingzou/miniforge/envs/moose=/usr/local/src/conda-prefix
 " LDFLAGS="-Wl,-headerpad_max_install_names</span><span class="apple-converted-space"> 
</span><span class="s1">-Wl,-rpath,/Users/lingzou/miniforge/envs/moose/lib -L/Users/lingzou/miniforge/envs/moose/lib</span><span class="apple-converted-space"> 
</span><span class="s1">-Wl,-ld_classic -Wl,-commons,use_dylibs" --prefix=/Users/lingzou/miniforge/envs/moose/petsc</span><o:p></o:p></p>
<p class="p1"><span class="s1">[0]PETSC ERROR: #1 VecSetErrorIfLocked() at /opt/civet0/build_0/_env/conda-bld/moose-petsc_1735976555173/work/include/petscvec.h:649</span><o:p></o:p></p>
<p class="p1"><span class="s1">[0]PETSC ERROR: #2 VecGetArray() at /opt/civet0/build_0/_env/conda-bld/moose-petsc_1735976555173/work/src/vec/vec/interface/rvector.c:2020</span><o:p></o:p></p>
<p class="p1"><span class="apple-converted-space">    </span><span class="s1">NL Step =</span><span class="apple-converted-space"> 
</span><span class="s1">0, fnorm =</span><span class="apple-converted-space">  </span>
<span class="s1">1.10935E+30</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><span style="font-size:12.0pt"><o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>