<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Re: [mpas-developers] Block Decomposition Revision</title>
</head>
<body>
<font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size:12pt"><br>
Guys,<br>
<br>
I guess the local block ID was useful to us in previous implementations both for packing/unpacking messages and for indexing into arrays since we had an array block index rather than a linked list. &nbsp;But you can certainly do this with only a global id, the local
 index just saves a search step. &nbsp;In the end, I think this is a relatively simple change that we can either add/remove later.<br>
<br>
Phil<br>
<br>
<br>
On 1/30/12 11:23 AM, &quot;Doug Jacobsen&quot; &lt;<a href="jacobsen.douglas@gmail.com">jacobsen.douglas@gmail.com</a>&gt; wrote:<br>
<br>
</span></font>
<blockquote><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size:12pt">Hi Michael,<br>
<br>
</span></font>
<blockquote><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size:12pt">I was thinking a bit more about the design document this weekend, and, with<br>
the blocks stored in a linked-list, I'm wondering whether we really need<br>
local block indices. The main use of local indices that comes to my mind<br>
would be in indexing arrays of blocks, though I'm not sure whether we'll<br>
need to do that; perhaps we will optimize the shared-memory copies using<br>
arrays of block pointers? Adding a bit of extra code to deal with local<br>
indices seems straightforward enough and might be useful in future, but the<br>
overall design might be simpler if blocks were just identified by a unique,<br>
global ID.<br>
</span></font></blockquote>
<font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size:12pt"><br>
I'm not sure how useful the local block id inside of the block_type would be, I just figured it might be helpful to have. Especially if we had to swap local blocks with id's 1 between two processors later. It might be easier to determine which blocks we are
 talking about, especially when their global block id's wouldn't directly map to those local block id's anymore. Of course, for the short term, and the goals of this project we would not be tackling that problem and it wouldn't really be of any use yet. It
 was most of a long term goal that I was trying to prepare for, with Phil's mention of dynamic load balancing.
<br>
&nbsp;<br>
</span></font>
<blockquote><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size:12pt">Also, would it improve usability of the mpas_block_decomp_cells_for_proc()<br>
interface if we returned the block ownership information (i.e., local_block_list)<br>
in a different form? For example, it's not specified which order, if any,<br>
the cells in local_cell_list will be returned (alternatively, there's no<br>
guarantee that local_block_list will be in sorted order); so, perhaps we<br>
can always return cells that are in the same block contiguously in<br>
local_cell_list, and then provide block information with arrays<br>
<br>
&nbsp;&nbsp;&nbsp;block_id(:) &nbsp;&nbsp;&nbsp;- global IDs of the blocks<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NB: size(block_id) = number of blocks owned by the task<br>
<br>
&nbsp;&nbsp;&nbsp;block_start(:) - offset in local_cell_list of the first cell in the blocks<br>
<br>
&nbsp;&nbsp;&nbsp;block_count(:) - number of cells in the blocks<br>
<br>
The above is obviously just one alternative to local_block_list, but it<br>
might make it easier for the caller to quickly determine how many blocks it<br>
is being given, the sizes of those blocks, and the global cell IDs in each<br>
of those blocks.<br>
</span></font></blockquote>
<font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size:12pt"><br>
So, in this case local_cell_list would remain the same, but it would be sorted by local_block_id right? I could see this method being easier for the IO module to handle, since it can easily build one block at a time rather than having to loop over both local_cell_list
 and local_block_list to determine which cells are in a specific block. It's really just a matter of if we want to sort the structures inside of the mpas_block_decomp_cells_for_proc call, or after the data is returned. Either one is fine with me, so since you
 are tackling the IO rewrite if you would rather push this into the block_decomp modules I can take care of that.<br>
<br>
Thanks for the comments,<br>
Doug<br>
<br>
<br>
On Fri, Jan 27, 2012 at 06:49:59PM -0700, Doug Jacobsen wrote:<br>
&gt; Thanks for the comments Phil,<br>
&gt;<br>
&gt; I fixed the typo you mentioned, and I have already changed the design<br>
&gt; document to only provide a public interface to the<br>
&gt; mpas_get_blocks_per_proc, rather than the lookup table.<br>
&gt;<br>
&gt; Considering dynamic load balancing, would it be useful to store the local<br>
&gt; block id, and owning processor number within the block derived data type? I<br>
&gt; could see at least the local block id being useful, to help you if you need<br>
&gt; to rearrange the block indices, or insert a new block into the correct<br>
&gt; position, but I am unsure about the owning proc information. I guess that<br>
&gt; would just be dminfo % my_proc_id, since you would only have blocks that<br>
&gt; you would own.<br>
&gt;<br>
&gt; If anyone has any input on these ideas please let me know, but for now I'll<br>
&gt; add the local block index to the block data type (in the design doc), and<br>
&gt; leave out the owning proc id.<br>
&gt;<br>
&gt; Thanks again,<br>
&gt; Doug<br>
&gt;<br>
&gt; On Fri, Jan 27, 2012 at 3:52 PM, Jones, Philip W &lt;<a href="pwjones@lanl.gov">pwjones@lanl.gov</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt;<br>
&gt; &gt; Doug,<br>
&gt; &gt;<br>
</span></font>
<blockquote><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size:12pt">&gt; &gt; Generally, I think it?s ok. &nbsp;Couple of minor things below. &nbsp;Michael is<br>
&gt; &gt; correct in saying we want to be careful about holding onto arrays that are<br>
&gt; &gt; proportional to either number of tasks/blocks, even if they appear small<br>
&gt; &gt; now. &nbsp;Memory per node is not growing and on a per-core basis will continue<br>
&gt; &gt; to shrink. I suspect we will only need these functions on<br>
&gt; &gt; start-up/initialization and may be able to deallocate after this phase is<br>
&gt; &gt; complete (and then the functions would return an error). &nbsp;Once we?ve set up<br>
&gt; &gt; communicators/patterns for halos, reductions and I/O, I don?t believe we?ll<br>
&gt; &gt; have a need for these sorts of global maps. &nbsp;Even if we did dynamic load<br>
&gt; &gt; balancing, we?d typically be passing off a block or two from one task to<br>
&gt; &gt; another and can update locally without these global queries. &nbsp;Maybe we can<br>
&gt; &gt; keep these around for now and worry about this later.<br>
&gt; &gt;<br>
&gt; &gt; For minor issues:<br>
&gt; &gt;<br>
&gt; &gt; Do we want this in the io namelist block? &nbsp;I think there should be a<br>
&gt; &gt; general decomposition group rather than putting this in i/o. &nbsp;(I have other<br>
&gt; &gt; naming preferences too, but that?ll open another can o? worms).<br>
&gt; &gt;<br>
&gt; &gt; The last para on page 6 of the pdf is missing something ?wher is the<br>
&gt; &gt; number of proc?. &nbsp;It appears in the tex input too, so it?s not a tex issue.<br>
&gt; &gt;<br>
&gt; &gt; Phil<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; On 1/27/12 2:53 PM, &quot;Doug Jacobsen&quot; &lt;<a href="jacobsen.douglas@gmail.com">jacobsen.douglas@gmail.com</a>&gt; wrote:<br>
&gt; &gt;<br>
&gt; &gt; &nbsp;Hi again all,<br>
&gt; &gt;<br>
&gt; &gt; I have now attached the newest version of this design doc.<br>
&gt; &gt;<br>
&gt; &gt; Please let me know of any other comments/questions.<br>
&gt; &gt;<br>
&gt; &gt; Doug<br>
&gt; &gt;<br>
&gt; &gt; ------------------------------<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; mpas-developers mailing list<br>
&gt; &gt; <a href="mpas-developers@mailman.ucar.edu">mpas-developers@mailman.ucar.edu</a><br>
&gt; &gt; <a href="http://mailman.ucar.edu/mailman/listinfo/mpas-developers">http://mailman.ucar.edu/mailman/listinfo/mpas-developers</a><br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; ---<br>
&gt; &gt; Correspondence/TSPA/DUSA EARTH<br>
&gt; &gt; ------------------------------------------------------------<br>
&gt; &gt; Philip Jones &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="pwjones@lanl.gov">pwjones@lanl.gov</a><br>
&gt; &gt; Climate, Ocean and Sea Ice Modeling<br>
&gt; &gt; Los Alamos National Laboratory<br>
&gt; &gt; T-3 MS B216 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ph: 505-500-2699 &lt;tel:505-500-2699&gt;
<br>
&gt; &gt; PO Box 1663 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fax: 505-665-5926 &lt;tel:505-665-5926&gt;
<br>
&gt; &gt; Los Alamos, NM 87545-1663<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
<br>
&gt; _______________________________________________<br>
&gt; mpas-developers mailing list<br>
&gt; <a href="mpas-developers@mailman.ucar.edu">mpas-developers@mailman.ucar.edu</a><br>
&gt; <a href="http://mailman.ucar.edu/mailman/listinfo/mpas-developers">http://mailman.ucar.edu/mailman/listinfo/mpas-developers</a><br>
<br>
</span></font></blockquote>
<font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size:12pt"><br>
<br>
<br>
<hr align="CENTER" size="3" width="95%">
</span></font><span style="font-size:12pt"><font face="Courier, Courier New">_______________________________________________<br>
mpas-developers mailing list<br>
<a href="mpas-developers@mailman.ucar.edu">mpas-developers@mailman.ucar.edu</a><br>
<a href="http://mailman.ucar.edu/mailman/listinfo/mpas-developers">http://mailman.ucar.edu/mailman/listinfo/mpas-developers</a><br>
</font></span></blockquote>
<span style="font-size:12pt"><font face="Courier, Courier New"><br>
<br>
---<br>
Correspondence/TSPA/DUSA EARTH<br>
------------------------------------------------------------<br>
Philip Jones &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="pwjones@lanl.gov">pwjones@lanl.gov</a><br>
Climate, Ocean and Sea Ice Modeling<br>
Los Alamos National Laboratory<br>
T-3 MS B216 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Ph: 505-500-2699<br>
PO Box 1663 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Fax: 505-665-5926<br>
Los Alamos, NM 87545-1663<br>
</font></span><font size="1"><font face="Helvetica, Verdana, Arial"><span style="font-size:9pt"><br>
<br>
</span></font></font><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size:12pt"><br>
</span></font>
</body>
</html>