OP2/OP2-Common — pull request #44 by gihanmudalige (2012-10-08 09:34:35+00:00)
Title: Fix/direct dat halo exchange

This pull request is to fix a bug in the MPI halo exchanges. Currently the MPI halo exchanges are triggered *only* for op_dats that are indirectly accessed in a par_loop. However, we came across the case where an indirect loop over bnodes that updates nodes with a bnodes to nodes mapping required the exec halo of bnodes (which is in this case accessed directly) to be updated in order to get the required contributions to the nodes.

Thus now the conditions for halo exchange have been updated to exchange halos for any op_dats that is OP-READ or OP_RW and has the dirtybit set to 1.

Also we have updated op_mpi_halo_exchange() to check if a loop is a direct loop before halos are exchanged. Only indirect loops will have halo exchanges.