[petsc-users] Matrix version of VecScatterCreateToAll
김성익
ksi2443 at gmail.com
Sun Dec 18 08:44:21 CST 2022
For example, before using preallocaotor, I made A matrix. (A matrix has
information about indices of global matrix)
And the code structures are as below.
for (int i=0; i<num; i++){
MatGetRow(A,~~) // for getting indices info of global matrix.
MatSetvalues(preallocator, value_from_A);
}
Current state, I got an error at 'MatGetRow' when I run this code in
parallel.
That's why I want "all mpi ranks has information of A matrix".
Thanks,
Hyung Kim
2022년 12월 18일 (일) 오후 11:36, Junchao Zhang <junchao.zhang at gmail.com>님이 작성:
> I am not clear on what you said "this information must be viewed in all
> mpi ranks." Even with preallocator, each rank only needs to insert entries
> it knows (i.e., don't need to get all entries)
>
> Maybe you could provide an example code for us to better understand what
> you mean?
>
> --Junchao Zhang
>
>
> On Sun, Dec 18, 2022 at 8:25 AM 김성익 <ksi2443 at gmail.com> wrote:
>
>> Hello,
>>
>>
>> Is there a matrix version function of VecScatterCreateToAll?
>>
>> I'm using preallocator for preallocation of global matrix.
>> Prior to using the preallocator, information related to allocation is
>> stored in the specific matrix, and this information must be viewed in all
>> mpi ranks.
>> For using preallocator, I need scattering the specific matrix info to all
>> mpi ranks.
>>
>> Thanks,
>> Hyung Kim
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20221218/0acba0de/attachment.html>
More information about the petsc-users
mailing list