<span style="font-family:SimSun;">
<p class="MsoNormal" style="text-indent:0cm;">
<span>Dear all,</span>
</p>
<p class="MsoNormal" style="text-align:justify;text-indent:24.0pt;">
<span>I used PETSc in my full Fortran codes and
it worked well when my codes were compiled by GNU Fortran (GCC) 4.8.4. But for
some reasons, I had to update the GNU Fortran (GCC) to version 10.0.1. Then I reinstalled
the MPICH and PETSc with the newer complier and compiled my codes successfully.
However, I got the following error massage:</span>
</p>
<p class="MsoNormal" style="text-indent:24.0pt;">
<i><span>Index '1' of dimension 1 of array 'xx' above upper
bound of 0</span></i><span>.<i></i></span>
</p>
<p class="MsoNormal" style="text-indent:24.0pt;">
<span>where <i>xx</i> is the Fortran pointer obtained by calling
VecGetArrayF90(<i>vec</i>,<i>xx</i>,<i>ierr</i>).</span>
</p>
<p class="MsoNormal" style="text-align:justify;text-indent:24.0pt;">
<span>The vector was built successfully, but it
seemed that the Fortran pointer <i>xx</i> was
not built. I got the same error massage when using VecGetArrayReadF90(). So, are
the VecGetArrayF90() and VecGetArrayReadF90() not compatible with the recent
versions of GNU Fortran? Or is there any other way to access the vectors? For solving
a linear problem <i>Ab</i>=<i>x</i>, I use VecGetArrayF90() to get the Fortran
pointer to update <i>b</i> and use VecGetArrayReadF90()
to get the values of <i>x</i>. After some
tests, I found that VecGetArrayF90() could be replaced by VecSetValues(), but VecGetValues()
used to replace VecGetArrayReadF90() could not be run with multiple threads.</span>
</p>
<p class="MsoNormal" style="text-indent:24.0pt;">
<span>I look forward
to your reply and thank you for any suggestions.</span>
</p>
<p class="MsoNormal" style="text-indent:0cm;">
<span>Best regards,</span>
</p>
<p class="MsoNormal" style="text-align:justify;text-indent:24.0pt;">
<span>Haolin Li</span>
</p>
<p class="2" style="text-indent:0cm;">
<span></span>
</p>
</span>