<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Dear Pierre,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Thank you very much for your answer. I have the same explanation as you for the code I sent. </div>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
But what I would like to do is the following : I have the full matrix A with fields u, p and t (which are interlaced in the real application). I want to extract B=A(u+p, u+p). *Then* I would like to extract the (u, u) block from B - let us call it B_uu.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
In fact, B_uu=A_uu but I really need to do the extraction from B.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
And I am missing something since I have to play with different numberings when switching the IS from A to B.</div>
<div id="Signature">
<div>
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
</div>
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div style="margin:0px"><font size="3" face="Calibri,sans-serif"><br>
</font></div>
<div style="margin:0px"><font size="3" face="Calibri,sans-serif">Is it clear enough ???? </font></div>
<div style="margin:0px"><font size="3" face="Calibri,sans-serif"><br>
</font></div>
<font size="3"></font>
<div style="margin:0px"><font size="3" face="Calibri,sans-serif">Regards, </font>
</div>
<font size="3"></font>
<div style="margin:0px"><font face="Calibri,sans-serif"><font size="3" style="">Nicolas<br>
<span style="font-size:11pt">--</span></font><br>
</font><font size="2" face="Arial,sans-serif" color="#ff8100"><span style="font-size:9pt"><b>Nicolas Tardieu</b></span></font><br>
<div style="margin:0px"><font size="2" face="Calibri,sans-serif"><span style="font-size:11pt"><font size="1" face="Arial,sans-serif" color="#ff8100"><span style="font-size:8pt"><b>Ing PhD Computational Mechanics</b></span></font><font size="1" face="Arial,sans-serif" color="#ff8100"><span style="font-size:8pt"><b><br>
</b></span></font></span></font></div>
<div style="margin:0px"><font size="2" face="Calibri,sans-serif"><span style="font-size:11pt"><font size="1" face="Arial,sans-serif" color="#0062e1"><span lang="en-US" style="font-size:8pt">EDF - R&D Dpt ERMES</span></font><font size="1" face="Helv,sans-serif" color="#0062e1"><span lang="en-US" style="font-size:2pt"><br>
</span></font></span></font></div>
<div style="margin:0px"><span style="font-family: Arial, sans-serif; font-size: 8pt; color: rgb(0, 98, 225); background-color: rgba(0, 0, 0, 0);">PARIS-SACLAY, FRANCE</span></div>
</div>
</div>
</div>
</div>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>De :</b> pierre@joliv.et <pierre@joliv.et><br>
<b>Envoyé :</b> mercredi 19 octobre 2022 14:51<br>
<b>À :</b> TARDIEU Nicolas <nicolas.tardieu@edf.fr><br>
<b>Cc :</b> petsc-users@mcs.anl.gov <petsc-users@mcs.anl.gov><br>
<b>Objet :</b> Re: [petsc-users] Trouble with ISEmbed</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">On two processes, you have a different distribution for u and u+p.<br>
IS Object: 2 MPI processes<br>
type: general<br>
[0] Number of indices in set 5<br>
[0] 0 0<br>
[0] 1 1<br>
[0] 2 2<br>
[0] 3 3<br>
[0] 4 4<br>
[1] Number of indices in set 5<br>
[1] 0 5<br>
[1] 1 6<br>
[1] 2 7<br>
[1] 3 8<br>
[1] 4 9<br>
IS Object: 2 MPI processes<br>
type: general<br>
[0] Number of indices in set 8<br>
[0] 0 0<br>
[0] 1 1<br>
[0] 2 2<br>
[0] 3 3<br>
[0] 4 4<br>
[0] 5 5<br>
[0] 6 6<br>
[0] 7 7<br>
[1] Number of indices in set 7<br>
[1] 0 8<br>
[1] 1 9<br>
[1] 2 10<br>
[1] 3 11<br>
[1] 4 12<br>
[1] 5 13<br>
[1] 6 14<br>
ISEmbed() only works on local indices, so when you embed u into u+p, on the second process, you miss the row/column indices 5, 6, 7 of B = A(u+p, u+p).<br>
Thus, you end up with a matrix of dimension size(u) - 3 = 10 - 3 = 7, with just the row/column indices 8 and 9 being selected by the second process.<br>
What is it that you want to do exactly? Play with ISEmbed(), or get A(u, u) without using A but B instead?<br>
<br>
Thanks,<br>
Pierre<br>
<br>
> On 19 Oct 2022, at 12:00 PM, TARDIEU Nicolas via petsc-users <petsc-users@mcs.anl.gov> wrote:<br>
> <br>
> Dear PETSc Team,<br>
> <br>
> I am trying to use IS embeding in parallel. <br>
> In order to (try to) understand how it works, I have built a simple example, attached to this email.<br>
> <br>
> I consider a 20X20 matrix. The dof (u, p, t) in global numbering are the following :
<br>
> u: 0..9 p: 10..14 t: 15..19<br>
> <br>
> I have defined 4 IS to describe the dof u, p, t and the agglomeration of u and p, called up.<br>
> I first extract the submatrix matrix(up,up), then I would like to extract from it the (u,u) block.<br>
> <br>
> The example runs OK in sequential but I do not obtain the (u,u) block on 2 processes.<br>
> <br>
> I have a mistake in the build of the sub-IS but I cannot find it for days.<br>
> <br>
> Best regards,<br>
> Nicolas<br>
> --<br>
> Nicolas Tardieu<br>
> Ing PhD Computational Mechanics<br>
> EDF - R&D Dpt ERMES<br>
> PARIS-SACLAY, FRANCE<br>
> <br>
> 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.<br>
> 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.<br>
> 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.<br>
> ____________________________________________________<br>
> 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.<br>
> 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.<br>
> E-mail communication cannot be guaranteed to be timely secure, error or virus-free.<br>
> <is_pb.tgz><br>
<br>
</div>
</span></font></div>
<p></p>
<p><br>
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.</p>
<p>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.</p>
<p>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.<br>
____________________________________________________</p>
<p>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.</p>
<p>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.</p>
<p>E-mail communication cannot be guaranteed to be timely secure, error or virus-free.</p></body>
</html>