<p><b>dwj07@fsu.edu</b> 2012-04-30 09:20:30 -0600 (Mon, 30 Apr 2012)</p><p><br>
        -- BRANCH COMMIT --<br>
<br>
        Fixing issues with multiple blocks on multiple processors.<br>
<br>
        So far the exchange lists have been tested on 1, 2, and 4 processors. With num_blocks set to 0, or 4.<br>
<br>
        The model still won't run yet, but the allToAll communications and exchange list setups work with multiple blocks.<br>
</p><hr noshade><pre><font color="gray">Modified: branches/omp_blocks/multiple_blocks/src/framework/mpas_block_decomp.F
===================================================================
--- branches/omp_blocks/multiple_blocks/src/framework/mpas_block_decomp.F        2012-04-28 01:49:14 UTC (rev 1837)
+++ branches/omp_blocks/multiple_blocks/src/framework/mpas_block_decomp.F        2012-04-30 15:20:30 UTC (rev 1838)
@@ -774,7 +774,7 @@
field_ptr => neededListField
do while(associated(field_ptr))
numToRecv = 0
- do i = 1, nNeededElements
+ do i = 1, nMesgRecv
if(ownerBlockListIn(i) == field_ptr % block % blockID) then
numToRecv(abs(ownerListIn(i))+1) = numToRecv(abs(ownerListIn(i))+1) + 1
end if
@@ -782,7 +782,7 @@
do iBlock = 1, totalBlocksOwned
if(numToRecv(iBlock) > 0) then
- if(ownedDecomposed) then
+ if(.not.ownedDecomposed) then
owningProc = iBlock - 1
else
call mpas_get_owning_proc(dminfo, iBlock - 1, owningProc)
@@ -812,15 +812,16 @@
allocate(exchListPtr % list(numToRecv(iBlock)))
iElement = 0
- do i = 1, nNeededElements
- if(ownerBlockListIn(i) == field_ptr % block % blockID) then
+ do i = 1, nMesgRecv
+ if(ownerBlockListIn(i) == field_ptr % block % blockID .and. abs(ownerListIn(i)) == iBlock-1) then
iElement = iElement + 1
+
exchListPtr % list(iElement) = iElement
end if
end do
end if
end do
-
+
field_ptr => field_ptr % next
end do
Modified: branches/omp_blocks/multiple_blocks/src/framework/mpas_io_input.F
===================================================================
--- branches/omp_blocks/multiple_blocks/src/framework/mpas_io_input.F        2012-04-28 01:49:14 UTC (rev 1837)
+++ branches/omp_blocks/multiple_blocks/src/framework/mpas_io_input.F        2012-04-30 15:20:30 UTC (rev 1838)
@@ -641,44 +641,44 @@
write(6,*) 'Linking exchange lists 2'
call mpas_link_exchange_list_field(indexToCellIDField, indexToCellID_0Halo, cellsOnCellField, cellsOnCell_0Halo)
-! write(6,*) 'send'
-! int1d_ptr => indexToCellIDField
-! do while(associated(int1d_ptr))
-! write(6,*) 'On block ',int1d_ptr % block % blockID
-! sendListPtr => int1d_ptr % sendList(1) % next
-! do while(associated(sendListPtr))
-! write(6,*) sendListPtr % procID, sendListPtr % blockID, sendListPtr % nList
-! write(6,*) sendListPtr % list
-! sendListPtr => sendListPtr % next
-! end do
-! int1d_ptr => int1d_ptr % next
-! end do
-!
-! write(6,*) 'recv'
-! int1d_ptr => indexToCellID_0Halo
-! do while(associated(int1d_ptr))
-! write(6,*) 'On block ',int1d_ptr % block % blockID
-! recvListPtr => int1d_ptr % recvList(1) % next
-! do while(associated(recvListPtr))
-! write(6,*) recvListPtr % procID, recvListPtr % blockID, recvListPtr % nList
-! recvListPtr => recvListPtr % next
-! end do
-! int1d_ptr => int1d_ptr % next
-! end do
-!
-! write(6,*) 'copy'
-! int1d_ptr => indexToCellID_0Halo
-! do while(associated(int1d_ptr))
-! write(6,*) 'On block ',int1d_ptr % block % blockID
-! copyListPtr => int1d_ptr % copyList(1) % next
-! do while(associated(copyListPtr))
-! write(6,*) copyListPtr % procID, copyListPtr % blockID, copyListPtr % nList
-! write(6,*) copyListPtr % list
-! copyListPtr => copyListPtr % next
-! end do
-! int1d_ptr => int1d_ptr % next
-! end do
+ write(6,*) 'send'
+ int1d_ptr => indexToCellIDField
+ do while(associated(int1d_ptr))
+ write(6,*) 'On block ',int1d_ptr % block % blockID
+ sendListPtr => int1d_ptr % sendList(1) % next
+ do while(associated(sendListPtr))
+ write(6,*) 'h', sendListPtr % procID, sendListPtr % blockID, sendListPtr % nList
+ write(6,*) sendListPtr % list
+ sendListPtr => sendListPtr % next
+ end do
+ int1d_ptr => int1d_ptr % next
+ end do
+ write(6,*) 'recv'
+ int1d_ptr => indexToCellID_0Halo
+ do while(associated(int1d_ptr))
+ write(6,*) 'On block ',int1d_ptr % block % blockID
+ recvListPtr => int1d_ptr % recvList(1) % next
+ do while(associated(recvListPtr))
+ write(6,*) 'h', recvListPtr % procID, recvListPtr % blockID, recvListPtr % nList
+ recvListPtr => recvListPtr % next
+ end do
+ int1d_ptr => int1d_ptr % next
+ end do
+
+ write(6,*) 'copy'
+ int1d_ptr => indexToCellID_0Halo
+ do while(associated(int1d_ptr))
+ write(6,*) 'On block ',int1d_ptr % block % blockID
+ copyListPtr => int1d_ptr % copyList(1) % next
+ do while(associated(copyListPtr))
+ write(6,*) 'h', copyListPtr % procID, copyListPtr % blockID, copyListPtr % nList
+ write(6,*) copyListPtr % list
+ copyListPtr => copyListPtr % next
+ end do
+ int1d_ptr => int1d_ptr % next
+ end do
+
write(6,*) 'All to all 1'
call mpas_dmpar_alltoall_field(domain % dminfo, indexToCellIDField, indexToCellID_0Halo)
write(6,*) 'All to all 2'
</font>
</pre>