[petsc-users] Undestanding how to increase the overlap
Matthew Knepley
knepley at gmail.com
Thu Jan 18 08:49:13 CST 2024
On Thu, Jan 18, 2024 at 9:46 AM TARDIEU Nicolas <nicolas.tardieu at edf.fr>
wrote:
> Hi Matt,
> The isovl is in global numbering. I am pasting the output of the script :
>
I see. Is your matrix diagonal? If so, there is no overlap. You need
connections to the other rows in order to have overlapping submatrices.
Thanks,
Matt
>
> #--------------------------------------------------------------------------------
> # The matrix
> # -----------
> [1,0]<stdout>:Mat Object: 2 MPI processes
> [1,0]<stdout>: type: mpiaij
> [1,0]<stdout>:row 0: (0, 0.)
> [1,0]<stdout>:row 1: (1, 1.)
> [1,0]<stdout>:row 2: (2, 2.)
> [1,0]<stdout>:row 3: (3, 3.)
> [1,0]<stdout>:row 4: (4, 4.)
> [1,0]<stdout>:row 5: (5, 5.)
>
> #--------------------------------------------------------------------------------
> # The IS isovl before the call to increaseOverlap
> # -----------
> [1,0]<stdout>:locSize before = 3
> [1,0]<stdout>:IS Object: 1 MPI processes
> [1,0]<stdout>: type: stride
> [1,0]<stdout>:Number of indices in (stride) set 3
> [1,0]<stdout>:0 0
> [1,0]<stdout>:1 1
> [1,0]<stdout>:2 2
> [1,1]<stdout>:locSize before = 3
> [1,1]<stdout>:IS Object: 1 MPI processes
> [1,1]<stdout>: type: stride
> [1,1]<stdout>:Number of indices in (stride) set 3
> [1,1]<stdout>:0 3
> [1,1]<stdout>:1 4
> [1,1]<stdout>:2 5
>
> #--------------------------------------------------------------------------------
> # The IS isovl after the call to increaseOverlap
> # -----------
> [1,0]<stdout>:locSize after = 3
> [1,0]<stdout>:IS Object: 1 MPI processes
> [1,0]<stdout>: type: general
> [1,0]<stdout>:Number of indices in set 3
> [1,0]<stdout>:0 0
> [1,0]<stdout>:1 1
> [1,0]<stdout>:2 2
> [1,1]<stdout>:locSize after = 3
> [1,1]<stdout>:IS Object: 1 MPI processes
> [1,1]<stdout>: type: general
> [1,1]<stdout>:Number of indices in set 3
> [1,1]<stdout>:0 3
> [1,1]<stdout>:1 4
> [1,1]<stdout>:2 5
>
> #--------------------------------------------------------------------------------
>
> Regards,
> Nicolas
> --
> Nicolas Tardieu
> Ing PhD Computational Mechanics
> EDF - R&D Dpt ERMES
> PARIS-SACLAY, FRANCE
> ------------------------------
> *De :* knepley at gmail.com <knepley at gmail.com>
> *Envoyé :* jeudi 18 janvier 2024 15:29
> *À :* TARDIEU Nicolas <nicolas.tardieu at edf.fr>
> *Cc :* petsc-users at mcs.anl.gov <petsc-users at mcs.anl.gov>
> *Objet :* Re: [petsc-users] Undestanding how to increase the overlap
>
> On Thu, Jan 18, 2024 at 9:24 AM TARDIEU Nicolas via petsc-users <
> petsc-users at mcs.anl.gov> wrote:
>
> Dear PETSc Team,
>
> I am trying to understand how to increase the overlap of a matrix.
> I wrote the attached petsc4py script where I build a simple matrix and
> play with the increaseOverlap method. Unfortunately, before and after the
> call, nothing changes in the index set. FYI, I have tried to mimic
> src/ksp/ksp/tutorials/ex82.c
> <https://petsc.org/main/src/ksp/ksp/tutorials/ex82.c.html> line 72:76.
> Here is how I run the script : "mpiexec -n 2 python test_overlap.py"
>
> Could you please indicate what I am missing ?
>
>
> Usually matrix functions like this take input in global indices. It looks
> like your isovl is in local indices. Am I reading that correctly?
>
> Thanks,
>
> Matt
>
>
> Regards,
> Nicolas
> --
> Nicolas Tardieu
> Ing PhD Computational Mechanics
> EDF - R&D Dpt ERMES
> PARIS-SACLAY, FRANCE
>
>
> Ce message et toutes les pièces jointes (ci-après le 'Message') sont
> établis à l'intention exclusive des destinataires et les informations qui y
> figurent sont strictement confidentielles. Toute utilisation de ce Message
> non conforme à sa destination, toute diffusion ou toute publication totale
> ou partielle, est interdite sauf autorisation expresse.
>
> Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de
> le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou
> partie. Si vous avez reçu ce Message par erreur, merci de le supprimer de
> votre système, ainsi que toutes ses copies, et de n'en garder aucune trace
> sur quelque support que ce soit. Nous vous remercions également d'en
> avertir immédiatement l'expéditeur par retour du message.
>
> Il est impossible de garantir que les communications par messagerie
> électronique arrivent en temps utile, sont sécurisées ou dénuées de toute
> erreur ou virus.
> ____________________________________________________
>
> This message and any attachments (the 'Message') are intended solely for
> the addressees. The information contained in this Message is confidential.
> Any use of information contained in this Message not in accord with its
> purpose, any dissemination or disclosure, either whole or partial, is
> prohibited except formal approval.
>
> If you are not the addressee, you may not copy, forward, disclose or use
> any part of it. If you have received this message in error, please delete
> it and all copies from your system and notify the sender immediately by
> return message.
>
> E-mail communication cannot be guaranteed to be timely secure, error or
> virus-free.
>
>
>
> --
> 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/>
>
>
> Ce message et toutes les pièces jointes (ci-après le 'Message') sont
> établis à l'intention exclusive des destinataires et les informations qui y
> figurent sont strictement confidentielles. Toute utilisation de ce Message
> non conforme à sa destination, toute diffusion ou toute publication totale
> ou partielle, est interdite sauf autorisation expresse.
>
> Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de
> le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou
> partie. Si vous avez reçu ce Message par erreur, merci de le supprimer de
> votre système, ainsi que toutes ses copies, et de n'en garder aucune trace
> sur quelque support que ce soit. Nous vous remercions également d'en
> avertir immédiatement l'expéditeur par retour du message.
>
> Il est impossible de garantir que les communications par messagerie
> électronique arrivent en temps utile, sont sécurisées ou dénuées de toute
> erreur ou virus.
> ____________________________________________________
>
> This message and any attachments (the 'Message') are intended solely for
> the addressees. The information contained in this Message is confidential.
> Any use of information contained in this Message not in accord with its
> purpose, any dissemination or disclosure, either whole or partial, is
> prohibited except formal approval.
>
> If you are not the addressee, you may not copy, forward, disclose or use
> any part of it. If you have received this message in error, please delete
> it and all copies from your system and notify the sender immediately by
> return message.
>
> E-mail communication cannot be guaranteed to be timely secure, error or
> virus-free.
>
--
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/20240118/a2578efa/attachment.html>
More information about the petsc-users
mailing list