diff --git a/sapfor/experts/Sapfor_2017/_src/Distribution/DvmhDirectiveBase.cpp b/sapfor/experts/Sapfor_2017/_src/Distribution/DvmhDirectiveBase.cpp index 51c8ac0..55b6586 100644 --- a/sapfor/experts/Sapfor_2017/_src/Distribution/DvmhDirectiveBase.cpp +++ b/sapfor/experts/Sapfor_2017/_src/Distribution/DvmhDirectiveBase.cpp @@ -280,7 +280,54 @@ static inline string calculateShifts(DIST::GraphCSR &redu // check for distributed and not mapped dims -> zero them out ('coeffs.second') set refs; getRealArrayRefs(calcForArray, calcForArray, refs, arrayLinksByFuncCalls); - + + //TODO: need to correct errors + /*if (!sharedMemoryParallelization) + { + for (auto& array : refs) + { + DIST::Array* tmpl = array->GetTemplateArray(regionId); + checkNull(tmpl, convertFileName(__FILE__).c_str(), __LINE__); + + auto align = array->GetLinksWithTemplate(regionId); + + bool found = false; + for (auto& t : distribution) + { + if (t.first == tmpl) + { + found = true; + + for (int aDim = 0; aDim < align.size(); ++aDim) + { + int link = align[aDim]; + if (link != -1) + { + int tLink = link; + if (!arrayRef->IsTemplate()) + { + auto alignMain = arrayRef->GetLinksWithTemplate(regionId); + for (int z = 0; z < alignMain.size(); ++z) + if (alignMain[z] == tLink) + tLink = z; + } + + if (t.second->distRule[link] == dist::BLOCK && baseOnRule[aDim].first == "*") + { + for (int z = 0; z < coeffs.second.size(); ++z) + coeffs.second[z].first = coeffs.second[z].second = 0; + return out; + } + } + } + } + } + + if (!found) + printInternalError(convertFileName(__FILE__).c_str(), __LINE__); + } + }*/ + const pair, vector> *currReadOp = NULL; auto readIt = readOps.find(calcForArray); if (readIt != readOps.end())