MAJ terminée. Nous sommes passés en version 14.6.2 . Pour consulter les "releases notes" associées c'est ici :

https://about.gitlab.com/releases/2022/01/11/security-release-gitlab-14-6-2-released/
https://about.gitlab.com/releases/2022/01/04/gitlab-14-6-1-released/

Commit d0b05da8 authored by BRAMAS Berenger's avatar BRAMAS Berenger
Browse files

Update priorities

parent 9e2abee5
......@@ -36,13 +36,12 @@
enum FGroupTaskDepAlgorithm_Priorities{
FGroupTaskDepAlgorithm_Prio_P2M = 5,
FGroupTaskDepAlgorithm_Prio_M2M = 4,
FGroupTaskDepAlgorithm_Prio_L2L_High = 3,
FGroupTaskDepAlgorithm_Prio_P2P_Big = 2,
FGroupTaskDepAlgorithm_Prio_M2L_High = 1,
FGroupTaskDepAlgorithm_Prio_L2L = 0,
FGroupTaskDepAlgorithm_Prio_M2L = -1,
FGroupTaskDepAlgorithm_Prio_P2P_Small = -2,
FGroupTaskDepAlgorithm_Prio_L2P = -3
FGroupTaskDepAlgorithm_Prio_M2L_High = 3,
FGroupTaskDepAlgorithm_Prio_L2L = 2,
FGroupTaskDepAlgorithm_Prio_P2P_Big = 1,
FGroupTaskDepAlgorithm_Prio_M2L = 0,
FGroupTaskDepAlgorithm_Prio_L2P = -1,
FGroupTaskDepAlgorithm_Prio_P2P_Small = -2
};
#else
#define priority_if_supported(x)
......@@ -67,16 +66,13 @@ protected:
OctreeClass*const tree; //< The Tree
KernelClass** kernels; //< The kernels
// Used with OPENMP_SUPPORT_PRIORITY
size_t p2pPrioCriteria;
#ifdef SCALFMM_TIME_OMPTASKS
FTaskTimer taskTimeRecorder;
#endif
public:
FGroupTaskDepAlgorithm(OctreeClass*const inTree, KernelClass* inKernels, const int inMaxThreads = -1)
: MaxThreads(inMaxThreads==-1?omp_get_max_threads():inMaxThreads), tree(inTree), kernels(nullptr), p2pPrioCriteria(0)
: MaxThreads(inMaxThreads==-1?omp_get_max_threads():inMaxThreads), tree(inTree), kernels(nullptr)
#ifdef SCALFMM_TIME_OMPTASKS
, taskTimeRecorder(MaxThreads)
#endif
......@@ -118,17 +114,6 @@ public:
buildExternalInteractionVecs();
}
}
#ifdef OPENMP_SUPPORT_PRIORITY
size_t nbLeaves = 0;
size_t nbParticles = 0;
for(int idxGroup = 0 ; idxGroup < tree->getNbParticleGroup() ; ++idxGroup){
ParticleGroupClass* containers = tree->getParticleGroup(idxGroup);
nbLeaves += containers->getNumberOfLeavesInBlock();
nbParticles += containers->getNbParticlesInGroup();
}
p2pPrioCriteria = (nbParticles/nbLeaves);
#endif
}
protected:
......@@ -679,39 +664,39 @@ protected:
switch(nbSubCellGroups){
case 1:
#pragma omp task default(none) firstprivate(idxLevel, currentCells, cellLocals, subCellGroups, subCellLocalGroupsLocal, nbSubCellGroups) depend(commute_if_supported: subCellLocalGroupsLocal[0][0]) depend(in: cellLocals[0]) priority_if_supported(idxLevel==FAbstractAlgorithm::lowerWorkingLevel-2?FGroupTaskDepAlgorithm_Prio_L2L:FGroupTaskDepAlgorithm_Prio_L2L_High)
#pragma omp task default(none) firstprivate(idxLevel, currentCells, cellLocals, subCellGroups, subCellLocalGroupsLocal, nbSubCellGroups) depend(commute_if_supported: subCellLocalGroupsLocal[0][0]) depend(in: cellLocals[0]) priority_if_supported(FGroupTaskDepAlgorithm_Prio_L2L)
FGroupTaskDepAlgorithm_L2L_CORE
break;
case 2:
#pragma omp task default(none) firstprivate(idxLevel, currentCells, cellLocals, subCellGroups, subCellLocalGroupsLocal, nbSubCellGroups) depend(commute_if_supported: subCellLocalGroupsLocal[0][0], subCellLocalGroupsLocal[1][0]) depend(in: cellLocals[0]) priority_if_supported(idxLevel==FAbstractAlgorithm::lowerWorkingLevel-2?FGroupTaskDepAlgorithm_Prio_L2L:FGroupTaskDepAlgorithm_Prio_L2L_High)
#pragma omp task default(none) firstprivate(idxLevel, currentCells, cellLocals, subCellGroups, subCellLocalGroupsLocal, nbSubCellGroups) depend(commute_if_supported: subCellLocalGroupsLocal[0][0], subCellLocalGroupsLocal[1][0]) depend(in: cellLocals[0]) priority_if_supported(FGroupTaskDepAlgorithm_Prio_L2L)
FGroupTaskDepAlgorithm_L2L_CORE
break;
case 3:
#pragma omp task default(none) firstprivate(idxLevel, currentCells, cellLocals, subCellGroups, subCellLocalGroupsLocal, nbSubCellGroups) depend(commute_if_supported: subCellLocalGroupsLocal[0][0], subCellLocalGroupsLocal[1][0], subCellLocalGroupsLocal[2][0]) depend(in: cellLocals[0]) priority_if_supported(idxLevel==FAbstractAlgorithm::lowerWorkingLevel-2?FGroupTaskDepAlgorithm_Prio_L2L:FGroupTaskDepAlgorithm_Prio_L2L_High)
#pragma omp task default(none) firstprivate(idxLevel, currentCells, cellLocals, subCellGroups, subCellLocalGroupsLocal, nbSubCellGroups) depend(commute_if_supported: subCellLocalGroupsLocal[0][0], subCellLocalGroupsLocal[1][0], subCellLocalGroupsLocal[2][0]) depend(in: cellLocals[0]) priority_if_supported(FGroupTaskDepAlgorithm_Prio_L2L)
FGroupTaskDepAlgorithm_L2L_CORE
break;
case 4:
#pragma omp task default(none) firstprivate(idxLevel, currentCells, cellLocals, subCellGroups, subCellLocalGroupsLocal, nbSubCellGroups) depend(commute_if_supported: subCellLocalGroupsLocal[0][0], subCellLocalGroupsLocal[1][0], subCellLocalGroupsLocal[2][0], subCellLocalGroupsLocal[3][0]) depend(in: cellLocals[0]) priority_if_supported(idxLevel==FAbstractAlgorithm::lowerWorkingLevel-2?FGroupTaskDepAlgorithm_Prio_L2L:FGroupTaskDepAlgorithm_Prio_L2L_High)
#pragma omp task default(none) firstprivate(idxLevel, currentCells, cellLocals, subCellGroups, subCellLocalGroupsLocal, nbSubCellGroups) depend(commute_if_supported: subCellLocalGroupsLocal[0][0], subCellLocalGroupsLocal[1][0], subCellLocalGroupsLocal[2][0], subCellLocalGroupsLocal[3][0]) depend(in: cellLocals[0]) priority_if_supported(FGroupTaskDepAlgorithm_Prio_L2L)
FGroupTaskDepAlgorithm_L2L_CORE
break;
case 5:
#pragma omp task default(none) firstprivate(idxLevel, currentCells, cellLocals, subCellGroups, subCellLocalGroupsLocal, nbSubCellGroups) depend(commute_if_supported: subCellLocalGroupsLocal[0][0], subCellLocalGroupsLocal[1][0], subCellLocalGroupsLocal[2][0], subCellLocalGroupsLocal[3][0], subCellLocalGroupsLocal[4][0]) depend(in: cellLocals[0]) priority_if_supported(idxLevel==FAbstractAlgorithm::lowerWorkingLevel-2?FGroupTaskDepAlgorithm_Prio_L2L:FGroupTaskDepAlgorithm_Prio_L2L_High)
#pragma omp task default(none) firstprivate(idxLevel, currentCells, cellLocals, subCellGroups, subCellLocalGroupsLocal, nbSubCellGroups) depend(commute_if_supported: subCellLocalGroupsLocal[0][0], subCellLocalGroupsLocal[1][0], subCellLocalGroupsLocal[2][0], subCellLocalGroupsLocal[3][0], subCellLocalGroupsLocal[4][0]) depend(in: cellLocals[0]) priority_if_supported(FGroupTaskDepAlgorithm_Prio_L2L)
FGroupTaskDepAlgorithm_L2L_CORE
break;
case 6:
#pragma omp task default(none) firstprivate(idxLevel, currentCells, cellLocals, subCellGroups, subCellLocalGroupsLocal, nbSubCellGroups) depend(commute_if_supported: subCellLocalGroupsLocal[0][0], subCellLocalGroupsLocal[1][0], subCellLocalGroupsLocal[2][0], subCellLocalGroupsLocal[3][0], subCellLocalGroupsLocal[4][0], subCellLocalGroupsLocal[5][0]) depend(in: cellLocals[0]) priority_if_supported(idxLevel==FAbstractAlgorithm::lowerWorkingLevel-2?FGroupTaskDepAlgorithm_Prio_L2L:FGroupTaskDepAlgorithm_Prio_L2L_High)
#pragma omp task default(none) firstprivate(idxLevel, currentCells, cellLocals, subCellGroups, subCellLocalGroupsLocal, nbSubCellGroups) depend(commute_if_supported: subCellLocalGroupsLocal[0][0], subCellLocalGroupsLocal[1][0], subCellLocalGroupsLocal[2][0], subCellLocalGroupsLocal[3][0], subCellLocalGroupsLocal[4][0], subCellLocalGroupsLocal[5][0]) depend(in: cellLocals[0]) priority_if_supported(FGroupTaskDepAlgorithm_Prio_L2L)
FGroupTaskDepAlgorithm_L2L_CORE
break;
case 7:
#pragma omp task default(none) firstprivate(idxLevel, currentCells, cellLocals, subCellGroups, subCellLocalGroupsLocal, nbSubCellGroups) depend(commute_if_supported: subCellLocalGroupsLocal[0][0], subCellLocalGroupsLocal[1][0], subCellLocalGroupsLocal[2][0], subCellLocalGroupsLocal[3][0], subCellLocalGroupsLocal[4][0], subCellLocalGroupsLocal[5][0], subCellLocalGroupsLocal[6][0]) depend(in: cellLocals[0]) priority_if_supported(idxLevel==FAbstractAlgorithm::lowerWorkingLevel-2?FGroupTaskDepAlgorithm_Prio_L2L:FGroupTaskDepAlgorithm_Prio_L2L_High)
#pragma omp task default(none) firstprivate(idxLevel, currentCells, cellLocals, subCellGroups, subCellLocalGroupsLocal, nbSubCellGroups) depend(commute_if_supported: subCellLocalGroupsLocal[0][0], subCellLocalGroupsLocal[1][0], subCellLocalGroupsLocal[2][0], subCellLocalGroupsLocal[3][0], subCellLocalGroupsLocal[4][0], subCellLocalGroupsLocal[5][0], subCellLocalGroupsLocal[6][0]) depend(in: cellLocals[0]) priority_if_supported(FGroupTaskDepAlgorithm_Prio_L2L)
FGroupTaskDepAlgorithm_L2L_CORE
break;
case 8:
#pragma omp task default(none) firstprivate(idxLevel, currentCells, cellLocals, subCellGroups, subCellLocalGroupsLocal, nbSubCellGroups) depend(commute_if_supported: subCellLocalGroupsLocal[0][0], subCellLocalGroupsLocal[1][0], subCellLocalGroupsLocal[2][0], subCellLocalGroupsLocal[3][0], subCellLocalGroupsLocal[4][0], subCellLocalGroupsLocal[5][0], subCellLocalGroupsLocal[6][0], subCellLocalGroupsLocal[7][0]) depend(in: cellLocals[0]) priority_if_supported(idxLevel==FAbstractAlgorithm::lowerWorkingLevel-2?FGroupTaskDepAlgorithm_Prio_L2L:FGroupTaskDepAlgorithm_Prio_L2L_High)
#pragma omp task default(none) firstprivate(idxLevel, currentCells, cellLocals, subCellGroups, subCellLocalGroupsLocal, nbSubCellGroups) depend(commute_if_supported: subCellLocalGroupsLocal[0][0], subCellLocalGroupsLocal[1][0], subCellLocalGroupsLocal[2][0], subCellLocalGroupsLocal[3][0], subCellLocalGroupsLocal[4][0], subCellLocalGroupsLocal[5][0], subCellLocalGroupsLocal[6][0], subCellLocalGroupsLocal[7][0]) depend(in: cellLocals[0]) priority_if_supported(FGroupTaskDepAlgorithm_Prio_L2L)
FGroupTaskDepAlgorithm_L2L_CORE
break;
case 9:
#pragma omp task default(none) firstprivate(idxLevel, currentCells, cellLocals, subCellGroups, subCellLocalGroupsLocal, nbSubCellGroups) depend(commute_if_supported: subCellLocalGroupsLocal[0][0], subCellLocalGroupsLocal[1][0], subCellLocalGroupsLocal[2][0], subCellLocalGroupsLocal[3][0], subCellLocalGroupsLocal[4][0], subCellLocalGroupsLocal[5][0], subCellLocalGroupsLocal[6][0], subCellLocalGroupsLocal[7][0], subCellLocalGroupsLocal[8][0]) depend(in: cellLocals[0]) priority_if_supported(idxLevel==FAbstractAlgorithm::lowerWorkingLevel-2?FGroupTaskDepAlgorithm_Prio_L2L:FGroupTaskDepAlgorithm_Prio_L2L_High)
#pragma omp task default(none) firstprivate(idxLevel, currentCells, cellLocals, subCellGroups, subCellLocalGroupsLocal, nbSubCellGroups) depend(commute_if_supported: subCellLocalGroupsLocal[0][0], subCellLocalGroupsLocal[1][0], subCellLocalGroupsLocal[2][0], subCellLocalGroupsLocal[3][0], subCellLocalGroupsLocal[4][0], subCellLocalGroupsLocal[5][0], subCellLocalGroupsLocal[6][0], subCellLocalGroupsLocal[7][0], subCellLocalGroupsLocal[8][0]) depend(in: cellLocals[0]) priority_if_supported(FGroupTaskDepAlgorithm_Prio_L2L)
FGroupTaskDepAlgorithm_L2L_CORE
break;
default:
......@@ -739,7 +724,7 @@ protected:
ParticleGroupClass* containers = (*iterParticles);
unsigned char* containersDown = containers->getRawAttributesBuffer();
#pragma omp task default(none) firstprivate(containers, containersDown) depend(commute_if_supported: containersDown[0]) priority_if_supported((containers->getNbParticlesInGroup()/containers->getNumberOfLeavesInBlock())>size_t(p2pPrioCriteria*1.1)?FGroupTaskDepAlgorithm_Prio_P2P_Big:FGroupTaskDepAlgorithm_Prio_P2P_Small)
#pragma omp task default(none) firstprivate(containers, containersDown) depend(commute_if_supported: containersDown[0]) priority_if_supported(FGroupTaskDepAlgorithm_Prio_P2P_Big)
{
FTIME_TASKS(FTaskTimer::ScopeEvent taskTime(&taskTimeRecorder, (containers->getStartingIndex() << 16) | (0<<8) | 5, "P2P"));
const MortonIndex blockStartIdx = containers->getStartingIndex();
......@@ -797,7 +782,7 @@ protected:
unsigned char* containersOtherDown = containersOther->getRawAttributesBuffer();
const std::vector<OutOfBlockInteraction>* outsideInteractions = &(*currentInteractions).interactions;
#pragma omp task default(none) firstprivate(containers, containersDown, containersOther, containersOtherDown, outsideInteractions) depend(commute_if_supported: containersOtherDown[0], containersDown[0]) priority_if_supported((containers->getNbParticlesInGroup()/containers->getNumberOfLeavesInBlock())>size_t(p2pPrioCriteria*1.1)?FGroupTaskDepAlgorithm_Prio_P2P_Big:FGroupTaskDepAlgorithm_Prio_P2P_Small)
#pragma omp task default(none) firstprivate(containers, containersDown, containersOther, containersOtherDown, outsideInteractions) depend(commute_if_supported: containersOtherDown[0], containersDown[0]) priority_if_supported(FGroupTaskDepAlgorithm_Prio_P2P_Small)
{
FTIME_TASKS(FTaskTimer::ScopeEvent taskTime(&taskTimeRecorder, (containersOther->getStartingIndex()) << 50 | (containers->getStartingIndex() << 16) | (0<<8) | 6, "P2P ext"));
KernelClass*const kernel = kernels[omp_get_thread_num()];
......
......@@ -23,6 +23,7 @@ class FStarPUFmmPriorities{
int insertionPositionM2L;
int insertionPositionM2LExtern;
int insertionPositionM2LLastLevel;
int insertionPositionL2L;
int insertionPositionL2P;
int insertionPositionP2P;
......@@ -61,27 +62,47 @@ public:
if(inTreeHeight > 2){
int incPrio = 0;
FLOG( FLog::Controller << "Buckets:\n" );
insertionPositionP2MSend = incPrio++;
FLOG( FLog::Controller << "\t P2M Send " << insertionPositionP2MSend << "\n" );
insertionPositionP2M = incPrio++;
FLOG( FLog::Controller << "\t P2M " << insertionPositionP2M << "\n" );
insertionPositionM2MSend = incPrio++;
FLOG( FLog::Controller << "\t M2M Send " << insertionPositionM2MSend << "\n" );
insertionPositionM2M = incPrio++;
FLOG( FLog::Controller << "\t M2M " << insertionPositionM2M << "\n" );
insertionPositionM2L = incPrio;
insertionPositionM2LExtern = incPrio;
insertionPositionM2LMpi = incPrio++;
insertionPositionM2L = incPrio++;
FLOG( FLog::Controller << "\t M2L " << insertionPositionM2L << "\n" );
insertionPositionM2LExtern = incPrio++;
FLOG( FLog::Controller << "\t M2L Outer " << insertionPositionM2LExtern << "\n" );
insertionPositionM2LMpi = insertionPositionM2LExtern;
FLOG( FLog::Controller << "\t M2L MPI " << insertionPositionM2LMpi << "\n" );
insertionPositionL2L = incPrio++;
FLOG( FLog::Controller << "\t L2L " << insertionPositionL2L << "\n" );
incPrio += (treeHeight-3) - 1; // M2L is done treeHeight-2 times
incPrio += (treeHeight-3) - 1; // M2L is done treeHeight-2 times
incPrio += (treeHeight-3) - 1; // L2L is done treeHeight-3 times
incPrio += (treeHeight-2)-1 // M2L is done treeHeight-2 times
+(treeHeight-3)-1; // L2L is done treeHeight-3 times
insertionPositionP2P = incPrio++;
FLOG( FLog::Controller << "\t P2P " << insertionPositionP2P << "\n" );
insertionPositionP2P = incPrio;
insertionPositionP2PExtern = incPrio;
insertionPositionP2PMpi = incPrio++;
insertionPositionM2LLastLevel = incPrio++;
FLOG( FLog::Controller << "\t M2L last " << insertionPositionM2LLastLevel << "\n" );
insertionPositionL2P = incPrio++;
assert(incPrio == 6 + (treeHeight-2) + (treeHeight-3));
FLOG( FLog::Controller << "\t L2P " << insertionPositionL2P << "\n" );
insertionPositionP2PExtern = incPrio++;
FLOG( FLog::Controller << "\t P2P Outer " << insertionPositionP2PExtern << "\n" );
insertionPositionP2PMpi = insertionPositionP2PExtern;
FLOG( FLog::Controller << "\t P2P MPI " << insertionPositionP2PMpi << "\n" );
assert(incPrio == 8 + (treeHeight-2) + (treeHeight-2) + (treeHeight-2));
}
else{
int incPrio = 0;
......@@ -95,12 +116,13 @@ public:
insertionPositionM2L = -1;
insertionPositionM2LExtern = -1;
insertionPositionM2LMpi = -1;
insertionPositionM2LLastLevel = -1;
insertionPositionL2L = -1;
insertionPositionP2P = incPrio;
insertionPositionP2PExtern = incPrio;
insertionPositionP2PMpi = incPrio++;
insertionPositionP2P = incPrio++;
insertionPositionP2PExtern = insertionPositionP2P;
insertionPositionP2PMpi = insertionPositionP2P;
insertionPositionL2P = -1;
assert(incPrio == 1);
......@@ -114,61 +136,68 @@ public:
// CPU follows the real prio
{
int cpuCountPrio = 0;
//insertionPositionP2MSend = 0;
//insertionPositionP2M = insertionPositionP2MSend+1;
if( !workOnlyOnLeaves && capacities->supportP2M(FSTARPU_CPU_IDX)){
FLOG( FLog::Controller << "\t CPU prio P2M Send " << cpuCountPrio << " bucket " << insertionPositionP2MSend << "\n" );
heteroprio->prio_mapping_per_arch_index[FSTARPU_CPU_IDX][cpuCountPrio++] = insertionPositionP2MSend;
heteroprio->buckets[insertionPositionP2MSend].valide_archs |= STARPU_CPU;
FLOG( FLog::Controller << "\t CPU prio P2M " << cpuCountPrio << " bucket " << insertionPositionP2M << "\n" );
heteroprio->prio_mapping_per_arch_index[FSTARPU_CPU_IDX][cpuCountPrio++] = insertionPositionP2M;
heteroprio->buckets[insertionPositionP2M].valide_archs |= STARPU_CPU;
}
//insertionPositionM2MSend = insertionPositionP2M+1;
//insertionPositionM2M = insertionPositionM2MSend+1;
//assert(cpuCountPrio == insertionPositionM2MSend); // True if CPU support all TODO
if(!workOnlyOnLeaves && capacities->supportM2M(FSTARPU_CPU_IDX)){
FLOG( FLog::Controller << "\t CPU prio M2M Send " << cpuCountPrio << " bucket " << insertionPositionM2MSend << "\n" );
heteroprio->prio_mapping_per_arch_index[FSTARPU_CPU_IDX][cpuCountPrio++] = insertionPositionM2MSend;
heteroprio->buckets[insertionPositionM2MSend].valide_archs |= STARPU_CPU;
FLOG( FLog::Controller << "\t CPU prio M2M " << cpuCountPrio << " bucket " << insertionPositionM2M << "\n" );
heteroprio->prio_mapping_per_arch_index[FSTARPU_CPU_IDX][cpuCountPrio++] = insertionPositionM2M;
heteroprio->buckets[insertionPositionM2M].valide_archs |= STARPU_CPU;
}
// insertionPositionM2L = insertionPositionM2M+1;
// insertionPositionM2LExtern = insertionPositionM2L;
// insertionPositionM2LMpi = insertionPositionM2L;
// insertionPositionL2L = insertionPositionM2L+1;
// assert(cpuCountPrio == insertionPositionM2L); // True if CPU support all TODO
for(int idxLevel = 2 ; idxLevel < treeHeight ; ++idxLevel){
for(int idxLevel = 2 ; idxLevel < treeHeight-1 ; ++idxLevel){
if(capacities->supportM2L(FSTARPU_CPU_IDX)){
const int prioM2LAtLevel = getInsertionPosM2L(idxLevel);
FLOG( FLog::Controller << "\t CPU prio M2L " << cpuCountPrio << " bucket " << prioM2LAtLevel << "\n" );
heteroprio->prio_mapping_per_arch_index[FSTARPU_CPU_IDX][cpuCountPrio++] = prioM2LAtLevel;
heteroprio->buckets[prioM2LAtLevel].valide_archs |= STARPU_CPU;
const int prioM2LAtLevelExtern = getInsertionPosM2LExtern(idxLevel);
FLOG( FLog::Controller << "\t CPU prio M2L extern " << cpuCountPrio << " bucket " << prioM2LAtLevelExtern << "\n" );
heteroprio->prio_mapping_per_arch_index[FSTARPU_CPU_IDX][cpuCountPrio++] = prioM2LAtLevelExtern;
heteroprio->buckets[prioM2LAtLevelExtern].valide_archs |= STARPU_CPU;
}
if(idxLevel != treeHeight-1 && capacities->supportL2L(FSTARPU_CPU_IDX)){
if(capacities->supportL2L(FSTARPU_CPU_IDX)){
const int prioL2LAtLevel = getInsertionPosL2L(idxLevel);
FLOG( FLog::Controller << "\t CPU prio L2L " << cpuCountPrio << " bucket " << prioL2LAtLevel << "\n" );
heteroprio->prio_mapping_per_arch_index[FSTARPU_CPU_IDX][cpuCountPrio++] = prioL2LAtLevel;
heteroprio->buckets[prioL2LAtLevel].valide_archs |= STARPU_CPU;
}
}
// assert(cpuCountPrio == insertionPositionP2P); // True if CPU support all TODO
//insertionPositionP2P = insertionPositionL2L + (treeHeight-3)*2+1 +1;
//insertionPositionP2PExtern = insertionPositionP2P;
//insertionPositionP2PMpi = insertionPositionP2P;
if( capacities->supportP2P(FSTARPU_CPU_IDX)){
FLOG( FLog::Controller << "\t CPU prio P2P " << cpuCountPrio << " bucket " << insertionPositionP2P << "\n" );
heteroprio->prio_mapping_per_arch_index[FSTARPU_CPU_IDX][cpuCountPrio++] = insertionPositionP2P;
heteroprio->buckets[insertionPositionP2P].valide_archs |= STARPU_CPU;
}
//assert(cpuCountPrio == insertionPositionL2P); // True if CPU support all TODO
//insertionPositionL2P = insertionPositionP2PMpi+1;
if(capacities->supportM2L(FSTARPU_CPU_IDX)){
const int prioM2LAtLevel = getInsertionPosM2L(treeHeight-1);
FLOG( FLog::Controller << "\t CPU prio M2L " << cpuCountPrio << " bucket " << prioM2LAtLevel << "\n" );
heteroprio->prio_mapping_per_arch_index[FSTARPU_CPU_IDX][cpuCountPrio++] = prioM2LAtLevel;
heteroprio->buckets[prioM2LAtLevel].valide_archs |= STARPU_CPU;
}
if( !workOnlyOnLeaves && capacities->supportL2P(FSTARPU_CPU_IDX)){
FLOG( FLog::Controller << "\t CPU prio L2P " << cpuCountPrio << " bucket " << insertionPositionL2P << "\n" );
heteroprio->prio_mapping_per_arch_index[FSTARPU_CPU_IDX][cpuCountPrio++] = insertionPositionL2P;
heteroprio->buckets[insertionPositionL2P].valide_archs |= STARPU_CPU;
}
if( capacities->supportP2P(FSTARPU_CPU_IDX)){
FLOG( FLog::Controller << "\t CPU prio P2P Extern " << cpuCountPrio << " bucket " << insertionPositionP2PExtern << "\n" );
heteroprio->prio_mapping_per_arch_index[FSTARPU_CPU_IDX][cpuCountPrio++] = insertionPositionP2PExtern;
heteroprio->buckets[insertionPositionP2PExtern].valide_archs |= STARPU_CPU;
}
heteroprio->nb_prio_per_arch_index[FSTARPU_CPU_IDX] = unsigned(cpuCountPrio);
FLOG( FLog::Controller << "\t CPU Priorities: " << cpuCountPrio << "\n" );
}
#endif
#ifdef STARPU_USE_OPENCL
......@@ -324,13 +353,13 @@ public:
return willBeSend?insertionPositionM2MSend:insertionPositionM2M;
}
int getInsertionPosM2L(const int inLevel) const {
return insertionPositionM2L + (inLevel - 2)*2;
return (inLevel==treeHeight-1? insertionPositionM2LLastLevel : insertionPositionM2L + (inLevel - 2)*3);
}
int getInsertionPosM2LExtern(const int inLevel) const {
return insertionPositionM2LExtern + (inLevel - 2)*2;
return (inLevel==treeHeight-1? insertionPositionM2LLastLevel : insertionPositionM2LExtern + (inLevel - 2)*3);
}
int getInsertionPosL2L(const int inLevel) const {
return insertionPositionL2L + (inLevel - 2)*2;
return insertionPositionL2L + (inLevel - 2)*3;
}
int getInsertionPosL2P() const {
return insertionPositionL2P;
......@@ -342,7 +371,7 @@ public:
return insertionPositionP2PExtern;
}
int getInsertionPosM2LMpi(const int inLevel) const {
return insertionPositionM2LMpi + (inLevel - 2)*2;
return insertionPositionM2LMpi + (inLevel - 2)*3;
}
int getInsertionPosP2PMpi() const {
return insertionPositionP2PMpi;
......@@ -413,4 +442,3 @@ FStarPUFmmPriorities FStarPUFmmPriorities::controller;
#endif // FSTARPUFMMPRIORITIES_HPP
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment