[petsc-users] Union of sequential vecs
Karthikeyan Chockalingam - STFC UKRI
karthikeyan.chockalingam at stfc.ac.uk
Fri Dec 9 14:24:51 CST 2022
That is where I am stuck, I don’t know who to combine them to get Vec = {2,5,7,8,10,11,12}.
I just want them in an MPI vector.
I finally plan to call VecScatterCreateToAll so that all processor gets a copy.
Thank you.
Kind regards,
Karthik.
From: Barry Smith <bsmith at petsc.dev>
Date: Friday, 9 December 2022 at 20:04
To: Chockalingam, Karthikeyan (STFC,DL,HC) <karthikeyan.chockalingam at stfc.ac.uk>
Cc: petsc-users at mcs.anl.gov <petsc-users at mcs.anl.gov>
Subject: Re: [petsc-users] Union of sequential vecs
How are you combining them to get Vec = {2,5,7,8,10,11,12}?
Do you want the values to remain on the same MPI rank as before, just in an MPI vector?
On Dec 9, 2022, at 2:28 PM, Karthikeyan Chockalingam - STFC UKRI via petsc-users <petsc-users at mcs.anl.gov> wrote:
Hi,
I want to take the union of a set of sequential vectors, each living in a different processor.
Say,
Vec_Seq1 = {2,5,7}
Vec_Seq2 = {5,8,10,11}
Vec_Seq3 = {5,2,12}.
Finally, get the union of all them Vec = {2,5,7,8,10,11,12}.
I initially wanted to create a parallel vector and insert the (sequential vector) values but I do not know, to which index to insert the values to. But I do know the total size of Vec (which in this case is 7).
Any help is much appreciated.
Kind regards,
Karthik.
This email and any attachments are intended solely for the use of the named recipients. If you are not the intended recipient you must not use, disclose, copy or distribute this email or any of its attachments and should notify the sender immediately and delete this email from your system. UK Research and Innovation (UKRI) has taken every reasonable precaution to minimise risk of this email or any attachments containing viruses or malware but the recipient should carry out its own virus and malware checks before opening the attachments. UKRI does not accept any liability for any losses or damages which the recipient may sustain due to presence of any viruses.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20221209/cb17ac7c/attachment-0001.html>
More information about the petsc-users
mailing list