On Fri, Feb 7, 2025 at 8:20 AM medane.tchako...@univ-fcomte.fr <
medane.tchako...@univ-fcomte.fr> wrote:
> Re:
> Please find below the output from the previous code, running on only one
> processor.
>
> Mat Object: 1 MPI process
> type: seqdense
> 7.2003197397953400e-01 3.980919128602e-01 9.
Re:
Please find below the output from the previous code, running on only one
processor.
Mat Object: 1 MPI process
type: seqdense
7.2003197397953400e-01 3.980919128602e-01 9.8405227390177075e-01
1.4405427480322786e-01
6.1793966542126100e-02 7.3036588248200474e-02 7.3851607000756303e-01
9.9
This is expected. For dense matrices, MatDenseGetSubMatrix() does not duplicate
the memory. You should interpret the array as a two-dimensional column-major
array: buffer[i+j*lda] where i,j are row and column indices, and lda can be
obtained with MatDenseGetLDA().
Jose
> El 7 feb 2025, a las 1
> On 7 Feb 2025, at 11:05 AM, medane.tchako...@univ-fcomte.fr wrote:
>
>
> Dear all,
>
> I have been experiencing incoherent data entries from this code below, when
> printing the array. Maybe I’am doing something wrong.
What is incoherent?
Everything looks OK to me.
Thanks,
Pierre
>
Dear all,
I have been experiencing incoherent data entries from this code below, when
printing the array. Maybe I’am doing something wrong.
PetscInt nlines = 8; // lines
PetscInt ncols = 4; // columns
PetscMPIInt rank;
PetscMPIInt size;
// Initialize P