<p><b>dwj07@fsu.edu</b> 2012-07-16 12:08:03 -0600 (Mon, 16 Jul 2012)</p><p><br>
        -- BRANCH COMMIT --<br>
<br>
        Fixing an issue with buffer sizes for communication routines.<br>
        Removing print statements from block decomp module.<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-07-16 15:08:57 UTC (rev 2027)
+++ branches/omp_blocks/multiple_blocks/src/framework/mpas_block_decomp.F        2012-07-16 18:08:03 UTC (rev 2028)
@@ -142,9 +142,6 @@
global_start, local_nvertices, global_block_list, local_block_list)
end if
- write(6,*) 'NUM BLOCKS',blocks_per_proc
- write(6,*) 'NUM CELLS', local_nvertices(dminfo % my_proc_id + 1)
-
allocate(sorted_local_cell_list(2, local_nvertices(dminfo % my_proc_id + 1)))
allocate(block_id(blocks_per_proc))
allocate(block_start(blocks_per_proc))
Modified: branches/omp_blocks/multiple_blocks/src/framework/mpas_dmpar.F
===================================================================
--- branches/omp_blocks/multiple_blocks/src/framework/mpas_dmpar.F        2012-07-16 15:08:57 UTC (rev 2027)
+++ branches/omp_blocks/multiple_blocks/src/framework/mpas_dmpar.F        2012-07-16 18:08:03 UTC (rev 2028)
@@ -1490,7 +1490,7 @@
exchListPtr => fieldOutPtr % recvList % halos(haloLayers(iHalo)) % exchList
do while(associated(exchListPtr))
if(exchListPtr % endPointID == commListPtr % procID) then
- nAdded = max(nAdded, maxval(exchListPtr % srcList) * fieldOutPtr % dimSizes(1) * fieldOutPtr % dimSizes(2))
+ nAdded = max(nAdded, maxval(exchListPtr % srcList) * fieldOutPtr % dimSizes(1))
end if
exchListPtr => exchListPtr % next
end do
@@ -1499,7 +1499,7 @@
end do
bufferOffset = bufferOffset + nAdded
end do
- commListPtr % nList = nAdded
+ commListPtr % nList = bufferOffset
commListPtr => commListPtr % next
end do
@@ -1641,7 +1641,7 @@
fieldOutPtr % array(j, exchListPtr % destList(i)) = commListPtr % ibuffer(iBuffer)
end do
end do
- nAdded = max(nAdded, maxval(exchListPtr % srcList) * fieldOutPtr % dimSizes(1) * fieldOutPtr % dimSizes(2))
+ nAdded = max(nAdded, maxval(exchListPtr % srcList) * fieldOutPtr % dimSizes(1))
end if
exchListPtr => exchListPtr % next
end do
@@ -2899,7 +2899,7 @@
exchListPtr => exchListPtr % next
end do
- ! Determine size from recv lists
+ ! Setup recv lists
exchListPtr => fieldCursor % recvList % halos(haloLayers(iHalo)) % exchList
do while(associated(exchListPtr))
comm_list_found = .false.
@@ -2908,7 +2908,6 @@
do while(associated(commListPtr))
if(commListPtr % procID == exchListPtr % endPointId) then
comm_list_found = .true.
- commListPtr % nList = commListPtr % nList + exchListPtr % nList
exit
end if
@@ -2927,7 +2926,6 @@
commListPtr => commListPtr % next
nullify(commListPtr % next)
commListPtr % procID = exchListPtr % endPointID
- commListPtr % nList = exchListPtr % nList
end if
exchListPtr => exchListPtr % next
@@ -2946,6 +2944,32 @@
recvList => recvList % next
deallocate(commListPtr)
+ ! Determine size of recieve lists
+ commListPtr => recvList
+ do while(associated(commListPtr))
+ bufferOffset = 0
+ do iHalo = 1, nHaloLayers
+ nAdded = 0
+ fieldCursor => field
+ do while(associated(fieldCursor))
+ exchListPtr => fieldCursor % recvList % halos(iHalo) % exchList
+ do while(associated(exchListPtr))
+ if(exchListPtr % endPointID == commListPtr % procID) then
+ nAdded = max(nAdded, maxval(exchListPtr % srcList))
+ end if
+ exchListPtr => exchListPtr % next
+ end do
+
+ fieldCursor => fieldCursor % next
+ end do
+ bufferOffset = bufferOffset + nAdded
+ end do
+ commListPtr % nList = bufferOffset
+
+ commListPtr => commListPtr % next
+ end do
+
+
! Allocate space in recv lists, and initiate mpi_irecv calls
commListPtr => recvList
do while(associated(commListPtr))
@@ -3149,7 +3173,7 @@
exchListPtr => exchListPtr % next
end do
- ! Determine size from recv lists
+ ! Setup recv lists
exchListPtr => fieldCursor % recvList % halos(haloLayers(iHalo)) % exchList
do while(associated(exchListPtr))
comm_list_found = .false.
@@ -3158,7 +3182,6 @@
do while(associated(commListPtr))
if(commListPtr % procID == exchListPtr % endPointId) then
comm_list_found = .true.
- commListPtr % nList = commListPtr % nList + exchListPtr % nList * fieldCursor % dimSizes(1)
exit
end if
@@ -3177,7 +3200,6 @@
commListPtr => commListPtr % next
nullify(commListPtr % next)
commListPtr % procID = exchListPtr % endPointID
- commListPtr % nList = exchListPtr % nList * fieldCursor % dimSizes(1)
end if
exchListPtr => exchListPtr % next
@@ -3196,6 +3218,31 @@
recvList => recvList % next
deallocate(commListPtr)
+ ! Determine size of recieve list buffers
+ commListPtr => recvList
+ do while(associated(commListPtr))
+ bufferOffset = 0
+ do iHalo = 1, nHaloLayers
+ nAdded = 0
+ fieldCursor => field
+ do while(associated(fieldCursor))
+ exchListPtr => fieldCursor % recvList % halos(iHalo) % exchList
+ do while(associated(exchListPtr))
+ if(exchListPtr % endPointID == commListPtr % procID) then
+ nAdded = max(nAdded, maxval(exchListPtr % srcList) * fieldCursor % dimSizes(1))
+ end if
+ exchListPtr => exchListPtr % next
+ end do
+
+ fieldCursor => fieldCursor % next
+ end do
+ bufferOffset = bufferOffset + nAdded
+ end do
+ commListPtr % nList = bufferOffset
+
+ commListPtr => commListPtr % next
+ end do
+
! Allocate space in recv lists, and initiate mpi_irecv calls
commListPtr => recvList
do while(associated(commListPtr))
@@ -3401,7 +3448,7 @@
exchListPtr => exchListPtr % next
end do
- ! Determine size from recv lists
+ ! Setup recv lists
exchListPtr => fieldCursor % recvList % halos(haloLayers(iHalo)) % exchList
do while(associated(exchListPtr))
comm_list_found = .false.
@@ -3410,7 +3457,6 @@
do while(associated(commListPtr))
if(commListPtr % procID == exchListPtr % endPointId) then
comm_list_found = .true.
- commListPtr % nList = commListPtr % nList + exchListPtr % nList * fieldCursor % dimSizes(1) * fieldCursor % dimSizes(2)
exit
end if
@@ -3429,7 +3475,6 @@
commListPtr => commListPtr % next
nullify(commListPtr % next)
commListPtr % procID = exchListPtr % endPointID
- commListPtr % nList = exchListPtr % nList * fieldCursor % dimSizes(1) * fieldCursor % dimSizes(2)
end if
exchListPtr => exchListPtr % next
@@ -3448,6 +3493,31 @@
recvList => recvList % next
deallocate(commListPtr)
+ ! Determine size of recv lists
+ commListPtr => recvList
+ do while(associated(commListPtr))
+ bufferOffset = 0
+ do iHalo = 1, nHaloLayers
+ nAdded = 0
+ fieldCursor => field
+ do while(associated(fieldCursor))
+ exchListPtr => fieldCursor % recvList % halos(iHalo) % exchList
+ do while(associated(exchListPtr))
+ if(exchListPtr % endPointID == commListPtr % procID) then
+ nAdded = max(nAdded, maxval(exchListPtr % srcList) * fieldCursor % dimSizes(1) * fieldCursor % dimSizes(2))
+ end if
+ exchListPtr => exchListPtr % next
+ end do
+
+ fieldCursor => fieldCursor % next
+ end do
+ bufferOffset = bufferOffset + nAdded
+ end do
+ commListPtr % nList = bufferOffset
+
+ commListPtr => commListPtr % next
+ end do
+
! Allocate space in recv lists, and initiate mpi_irecv calls
commListPtr => recvList
do while(associated(commListPtr))
@@ -3659,7 +3729,7 @@
exchListPtr => exchListPtr % next
end do
- ! Determine size from recv lists
+ ! Setup recv lists
exchListPtr => fieldCursor % recvList % halos(haloLayers(iHalo)) % exchList
do while(associated(exchListPtr))
comm_list_found = .false.
@@ -3668,7 +3738,6 @@
do while(associated(commListPtr))
if(commListPtr % procID == exchListPtr % endPointId) then
comm_list_found = .true.
- commListPtr % nList = commListPtr % nList + exchListPtr % nList
exit
end if
@@ -3687,7 +3756,6 @@
commListPtr => commListPtr % next
nullify(commListPtr % next)
commListPtr % procID = exchListPtr % endPointID
- commListPtr % nList = exchListPtr % nList
end if
exchListPtr => exchListPtr % next
@@ -3706,6 +3774,32 @@
recvList => recvList % next
deallocate(commListPtr)
+ ! Determine size of recv lists
+ commListPtr => recvList
+ do while(associated(commListPtr))
+ bufferOffset = 0
+ do iHalo = 1, nHaloLayers
+ nAdded = 0
+ fieldCursor => field
+ do while(associated(fieldCursor))
+ exchListPtr => fieldCursor % recvList % halos(iHalo) % exchList
+ do while(associated(exchListPtr))
+ if(exchListPtr % endPointID == commListPtr % procID) then
+ nAdded = max(nAdded, maxval(exchListPtr % srcList))
+ end if
+ exchListPtr => exchListPtr % next
+ end do
+
+ fieldCursor => fieldCursor % next
+ end do
+ bufferOffset = bufferOffset + nAdded
+ end do
+ commListPtr % nList = bufferOffset
+
+ commListPtr => commListPtr % next
+ end do
+
+
! Allocate space in recv lists, and initiate mpi_irecv calls
commListPtr => recvList
do while(associated(commListPtr))
@@ -3907,7 +4001,7 @@
exchListPtr => exchListPtr % next
end do
- ! Determine size from recv lists
+ ! Setup recv lists
exchListPtr => fieldCursor % recvList % halos(haloLayers(iHalo)) % exchList
do while(associated(exchListPtr))
comm_list_found = .false.
@@ -3954,6 +4048,31 @@
recvList => recvList % next
deallocate(commListPtr)
+ ! Determine size of recv lists
+ commListPtr => recvList
+ do while(associated(commListPtr))
+ bufferOffset = 0
+ do iHalo = 1, nHaloLayers
+ nAdded = 0
+ fieldCursor => field
+ do while(associated(fieldCursor))
+ exchListPtr => fieldCursor % recvList % halos(iHalo) % exchList
+ do while(associated(exchListPtr))
+ if(exchListPtr % endPointID == commListPtr % procID) then
+ nAdded = max(nAdded, maxval(exchListPtr % srcList) * fieldCursor % dimSizes(1))
+ end if
+ exchListPtr => exchListPtr % next
+ end do
+
+ fieldCursor => fieldCursor % next
+ end do
+ bufferOffset = bufferOffset + nAdded
+ end do
+ commListPtr % nList = bufferOffset
+
+ commListPtr => commListPtr % next
+ end do
+
! Allocate space in recv lists, and initiate mpi_irecv calls
commListPtr => recvList
do while(associated(commListPtr))
@@ -4159,7 +4278,7 @@
exchListPtr => exchListPtr % next
end do
- ! Determine size from recv lists
+ ! Setup recv lists
exchListPtr => fieldCursor % recvList % halos(haloLayers(iHalo)) % exchList
do while(associated(exchListPtr))
comm_list_found = .false.
@@ -4168,7 +4287,6 @@
do while(associated(commListPtr))
if(commListPtr % procID == exchListPtr % endPointId) then
comm_list_found = .true.
- commListPtr % nList = commListPtr % nList + exchListPtr % nList * fieldCursor % dimSizes(1) * fieldCursor % dimSizes(2)
exit
end if
@@ -4187,7 +4305,6 @@
commListPtr => commListPtr % next
nullify(commListPtr % next)
commListPtr % procID = exchListPtr % endPointID
- commListPtr % nList = exchListPtr % nList * fieldCursor % dimSizes(1) * fieldCursor % dimSizes(2)
end if
exchListPtr => exchListPtr % next
@@ -4206,6 +4323,31 @@
recvList => recvList % next
deallocate(commListPtr)
+ ! Determine size of recv lists
+ commListPtr => recvList
+ do while(associated(commListPtr))
+ bufferOffset = 0
+ do iHalo = 1, nHaloLayers
+ nAdded = 0
+ fieldCursor => field
+ do while(associated(fieldCursor))
+ exchListPtr => fieldCursor % recvList % halos(iHalo) % exchList
+ do while(associated(exchListPtr))
+ if(exchListPtr % endPointID == commListPtr % procID) then
+ nAdded = max(nAdded, maxval(exchListPtr % srcList) * fieldCursor % dimSizes(1) * fieldCursor % dimSizes(2))
+ end if
+ exchListPtr => exchListPtr % next
+ end do
+
+ fieldCursor => fieldCursor % next
+ end do
+ bufferOffset = bufferOffset + nAdded
+ end do
+ commListPtr % nList = bufferOffset
+
+ commListPtr => commListPtr % next
+ end do
+
! Allocate space in recv lists, and initiate mpi_irecv calls
commListPtr => recvList
do while(associated(commListPtr))
</font>
</pre>