[petsc-users] Nodes Communication - Petsc Vec

Junchao Zhang junchao.zhang at gmail.com
Wed Feb 16 09:00:23 CST 2022


We could still do it. See the example at  petsc/src/vec/is/sf/tests/ex9.c

--Junchao Zhang


On Wed, Feb 16, 2022 at 8:47 AM Medane TCHAKOROM <
medane.tchakorom at univ-fcomte.fr> wrote:

> Re:
>
>
> It does not apply, because "their communicator must be on the same set of
> processes" .
>
> In my case, I have two disjoint subcomm from PETSC_COMM_WORD with same
> number of processes.
>
> I want to send information (Petsc Vec) from one subcomm to another subcomm.
>
> Thanks
> On 16/02/2022 15:43, Junchao Zhang wrote:
>
> See Notes at
> https://petsc.org/main/docs/manualpages/PetscSF/VecScatterCreate.html
>
> Does it apply to your case?
>
> --Junchao Zhang
>
>
> On Wed, Feb 16, 2022 at 8:12 AM Medane TCHAKOROM <
> medane.tchakorom at univ-fcomte.fr> wrote:
>
>> Re:
>>
>> I forgot to mention that the nodes are in differents communicators. Does
>> VecScatter functionnality still applies ?
>>
>> Thanks.
>> On 16/02/2022 15:03, Matthew Knepley wrote:
>>
>> On Wed, Feb 16, 2022 at 8:55 AM Medane TCHAKOROM <
>> medane.tchakorom at univ-fcomte.fr> wrote:
>>
>>> Hello,
>>>
>>> I want to pass a Petsc Vec from one node to another one. Is there any
>>> Petsc method for doing this
>>>
>>
>> You likely want the VecScatter functionality. There is a discussion of
>> this in the manual:
>> https://petsc.org/main/docs/manual/vec/?highlight=vecscatter#sec-unstruct
>>
>>   Thanks,
>>
>>     Matt
>>
>>
>>> or should I use MPI_Irecv and MPI_Isend for non-blocking communication ?
>>>
>>> When using MPI_Isend, can i send a Petsc Vec, or should I get the array
>>> from it, and then send it ?
>>>
>>> Thanks
>>>
>>>
>>
>> --
>> What most experimenters take for granted before they begin their
>> experiments is infinitely more interesting than any results to which their
>> experiments lead.
>> -- Norbert Wiener
>>
>> https://www.cse.buffalo.edu/~knepley/
>> <http://www.cse.buffalo.edu/~knepley/>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20220216/d8e2784f/attachment.html>


More information about the petsc-users mailing list