<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>hi,</p>
<p>I have created a pull request (acroucher/dmplex-hdf5-vecview)
with the two fixes I came up with to prevent HDF5 DMPlex VecView()
crashing when one process has no cells on it.</p>
<p>Cheers, Adrian<br>
</p>
<br>
<div class="moz-cite-prefix">On 22/02/18 17:12, Adrian Croucher
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:ef7042a9-c2c3-6ced-c7c3-125fcb542f83@auckland.ac.nz">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<p>hi Matt,</p>
<br>
<div class="moz-cite-prefix">On 20/02/18 12:32, Matthew Knepley
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAMYG4GkA2GC9F+rMCknKEwiS3wv0oWBjLRznihThgie8UJ-aWw@mail.gmail.com">
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">On Mon, Feb 19, 2018 at 4:33 PM,
Adrian Croucher <span dir="ltr"><<a
href="mailto:a.croucher@auckland.ac.nz"
target="_blank" moz-do-not-send="true">a.croucher@auckland.ac.nz</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p>hi Matt</p>
<p>I tried what you suggested and modified
DMPlexGetFieldType_Internal() so that all processes
have the same field type (ft):</p>
</div>
</blockquote>
<div>Yep, this is going to take specifying in the
interface that it is collective. It looks like it might
be used as if it is not. <br>
</div>
</div>
</div>
</div>
</blockquote>
<br>
It looks to me like that may not be the problem, actually. I think
I may have tracked it down though.<br>
<br>
In vec/vec/interface/rvector.c:1280, in VecGetSubVector():<br>
<br>
<tt> if (n%bs || bs == 1) bs = -1; /* Do not decide block
size if we do not have to */</tt><tt><br>
</tt><tt><br>
</tt>If there are no cells on one process (n = 0) then n%bs = 0,
so if bs > 1 the reassignment bs = -1 doesn't happen.<br>
<br>
If I alter it to:<br>
<br>
<tt> if (n%bs || bs == 1 || !n) bs = -1; /* Do not decide
block size if we do not have to */</tt><tt><br>
</tt><tt><br>
</tt>then it also sets bs = -1 on the n = 0 process, and it works
fine for my case.<br>
<br>
I'm not sure I fully understand the purpose of this line though,
so don't know if what I've done is always going to be the right
thing?<br>
<br>
I also wondered if it would be desirable to ensure bs is
consistent across all processes, but am not sure what the right
value would be in that case. I tried doing an MPI_allreduce() on
bs, to find the minimum across processes (so if any were -1 then
they all were) and that also worked for my case.<br>
<br>
- Adrian<br>
<tt> </tt>
<pre class="moz-signature" cols="72">--
Dr Adrian Croucher
Senior Research Fellow
Department of Engineering Science
University of Auckland, New Zealand
email: <a class="moz-txt-link-abbreviated" href="mailto:a.croucher@auckland.ac.nz" moz-do-not-send="true">a.croucher@auckland.ac.nz</a>
tel: +64 (0)9 923 4611
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Dr Adrian Croucher
Senior Research Fellow
Department of Engineering Science
University of Auckland, New Zealand
email: <a class="moz-txt-link-abbreviated" href="mailto:a.croucher@auckland.ac.nz">a.croucher@auckland.ac.nz</a>
tel: +64 (0)9 923 4611
</pre>
</body>
</html>