Hi Michael and Phil,<br><br>Thanks for the comments. I&#39;ll make those changes to the design document and send it out again. One question regarding something Phil brought up before. Should we consider moving the namelist config variables into a decomp group, rather than having them in IO? I previously left them IO just because there were only going to be a total of 3, so it didn&#39;t necessitate a new namelist group in my opinion. Though, at a later point in time we might add other namelist variables to this group, so it might make more sense then.<br>

<br>Thanks again.<br><br>Doug<br><br><div class="gmail_quote">On Mon, Jan 30, 2012 at 1:34 PM, Michael Duda <span dir="ltr">&lt;<a href="mailto:duda@ucar.edu">duda@ucar.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

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