| version 1.1024 | version 1.1025 |
|---|
| |
| #include "WorkDistrib.decl.h" | #include "WorkDistrib.decl.h" |
| #include "Node.h" | #include "Node.h" |
| #include "ComputePatchPair.h" | #include "ComputePatchPair.h" |
| | #include "Priorities.h" |
| #include "PatchMap.inl" | #include "PatchMap.inl" |
| #include "Patch.h" | #include "Patch.h" |
| | |
| |
| | |
| Compute::initialize(); | Compute::initialize(); |
| | |
| | // proxies are more urgent (lower priority) than patches |
| int myNode = CkMyPe(); | int myNode = CkMyPe(); |
| int p0 = patchID[0] % 64; | int p0 = PATCH_PRIORITY(patchID[0]); |
| int p1 = patchID[1] % 64; | if ( PatchMap::Object()->node(patchID[0]) == myNode ) { |
| int patchPrio = ((p0<p1)?p0:p1); | p0 += COMPUTE_HOME_PRIORITY; |
| if ( PatchMap::Object()->node(patchID[0]) != myNode ) | } else { |
| { | p0 += COMPUTE_PROXY_PRIORITY; |
| basePriority = 64 + patchPrio; | } |
| } | int p1 = PATCH_PRIORITY(patchID[1]); |
| else if ( PatchMap::Object()->node(patchID[1]) != myNode ) | if ( PatchMap::Object()->node(patchID[1]) == myNode ) { |
| { | p1 += COMPUTE_HOME_PRIORITY; |
| basePriority = 64 + patchPrio; | } else { |
| } | p1 += COMPUTE_PROXY_PRIORITY; |
| else | |
| { | |
| basePriority = 2 * 64 + patchPrio; | |
| } | } |
| | basePriority = ((p0<p1)?p0:p1); // most urgent wins |
| | |
| } | } |
| | |