Commit b1fed762 authored by Martin Khannouz's avatar Martin Khannouz Committed by Berenger Bramas

use taskname in simgrid.

Add a few more information to the ones simgrid use.
Put the same taskname in the explicit mpi.
Add source code to compare dag.
Add script to compile and run tests.
parent afb13093
...@@ -41,9 +41,7 @@ ...@@ -41,9 +41,7 @@
#include "../OpenCl/FOpenCLDeviceWrapper.hpp" #include "../OpenCl/FOpenCLDeviceWrapper.hpp"
#endif #endif
#define SCALFMM_SIMGRID_TASKNAMEPARAMS #define SCALFMM_SIMGRID_TASKNAMEPARAMS
#ifdef SCALFMM_SIMGRID_TASKNAMEPARAMS
#include "../StarPUUtils/FStarPUTaskNameParams.hpp" #include "../StarPUUtils/FStarPUTaskNameParams.hpp"
#endif
#include "Containers/FBoolArray.hpp" #include "Containers/FBoolArray.hpp"
#include <iostream> #include <iostream>
...@@ -147,8 +145,9 @@ protected: ...@@ -147,8 +145,9 @@ protected:
std::unique_ptr<char[]> l2pTaskNames; std::unique_ptr<char[]> l2pTaskNames;
std::unique_ptr<char[]> p2pTaskNames; std::unique_ptr<char[]> p2pTaskNames;
std::unique_ptr<char[]> p2pOuterTaskNames; std::unique_ptr<char[]> p2pOuterTaskNames;
FStarPUTaskNameParams* taskNames;
#else #else
FStarPUTaskNameParams taskNames; FStarPUTaskNameParams* taskNames;
#endif #endif
#endif #endif
#ifdef SCALFMM_STARPU_USE_PRIO #ifdef SCALFMM_STARPU_USE_PRIO
...@@ -156,7 +155,6 @@ protected: ...@@ -156,7 +155,6 @@ protected:
#endif #endif
int mpi_rank, nproc; int mpi_rank, nproc;
std::vector<std::vector<std::vector<MortonIndex>>> nodeRepartition; std::vector<std::vector<std::vector<MortonIndex>>> nodeRepartition;
std::list<char*> taskName;
public: public:
FGroupTaskStarPUImplicitAlgorithm(OctreeClass*const inTree, KernelClass* inKernels, std::vector<MortonIndex>& distributedMortonIndex) FGroupTaskStarPUImplicitAlgorithm(OctreeClass*const inTree, KernelClass* inKernels, std::vector<MortonIndex>& distributedMortonIndex)
...@@ -187,6 +185,7 @@ public: ...@@ -187,6 +185,7 @@ public:
FAssertLF(starpu_mpi_init ( 0, 0, 1 ) == 0); FAssertLF(starpu_mpi_init ( 0, 0, 1 ) == 0);
MPI_Comm_rank(MPI_COMM_WORLD,&mpi_rank); MPI_Comm_rank(MPI_COMM_WORLD,&mpi_rank);
MPI_Comm_size(MPI_COMM_WORLD,&nproc); MPI_Comm_size(MPI_COMM_WORLD,&nproc);
taskNames = new FStarPUTaskNameParams(mpi_rank);
cout << mpi_rank << "/" << nproc << endl; cout << mpi_rank << "/" << nproc << endl;
starpu_malloc_set_align(32); starpu_malloc_set_align(32);
...@@ -344,8 +343,6 @@ public: ...@@ -344,8 +343,6 @@ public:
starpu_arbiter_destroy(arbiterGlobal); starpu_arbiter_destroy(arbiterGlobal);
#endif #endif
for(char* ptr : taskName)
free(ptr);
starpu_mpi_shutdown(); starpu_mpi_shutdown();
starpu_shutdown(); starpu_shutdown();
} }
...@@ -858,34 +855,6 @@ protected: ...@@ -858,34 +855,6 @@ protected:
} }
} }
} }
char* getTaskNameP2M(char const* const task_type, int idxGroup, int rank) {
char* name = nullptr;
asprintf(&name, "%s_%lld_%lld_%d", task_type, tree->getParticleGroup(idxGroup)->getStartingIndex(), tree->getParticleGroup(idxGroup)->getEndingIndex(), rank);
taskName.push_front(name);
return name;
}
char* getTaskNameM2M(char const* const task_type, int idxLevel, int idxGroup, int idxLevel2, int idxGroup2, int rank) {
char* name = nullptr;
MortonIndex start, end, start2, end2;
start = tree->getCellGroup(idxLevel, idxGroup)->getStartingIndex();
end = tree->getCellGroup(idxLevel, idxGroup)->getEndingIndex();
start2 = tree->getCellGroup(idxLevel2, idxGroup2)->getStartingIndex();
end2 = tree->getCellGroup(idxLevel2, idxGroup2)->getEndingIndex();
asprintf(&name, "%s_%d_%lld_%lld_%lld_%lld_%d", task_type, idxLevel, start, end, start2, end2, rank);
taskName.push_front(name);
return name;
}
char* getTaskNameP2P(char const* const task_type, int idxGroup, int idxGroup2, int rank) {
char* name = nullptr;
MortonIndex start, end, start2, end2;
start = tree->getParticleGroup(idxGroup)->getStartingIndex();
end = tree->getParticleGroup(idxGroup)->getEndingIndex();
start2 = tree->getParticleGroup(idxGroup2)->getStartingIndex();
end2 = tree->getParticleGroup(idxGroup2)->getEndingIndex();
asprintf(&name, "%s_%lld_%lld_%lld_%lld_%d", task_type, start, end, start2, end2, rank);
taskName.push_front(name);
return name;
}
int dataMappingBerenger(MortonIndex const idx, int const idxLevel) const { int dataMappingBerenger(MortonIndex const idx, int const idxLevel) const {
//return idxLevel%4; //return idxLevel%4;
for(int i = 0; i < nproc; ++i) for(int i = 0; i < nproc; ++i)
...@@ -1118,14 +1087,15 @@ protected: ...@@ -1118,14 +1087,15 @@ protected:
STARPU_RW, cellHandles[tree->getHeight()-1][idxGroup].up, STARPU_RW, cellHandles[tree->getHeight()-1][idxGroup].up,
STARPU_R, particleHandles[idxGroup].symb, STARPU_R, particleHandles[idxGroup].symb,
#ifdef STARPU_USE_TASK_NAME #ifdef STARPU_USE_TASK_NAME
#ifndef SCALFMM_SIMGRID_TASKNAMEPARAMS #ifdef SCALFMM_SIMGRID_TASKNAMEPARAMS
STARPU_NAME, getTaskNameP2M("p2m", idxGroup, starpu_mpi_data_get_rank(cellHandles[tree->getHeight()-1][idxGroup].up)),
#else
//"P2M-nb_i_p" //"P2M-nb_i_p"
STARPU_NAME, taskNames.print("P2M", "%d, %lld, %lld\n", STARPU_NAME, taskNames->print("P2M", "%d, %lld, %lld, %lld, %lld, %d\n",
tree->getCellGroup(tree->getHeight()-1,idxGroup)->getNumberOfCellsInBlock(), tree->getCellGroup(tree->getHeight()-1,idxGroup)->getNumberOfCellsInBlock(),
tree->getCellGroup(tree->getHeight()-1,idxGroup)->getSizeOfInterval(), tree->getCellGroup(tree->getHeight()-1,idxGroup)->getSizeOfInterval(),
tree->getCellGroup(tree->getHeight()-1,idxGroup)->getNumberOfCellsInBlock()), tree->getCellGroup(tree->getHeight()-1,idxGroup)->getNumberOfCellsInBlock(),
tree->getParticleGroup(idxGroup)->getStartingIndex(),
tree->getParticleGroup(idxGroup)->getEndingIndex(),
starpu_mpi_data_get_rank(cellHandles[tree->getHeight()-1][idxGroup].up)),
#endif #endif
#endif #endif
0); 0);
...@@ -1168,18 +1138,21 @@ protected: ...@@ -1168,18 +1138,21 @@ protected:
STARPU_R, cellHandles[idxLevel+1][idxSubGroup].symb, //symbolique, readonly STARPU_R, cellHandles[idxLevel+1][idxSubGroup].symb, //symbolique, readonly
STARPU_R, cellHandles[idxLevel+1][idxSubGroup].up, //level d'avant readonly STARPU_R, cellHandles[idxLevel+1][idxSubGroup].up, //level d'avant readonly
#ifdef STARPU_USE_TASK_NAME #ifdef STARPU_USE_TASK_NAME
#ifndef SCALFMM_SIMGRID_TASKNAMEPARAMS #ifdef SCALFMM_SIMGRID_TASKNAMEPARAMS
STARPU_NAME, getTaskNameM2M("m2m", idxLevel, idxGroup, idxLevel+1, idxSubGroup, starpu_mpi_data_get_rank(cellHandles[idxLevel][idxGroup].up)),
#else
//"M2M-l_nb_i_nbc_ic_s" //"M2M-l_nb_i_nbc_ic_s"
STARPU_NAME, taskNames.print("M2M", "%d, %d, %lld, %d, %lld, %lld\n", STARPU_NAME, taskNames->print("M2M", "%d, %d, %lld, %d, %lld, %lld, %lld, %lld, %lld, %lld, %d\n",
idxLevel, idxLevel,
tree->getCellGroup(idxLevel,idxGroup)->getNumberOfCellsInBlock(), tree->getCellGroup(idxLevel,idxGroup)->getNumberOfCellsInBlock(),
tree->getCellGroup(idxLevel,idxGroup)->getSizeOfInterval(), tree->getCellGroup(idxLevel,idxGroup)->getSizeOfInterval(),
tree->getCellGroup(idxLevel+1,idxSubGroup)->getNumberOfCellsInBlock(), tree->getCellGroup(idxLevel+1,idxSubGroup)->getNumberOfCellsInBlock(),
tree->getCellGroup(idxLevel+1,idxSubGroup)->getSizeOfInterval(), tree->getCellGroup(idxLevel+1,idxSubGroup)->getSizeOfInterval(),
FMath::Min(tree->getCellGroup(idxLevel,idxGroup)->getEndingIndex()-1, (tree->getCellGroup(idxLevel+1,idxSubGroup)->getEndingIndex()-1)>>3)- FMath::Min(tree->getCellGroup(idxLevel,idxGroup)->getEndingIndex()-1, (tree->getCellGroup(idxLevel+1,idxSubGroup)->getEndingIndex()-1)>>3)-
FMath::Max(tree->getCellGroup(idxLevel,idxGroup)->getStartingIndex(), tree->getCellGroup(idxLevel+1,idxSubGroup)->getStartingIndex()>>3)), FMath::Max(tree->getCellGroup(idxLevel,idxGroup)->getStartingIndex(), tree->getCellGroup(idxLevel+1,idxSubGroup)->getStartingIndex()>>3),
tree->getCellGroup(idxLevel, idxGroup)->getStartingIndex(),
tree->getCellGroup(idxLevel, idxGroup)->getEndingIndex(),
tree->getCellGroup(idxLevel+1, idxSubGroup)->getStartingIndex(),
tree->getCellGroup(idxLevel+1, idxSubGroup)->getEndingIndex(),
starpu_mpi_data_get_rank(cellHandles[idxLevel][idxGroup].up)),
#endif #endif
#endif #endif
0); 0);
...@@ -1204,18 +1177,21 @@ protected: ...@@ -1204,18 +1177,21 @@ protected:
STARPU_R, cellHandles[idxLevel+1][idxSubGroup].symb, //symbolique, readonly STARPU_R, cellHandles[idxLevel+1][idxSubGroup].symb, //symbolique, readonly
STARPU_R, cellHandles[idxLevel+1][idxSubGroup].up, //level d'avant readonly STARPU_R, cellHandles[idxLevel+1][idxSubGroup].up, //level d'avant readonly
#ifdef STARPU_USE_TASK_NAME #ifdef STARPU_USE_TASK_NAME
#ifndef SCALFMM_SIMGRID_TASKNAMEPARAMS #ifdef SCALFMM_SIMGRID_TASKNAMEPARAMS
STARPU_NAME, getTaskNameM2M("m2m", idxLevel, idxGroup, idxLevel+1, idxSubGroup, starpu_mpi_data_get_rank(cellHandles[idxLevel][idxGroup].up)),
#else
//M2M-l_nb_i_nbc_ic_s //M2M-l_nb_i_nbc_ic_s
STARPU_NAME, taskNames.print("M2M", "%d, %d, %lld, %d, %lld, %lld\n", STARPU_NAME, taskNames->print("M2M", "%d, %d, %lld, %d, %lld, %lld, %lld, %lld, %lld, %lld, %d\n",
idxLevel, idxLevel,
tree->getCellGroup(idxLevel,idxGroup)->getNumberOfCellsInBlock(), tree->getCellGroup(idxLevel,idxGroup)->getNumberOfCellsInBlock(),
tree->getCellGroup(idxLevel,idxGroup)->getSizeOfInterval(), tree->getCellGroup(idxLevel,idxGroup)->getSizeOfInterval(),
tree->getCellGroup(idxLevel+1,idxSubGroup)->getNumberOfCellsInBlock(), tree->getCellGroup(idxLevel+1,idxSubGroup)->getNumberOfCellsInBlock(),
tree->getCellGroup(idxLevel+1,idxSubGroup)->getSizeOfInterval(), tree->getCellGroup(idxLevel+1,idxSubGroup)->getSizeOfInterval(),
FMath::Min(tree->getCellGroup(idxLevel,idxGroup)->getEndingIndex()-1, (tree->getCellGroup(idxLevel+1,idxSubGroup)->getEndingIndex()-1)>>3)- FMath::Min(tree->getCellGroup(idxLevel,idxGroup)->getEndingIndex()-1, (tree->getCellGroup(idxLevel+1,idxSubGroup)->getEndingIndex()-1)>>3)-
FMath::Max(tree->getCellGroup(idxLevel,idxGroup)->getStartingIndex(), tree->getCellGroup(idxLevel+1,idxSubGroup)->getStartingIndex()>>3)), FMath::Max(tree->getCellGroup(idxLevel,idxGroup)->getStartingIndex(), tree->getCellGroup(idxLevel+1,idxSubGroup)->getStartingIndex()>>3),
tree->getCellGroup(idxLevel, idxGroup)->getStartingIndex(),
tree->getCellGroup(idxLevel, idxGroup)->getEndingIndex(),
tree->getCellGroup(idxLevel+1, idxSubGroup)->getStartingIndex(),
tree->getCellGroup(idxLevel+1, idxSubGroup)->getEndingIndex(),
starpu_mpi_data_get_rank(cellHandles[idxLevel][idxGroup].up)),
#endif #endif
#endif #endif
0); 0);
...@@ -1249,14 +1225,17 @@ protected: ...@@ -1249,14 +1225,17 @@ protected:
STARPU_R, cellHandles[idxLevel][idxGroup].up, STARPU_R, cellHandles[idxLevel][idxGroup].up,
(STARPU_RW | STARPU_COMMUTE_IF_SUPPORTED), cellHandles[idxLevel][idxGroup].down, (STARPU_RW | STARPU_COMMUTE_IF_SUPPORTED), cellHandles[idxLevel][idxGroup].down,
#ifdef STARPU_USE_TASK_NAME #ifdef STARPU_USE_TASK_NAME
#ifndef SCALFMM_SIMGRID_TASKNAMEPARAMS #ifdef SCALFMM_SIMGRID_TASKNAMEPARAMS
STARPU_NAME, getTaskNameM2M("m2l", idxLevel, idxGroup, idxLevel, idxGroup, starpu_mpi_data_get_rank(cellHandles[idxLevel][idxGroup].down)),
#else
//"M2L-l_nb_i" //"M2L-l_nb_i"
STARPU_NAME, taskNames.print("M2L", "%d, %d, %lld\n", STARPU_NAME, taskNames->print("M2L", "%d, %d, %lld, %lld, %lld, %lld, %lld, %d\n",
idxLevel, idxLevel,
tree->getCellGroup(idxLevel,idxGroup)->getNumberOfCellsInBlock(), tree->getCellGroup(idxLevel,idxGroup)->getNumberOfCellsInBlock(),
tree->getCellGroup(idxLevel,idxGroup)->getSizeOfInterval()), tree->getCellGroup(idxLevel,idxGroup)->getSizeOfInterval(),
tree->getCellGroup(idxLevel, idxGroup)->getStartingIndex(),
tree->getCellGroup(idxLevel, idxGroup)->getEndingIndex(),
tree->getCellGroup(idxLevel, idxGroup)->getStartingIndex(),
tree->getCellGroup(idxLevel, idxGroup)->getEndingIndex(),
starpu_mpi_data_get_rank(cellHandles[idxLevel][idxGroup].down)),
#endif #endif
#endif #endif
0); 0);
...@@ -1286,17 +1265,20 @@ protected: ...@@ -1286,17 +1265,20 @@ protected:
STARPU_R, cellHandles[idxLevel][interactionid].symb, STARPU_R, cellHandles[idxLevel][interactionid].symb,
STARPU_R, cellHandles[idxLevel][interactionid].up, STARPU_R, cellHandles[idxLevel][interactionid].up,
#ifdef STARPU_USE_TASK_NAME #ifdef STARPU_USE_TASK_NAME
#ifndef SCALFMM_SIMGRID_TASKNAMEPARAMS #ifdef SCALFMM_SIMGRID_TASKNAMEPARAMS
STARPU_NAME, getTaskNameM2M("m2l", idxLevel, idxGroup, idxLevel, interactionid, starpu_mpi_data_get_rank(cellHandles[idxLevel][idxGroup].down)),
#else
//"M2L_out-l_nb_i_nb_i_s //"M2L_out-l_nb_i_nb_i_s
STARPU_NAME, taskNames.print("M2L_out", "%d, %d, %lld, %d, %lld, %d\n", STARPU_NAME, taskNames->print("M2L_out", "%d, %d, %lld, %d, %lld, %d, %lld, %lld, %lld, %lld, %d\n",
idxLevel, idxLevel,
tree->getCellGroup(idxLevel,idxGroup)->getNumberOfCellsInBlock(), tree->getCellGroup(idxLevel,idxGroup)->getNumberOfCellsInBlock(),
tree->getCellGroup(idxLevel,idxGroup)->getSizeOfInterval(), tree->getCellGroup(idxLevel,idxGroup)->getSizeOfInterval(),
tree->getCellGroup(idxLevel,interactionid)->getNumberOfCellsInBlock(), tree->getCellGroup(idxLevel,interactionid)->getNumberOfCellsInBlock(),
tree->getCellGroup(idxLevel,interactionid)->getSizeOfInterval(), tree->getCellGroup(idxLevel,interactionid)->getSizeOfInterval(),
outsideInteractions->size()), outsideInteractions->size(),
tree->getCellGroup(idxLevel, idxGroup)->getStartingIndex(),
tree->getCellGroup(idxLevel, idxGroup)->getEndingIndex(),
tree->getCellGroup(idxLevel, interactionid)->getStartingIndex(),
tree->getCellGroup(idxLevel, interactionid)->getEndingIndex(),
starpu_mpi_data_get_rank(cellHandles[idxLevel][idxGroup].down)),
#endif #endif
#endif #endif
0); 0);
...@@ -1317,17 +1299,20 @@ protected: ...@@ -1317,17 +1299,20 @@ protected:
STARPU_R, cellHandles[idxLevel][idxGroup].symb, STARPU_R, cellHandles[idxLevel][idxGroup].symb,
STARPU_R, cellHandles[idxLevel][idxGroup].up, STARPU_R, cellHandles[idxLevel][idxGroup].up,
#ifdef STARPU_USE_TASK_NAME #ifdef STARPU_USE_TASK_NAME
#ifndef SCALFMM_SIMGRID_TASKNAMEPARAMS #ifdef SCALFMM_SIMGRID_TASKNAMEPARAMS
STARPU_NAME, getTaskNameM2M("m2l2", idxLevel, idxGroup, idxLevel, interactionid, starpu_mpi_data_get_rank(cellHandles[idxLevel][interactionid].down)),
#else
//"M2L_out-l_nb_i_nb_i_s" //"M2L_out-l_nb_i_nb_i_s"
STARPU_NAME, taskNames.print("M2L_out", "%d, %d, %lld, %d, %lld, %d\n", STARPU_NAME, taskNames->print("M2L_out", "%d, %d, %lld, %d, %lld, %d, %lld, %lld, %lld, %lld, %d\n",
idxLevel, idxLevel,
tree->getCellGroup(idxLevel,interactionid)->getNumberOfCellsInBlock(),
tree->getCellGroup(idxLevel,interactionid)->getSizeOfInterval(),
tree->getCellGroup(idxLevel,idxGroup)->getNumberOfCellsInBlock(), tree->getCellGroup(idxLevel,idxGroup)->getNumberOfCellsInBlock(),
tree->getCellGroup(idxLevel,idxGroup)->getSizeOfInterval(), tree->getCellGroup(idxLevel,idxGroup)->getSizeOfInterval(),
outsideInteractions->size()), tree->getCellGroup(idxLevel,interactionid)->getNumberOfCellsInBlock(),
tree->getCellGroup(idxLevel,interactionid)->getSizeOfInterval(),
outsideInteractions->size(),
tree->getCellGroup(idxLevel, idxGroup)->getStartingIndex(),
tree->getCellGroup(idxLevel, idxGroup)->getEndingIndex(),
tree->getCellGroup(idxLevel, interactionid)->getStartingIndex(),
tree->getCellGroup(idxLevel, interactionid)->getEndingIndex(),
starpu_mpi_data_get_rank(cellHandles[idxLevel][idxGroup].down)),
#endif #endif
#endif #endif
0); 0);
...@@ -1376,18 +1361,21 @@ protected: ...@@ -1376,18 +1361,21 @@ protected:
STARPU_R, cellHandles[idxLevel+1][idxSubGroup].symb, //symbolique, readonly STARPU_R, cellHandles[idxLevel+1][idxSubGroup].symb, //symbolique, readonly
STARPU_RW, cellHandles[idxLevel+1][idxSubGroup].down, //level d'avant readonly STARPU_RW, cellHandles[idxLevel+1][idxSubGroup].down, //level d'avant readonly
#ifdef STARPU_USE_TASK_NAME #ifdef STARPU_USE_TASK_NAME
#ifndef SCALFMM_SIMGRID_TASKNAMEPARAMS #ifdef SCALFMM_SIMGRID_TASKNAMEPARAMS
STARPU_NAME, getTaskNameM2M("l2l", idxLevel, idxGroup, idxLevel+1, idxSubGroup, starpu_mpi_data_get_rank(cellHandles[idxLevel+1][idxSubGroup].down)),
#else
//"L2L-l_nb_i_nbc_ic_s" //"L2L-l_nb_i_nbc_ic_s"
STARPU_NAME, taskNames.print("L2L", "%d, %d, %lld, %d, %lld, %lld\n", STARPU_NAME, taskNames->print("L2L", "%d, %d, %lld, %d, %lld, %lld, %lld, %lld, %lld, %lld, %d\n",
idxLevel, idxLevel,
tree->getCellGroup(idxLevel,idxGroup)->getNumberOfCellsInBlock(), tree->getCellGroup(idxLevel,idxGroup)->getNumberOfCellsInBlock(),
tree->getCellGroup(idxLevel,idxGroup)->getSizeOfInterval(), tree->getCellGroup(idxLevel,idxGroup)->getSizeOfInterval(),
tree->getCellGroup(idxLevel+1,idxSubGroup)->getNumberOfCellsInBlock(), tree->getCellGroup(idxLevel+1,idxSubGroup)->getNumberOfCellsInBlock(),
tree->getCellGroup(idxLevel+1,idxSubGroup)->getSizeOfInterval(), tree->getCellGroup(idxLevel+1,idxSubGroup)->getSizeOfInterval(),
FMath::Min(tree->getCellGroup(idxLevel,idxGroup)->getEndingIndex()-1, (tree->getCellGroup(idxLevel+1,idxSubGroup)->getEndingIndex()-1)>>3)- FMath::Min(tree->getCellGroup(idxLevel,idxGroup)->getEndingIndex()-1, (tree->getCellGroup(idxLevel+1,idxSubGroup)->getEndingIndex()-1)>>3)-
FMath::Max(tree->getCellGroup(idxLevel,idxGroup)->getStartingIndex(), tree->getCellGroup(idxLevel+1,idxSubGroup)->getStartingIndex()>>3)), FMath::Max(tree->getCellGroup(idxLevel,idxGroup)->getStartingIndex(), tree->getCellGroup(idxLevel+1,idxSubGroup)->getStartingIndex()>>3),
tree->getCellGroup(idxLevel, idxGroup)->getStartingIndex(),
tree->getCellGroup(idxLevel, idxGroup)->getEndingIndex(),
tree->getCellGroup(idxLevel+1, idxSubGroup)->getStartingIndex(),
tree->getCellGroup(idxLevel+1, idxSubGroup)->getEndingIndex(),
starpu_mpi_data_get_rank(cellHandles[idxLevel+1][idxSubGroup].down)),
#endif #endif
#endif #endif
0); 0);
...@@ -1406,18 +1394,21 @@ protected: ...@@ -1406,18 +1394,21 @@ protected:
STARPU_R, cellHandles[idxLevel+1][idxSubGroup].symb, //symbolique, readonly STARPU_R, cellHandles[idxLevel+1][idxSubGroup].symb, //symbolique, readonly
(STARPU_RW | STARPU_COMMUTE_IF_SUPPORTED), cellHandles[idxLevel+1][idxSubGroup].down, //level d'avant readonly (STARPU_RW | STARPU_COMMUTE_IF_SUPPORTED), cellHandles[idxLevel+1][idxSubGroup].down, //level d'avant readonly
#ifdef STARPU_USE_TASK_NAME #ifdef STARPU_USE_TASK_NAME
#ifndef SCALFMM_SIMGRID_TASKNAMEPARAMS #ifdef SCALFMM_SIMGRID_TASKNAMEPARAMS
STARPU_NAME, getTaskNameM2M("l2l", idxLevel, idxGroup, idxLevel+1, idxSubGroup, starpu_mpi_data_get_rank(cellHandles[idxLevel+1][idxSubGroup].down)),
#else
//"L2L-l_nb_i_nbc_ic_s" //"L2L-l_nb_i_nbc_ic_s"
STARPU_NAME, taskNames.print("L2L", "%d, %d, %lld, %d, %lld, %lld\n", STARPU_NAME, taskNames->print("L2L", "%d, %d, %lld, %d, %lld, %lld, %lld, %lld, %lld, %lld, %d\n",
idxLevel, idxLevel,
tree->getCellGroup(idxLevel,idxGroup)->getNumberOfCellsInBlock(), tree->getCellGroup(idxLevel,idxGroup)->getNumberOfCellsInBlock(),
tree->getCellGroup(idxLevel,idxGroup)->getSizeOfInterval(), tree->getCellGroup(idxLevel,idxGroup)->getSizeOfInterval(),
tree->getCellGroup(idxLevel+1,idxSubGroup)->getNumberOfCellsInBlock(), tree->getCellGroup(idxLevel+1,idxSubGroup)->getNumberOfCellsInBlock(),
tree->getCellGroup(idxLevel+1,idxSubGroup)->getSizeOfInterval(), tree->getCellGroup(idxLevel+1,idxSubGroup)->getSizeOfInterval(),
FMath::Min(tree->getCellGroup(idxLevel,idxGroup)->getEndingIndex()-1, (tree->getCellGroup(idxLevel+1,idxSubGroup)->getEndingIndex()-1)>>3)- FMath::Min(tree->getCellGroup(idxLevel,idxGroup)->getEndingIndex()-1, (tree->getCellGroup(idxLevel+1,idxSubGroup)->getEndingIndex()-1)>>3)-
FMath::Max(tree->getCellGroup(idxLevel,idxGroup)->getStartingIndex(), tree->getCellGroup(idxLevel+1,idxSubGroup)->getStartingIndex()>>3)), FMath::Max(tree->getCellGroup(idxLevel,idxGroup)->getStartingIndex(), tree->getCellGroup(idxLevel+1,idxSubGroup)->getStartingIndex()>>3),
tree->getCellGroup(idxLevel, idxGroup)->getStartingIndex(),
tree->getCellGroup(idxLevel, idxGroup)->getEndingIndex(),
tree->getCellGroup(idxLevel+1, idxSubGroup)->getStartingIndex(),
tree->getCellGroup(idxLevel+1, idxSubGroup)->getEndingIndex(),
starpu_mpi_data_get_rank(cellHandles[idxLevel+1][idxSubGroup].down)),
#endif #endif
#endif #endif
0); 0);
...@@ -1444,18 +1435,21 @@ protected: ...@@ -1444,18 +1435,21 @@ protected:
STARPU_R, cellHandles[idxLevel+1][idxSubGroup].symb, //symbolique, readonly STARPU_R, cellHandles[idxLevel+1][idxSubGroup].symb, //symbolique, readonly
STARPU_RW, cellHandles[idxLevel+1][idxSubGroup].down, //level d'avant readonly STARPU_RW, cellHandles[idxLevel+1][idxSubGroup].down, //level d'avant readonly
#ifdef STARPU_USE_TASK_NAME #ifdef STARPU_USE_TASK_NAME
#ifndef SCALFMM_SIMGRID_TASKNAMEPARAMS #ifdef SCALFMM_SIMGRID_TASKNAMEPARAMS
STARPU_NAME, getTaskNameM2M("l2l", idxLevel, idxGroup, idxLevel+1, idxSubGroup, starpu_mpi_data_get_rank(cellHandles[idxLevel+1][idxSubGroup].down)),
#else
//"L2L-l_nb_i_nbc_ic_s" //"L2L-l_nb_i_nbc_ic_s"
STARPU_NAME, taskNames.print("L2L", "%d, %d, %lld, %d, %lld, %lld\n", STARPU_NAME, taskNames->print("L2L", "%d, %d, %lld, %d, %lld, %lld, %lld, %lld, %lld, %lld, %d\n",
idxLevel, idxLevel,
tree->getCellGroup(idxLevel,idxGroup)->getNumberOfCellsInBlock(), tree->getCellGroup(idxLevel,idxGroup)->getNumberOfCellsInBlock(),
tree->getCellGroup(idxLevel,idxGroup)->getSizeOfInterval(), tree->getCellGroup(idxLevel,idxGroup)->getSizeOfInterval(),
tree->getCellGroup(idxLevel+1,idxSubGroup)->getNumberOfCellsInBlock(), tree->getCellGroup(idxLevel+1,idxSubGroup)->getNumberOfCellsInBlock(),
tree->getCellGroup(idxLevel+1,idxSubGroup)->getSizeOfInterval(), tree->getCellGroup(idxLevel+1,idxSubGroup)->getSizeOfInterval(),
FMath::Min(tree->getCellGroup(idxLevel,idxGroup)->getEndingIndex()-1, (tree->getCellGroup(idxLevel+1,idxSubGroup)->getEndingIndex()-1)>>3)- FMath::Min(tree->getCellGroup(idxLevel,idxGroup)->getEndingIndex()-1, (tree->getCellGroup(idxLevel+1,idxSubGroup)->getEndingIndex()-1)>>3)-
FMath::Max(tree->getCellGroup(idxLevel,idxGroup)->getStartingIndex(), tree->getCellGroup(idxLevel+1,idxSubGroup)->getStartingIndex()>>3)), FMath::Max(tree->getCellGroup(idxLevel,idxGroup)->getStartingIndex(), tree->getCellGroup(idxLevel+1,idxSubGroup)->getStartingIndex()>>3),
tree->getCellGroup(idxLevel, idxGroup)->getStartingIndex(),
tree->getCellGroup(idxLevel, idxGroup)->getEndingIndex(),
tree->getCellGroup(idxLevel+1, idxSubGroup)->getStartingIndex(),
tree->getCellGroup(idxLevel+1, idxSubGroup)->getEndingIndex(),
starpu_mpi_data_get_rank(cellHandles[idxLevel+1][idxSubGroup].down)),
#endif #endif
#endif #endif
0); 0);
...@@ -1474,18 +1468,21 @@ protected: ...@@ -1474,18 +1468,21 @@ protected:
STARPU_R, cellHandles[idxLevel+1][idxSubGroup].symb, //symbolique, readonly STARPU_R, cellHandles[idxLevel+1][idxSubGroup].symb, //symbolique, readonly
(STARPU_RW | STARPU_COMMUTE_IF_SUPPORTED), cellHandles[idxLevel+1][idxSubGroup].down, //level d'avant readonly (STARPU_RW | STARPU_COMMUTE_IF_SUPPORTED), cellHandles[idxLevel+1][idxSubGroup].down, //level d'avant readonly
#ifdef STARPU_USE_TASK_NAME #ifdef STARPU_USE_TASK_NAME
#ifndef SCALFMM_SIMGRID_TASKNAMEPARAMS #ifdef SCALFMM_SIMGRID_TASKNAMEPARAMS
STARPU_NAME, getTaskNameM2M("m2l", idxLevel, idxGroup, idxLevel+1, idxSubGroup, starpu_mpi_data_get_rank(cellHandles[idxLevel+1][idxSubGroup].down)),
#else
//"L2L-l_nb_i_nbc_ic_s" //"L2L-l_nb_i_nbc_ic_s"
STARPU_NAME, taskNames.print("L2L", "%d, %d, %lld, %d, %lld, %lld\n", STARPU_NAME, taskNames->print("L2L", "%d, %d, %lld, %d, %lld, %lld, %lld, %lld, %lld, %lld, %d\n",
idxLevel, idxLevel,
tree->getCellGroup(idxLevel,idxGroup)->getNumberOfCellsInBlock(), tree->getCellGroup(idxLevel,idxGroup)->getNumberOfCellsInBlock(),
tree->getCellGroup(idxLevel,idxGroup)->getSizeOfInterval(), tree->getCellGroup(idxLevel,idxGroup)->getSizeOfInterval(),
tree->getCellGroup(idxLevel+1,idxSubGroup)->getNumberOfCellsInBlock(), tree->getCellGroup(idxLevel+1,idxSubGroup)->getNumberOfCellsInBlock(),
tree->getCellGroup(idxLevel+1,idxSubGroup)->getSizeOfInterval(), tree->getCellGroup(idxLevel+1,idxSubGroup)->getSizeOfInterval(),
FMath::Min(tree->getCellGroup(idxLevel,idxGroup)->getEndingIndex()-1, (tree->getCellGroup(idxLevel+1,idxSubGroup)->getEndingIndex()-1)>>3)- FMath::Min(tree->getCellGroup(idxLevel,idxGroup)->getEndingIndex()-1, (tree->getCellGroup(idxLevel+1,idxSubGroup)->getEndingIndex()-1)>>3)-
FMath::Max(tree->getCellGroup(idxLevel,idxGroup)->getStartingIndex(), tree->getCellGroup(idxLevel+1,idxSubGroup)->getStartingIndex()>>3)), FMath::Max(tree->getCellGroup(idxLevel,idxGroup)->getStartingIndex(), tree->getCellGroup(idxLevel+1,idxSubGroup)->getStartingIndex()>>3),
tree->getCellGroup(idxLevel, idxGroup)->getStartingIndex(),
tree->getCellGroup(idxLevel, idxGroup)->getEndingIndex(),
tree->getCellGroup(idxLevel+1, idxSubGroup)->getStartingIndex(),
tree->getCellGroup(idxLevel+1, idxSubGroup)->getEndingIndex(),
starpu_mpi_data_get_rank(cellHandles[idxLevel+1][idxSubGroup].down)),
#endif #endif
#endif #endif
0); 0);
...@@ -1531,18 +1528,21 @@ protected: ...@@ -1531,18 +1528,21 @@ protected:
STARPU_EXECUTE_ON_DATA, particleHandles[interactionid].down, STARPU_EXECUTE_ON_DATA, particleHandles[interactionid].down,
#endif #endif
#ifdef STARPU_USE_TASK_NAME #ifdef STARPU_USE_TASK_NAME
#ifndef SCALFMM_SIMGRID_TASKNAMEPARAMS #ifdef SCALFMM_SIMGRID_TASKNAMEPARAMS
STARPU_NAME, getTaskNameP2P("p2p", idxGroup, interactionid, starpu_mpi_data_get_rank(particleHandles[interactionid].down)),
#else
//"P2P_out-nb_i_p_nb_i_p_s" //"P2P_out-nb_i_p_nb_i_p_s"
STARPU_NAME, taskNames.print("P2P_out", "%d, %lld, %lld, %d, %lld, %lld, %d\n", STARPU_NAME, taskNames->print("P2P_out", "%d, %lld, %lld, %d, %lld, %lld, %d, %lld, %lld, %lld, %lld, %d\n",
tree->getParticleGroup(idxGroup)->getNumberOfLeavesInBlock(), tree->getParticleGroup(idxGroup)->getNumberOfLeavesInBlock(),
tree->getParticleGroup(idxGroup)->getSizeOfInterval(), tree->getParticleGroup(idxGroup)->getSizeOfInterval(),
tree->getParticleGroup(idxGroup)->getNbParticlesInGroup(), tree->getParticleGroup(idxGroup)->getNbParticlesInGroup(),
tree->getParticleGroup(interactionid)->getNumberOfLeavesInBlock(), tree->getParticleGroup(interactionid)->getNumberOfLeavesInBlock(),
tree->getParticleGroup(interactionid)->getSizeOfInterval(), tree->getParticleGroup(interactionid)->getSizeOfInterval(),
tree->getParticleGroup(interactionid)->getNbParticlesInGroup(), tree->getParticleGroup(interactionid)->getNbParticlesInGroup(),
outsideInteractions->size()), outsideInteractions->size(),
tree->getParticleGroup(idxGroup)->getStartingIndex(),
tree->getParticleGroup(idxGroup)->getEndingIndex(),
tree->getParticleGroup(interactionid)->getStartingIndex(),
tree->getParticleGroup(interactionid)->getEndingIndex(),
starpu_mpi_data_get_rank(particleHandles[interactionid].down)),
#endif #endif
#endif #endif
0); 0);
...@@ -1565,14 +1565,17 @@ protected: ...@@ -1565,14 +1565,17 @@ protected:
(STARPU_RW | STARPU_COMMUTE_IF_SUPPORTED), particleHandles[idxGroup].down, (STARPU_RW | STARPU_COMMUTE_IF_SUPPORTED), particleHandles[idxGroup].down,
#endif #endif
#ifdef STARPU_USE_TASK_NAME #ifdef STARPU_USE_TASK_NAME
#ifndef SCALFMM_SIMGRID_TASKNAMEPARAMS #ifdef SCALFMM_SIMGRID_TASKNAMEPARAMS
STARPU_NAME, getTaskNameP2P("p2p", idxGroup, idxGroup, starpu_mpi_data_get_rank(particleHandles[idxGroup].down)),
#else
//"P2P-nb_i_p" //"P2P-nb_i_p"
STARPU_NAME, taskNames.print("P2P", "%d, %lld, %lld\n", STARPU_NAME, taskNames->print("P2P", "%d, %lld, %lld, %lld, %lld, %lld, %lld, %d\n",
tree->getParticleGroup(idxGroup)->getNumberOfLeavesInBlock(), tree->getParticleGroup(idxGroup)->getNumberOfLeavesInBlock(),
tree->getParticleGroup(idxGroup)->getSizeOfInterval(), tree->getParticleGroup(idxGroup)->getSizeOfInterval(),
tree->getParticleGroup(idxGroup)->getNbParticlesInGroup()), tree->getParticleGroup(idxGroup)->getNbParticlesInGroup(),
tree->getParticleGroup(idxGroup)->getStartingIndex(),
tree->getParticleGroup(idxGroup)->getEndingIndex(),
tree->getParticleGroup(idxGroup)->getStartingIndex(),
tree->getParticleGroup(idxGroup)->getEndingIndex(),
starpu_mpi_data_get_rank(particleHandles[idxGroup].down)),
#endif #endif
#endif #endif
0); 0);
...@@ -1609,14 +1612,15 @@ protected: ...@@ -1609,14 +1612,15 @@ protected:
(STARPU_RW | STARPU_COMMUTE_IF_SUPPORTED), particleHandles[idxGroup].down, (STARPU_RW | STARPU_COMMUTE_IF_SUPPORTED), particleHandles[idxGroup].down,
#endif #endif
#ifdef STARPU_USE_TASK_NAME #ifdef STARPU_USE_TASK_NAME
#ifndef SCALFMM_SIMGRID_TASKNAMEPARAMS #ifdef SCALFMM_SIMGRID_TASKNAMEPARAMS
STARPU_NAME, getTaskNameP2M("l2p", idxGroup, starpu_mpi_data_get_rank(particleHandles[idxGroup].down)),
#else
//"L2P-nb_i_p" //"L2P-nb_i_p"
STARPU_NAME, taskNames.print("L2P", "%d, %lld, %lld\n", STARPU_NAME, taskNames->print("L2P", "%d, %lld, %lld, %lld, %lld, %d\n",
tree->getCellGroup(tree->getHeight()-1,idxGroup)->getNumberOfCellsInBlock(), tree->getCellGroup(tree->getHeight()-1,idxGroup)->getNumberOfCellsInBlock(),
tree->getCellGroup(tree->getHeight()-1,idxGroup)->getSizeOfInterval(), tree->getCellGroup(tree->getHeight()-1,idxGroup)->getSizeOfInterval(),
tree->getCellGroup(tree->getHeight()-1,idxGroup)->getNumberOfCellsInBlock()), tree->getCellGroup(tree->getHeight()-1,idxGroup)->getNumberOfCellsInBlock(),
tree->getParticleGroup(idxGroup)->getStartingIndex(),
tree->getParticleGroup(idxGroup)->getEndingIndex(),
starpu_mpi_data_get_rank(particleHandles[idxGroup].down)),
#endif #endif
#endif #endif
0); 0);
......
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
#include "../StarPUUtils/FStarPUReduxCpu.hpp" #include "../StarPUUtils/FStarPUReduxCpu.hpp"
#include "../StarPUUtils/FStarPUTaskNameParams.hpp"
template <class OctreeClass, class CellContainerClass, class KernelClass, class ParticleGroupClass, class StarPUCpuWrapperClass template <class OctreeClass, class CellContainerClass, class KernelClass, class ParticleGroupClass, class StarPUCpuWrapperClass
#ifdef SCALFMM_ENABLE_CUDA_KERNEL #ifdef SCALFMM_ENABLE_CUDA_KERNEL
...@@ -149,14 +150,7 @@ protected: ...@@ -149,14 +150,7 @@ protected:
#endif #endif
#ifdef STARPU_USE_TASK_NAME #ifdef STARPU_USE_TASK_NAME
std::vector<std::unique_ptr<char[]>> m2mTaskNames; FStarPUTaskNameParams taskNames;
std::vector<std::unique_ptr<char[]>> m2lTaskNames;
std::vector<std::unique_ptr<char[]>> m2lOuterTaskNames;
std::vector<std::unique_ptr<char[]>> l2lTaskNames;
std::unique_ptr<char[]> p2mTaskNames;
std::unique_ptr<char[]> l2pTaskNames;
std::unique_ptr<char[]> p2pTaskNames;
std::unique_ptr<char[]> p2pOuterTaskNames;
#endif #endif
#ifdef SCALFMM_STARPU_USE_PRIO #ifdef SCALFMM_STARPU_USE_PRIO
typedef FStarPUFmmPrioritiesV2 PrioClass;// FStarPUFmmPriorities typedef FStarPUFmmPrioritiesV2 PrioClass;// FStarPUFmmPriorities
...@@ -177,6 +171,9 @@ public: ...@@ -177,6 +171,9 @@ public:
#endif #endif
#ifdef SCALFMM_ENABLE_OPENCL_KERNEL #ifdef SCALFMM_ENABLE_OPENCL_KERNEL
openclWrapper(tree->getHeight()), openclWrapper(tree->getHeight()),
#endif
#ifdef STARPU_USE_TASK_NAME
taskNames(inComm.processId()),
#endif #endif
wrapperptr(&wrappers){ wrapperptr(&wrappers){
FAssertLF(tree, "tree cannot be null"); FAssertLF(tree, "tree cannot be null");
...@@ -229,7 +226,6 @@ public: ...@@ -229,7 +226,6 @@ public:
#ifdef STARPU_SUPPORT_ARBITER #ifdef STARPU_SUPPORT_ARBITER
arbiterGlobal = starpu_arbiter_create(); arbiterGlobal = starpu_arbiter_create();
#endif #endif
initCodelet(); initCodelet();
initCodeletMpi(); initCodeletMpi();
rebuildInteractions(); rebuildInteractions();
...@@ -251,32 +247,6 @@ public: ...@@ -251,32 +247,6 @@ public:
} }
void buildTaskNames(){ void buildTaskNames(){
#ifdef STARPU_USE_TASK_NAME
const int namesLength = 128;
m2mTaskNames.resize(tree->getHeight());
m2lTaskNames.resize(tree->getHeight());
m2lOuterTaskNames.resize(tree->getHeight());
l2lTaskNames.resize(tree->getHeight());
for(int idxLevel = 0 ; idxLevel < tree->getHeight() ; ++idxLevel){
m2mTaskNames[idxLevel].reset(new char[namesLength]);
snprintf(m2mTaskNames[idxLevel].get(), namesLength, "M2M-level-%d", idxLevel);
m2lTaskNames[idxLevel].reset(new char[namesLength]);
snprintf(m2lTaskNames[idxLevel].get(), namesLength, "M2L-level-%d", idxLevel);
m2lOuterTaskNames[idxLevel].reset(new char[namesLength]);
snprintf(m2lOuterTaskNames[idxLevel].get(), namesLength, "M2L-out-level-%d", idxLevel);
l2lTaskNames[idxLevel].reset(new char[namesLength]);
snprintf(l2lTaskNames[idxLevel].get(), namesLength, "L2L-level-%d", idxLevel);
}
p2mTaskNames.reset(new char[namesLength]);
snprintf(p2mTaskNames.get(), namesLength, "P2M");
l2pTaskNames.reset(new char[namesLength]);
snprintf(l2pTaskNames.get(), namesLength, "L2P");
p2pTaskNames.reset(new char[namesLength]);
snprintf(p2pTaskNames.get(), namesLength, "P2P");
p2pOuterTaskNames.reset(new char[namesLength]);
snprintf(p2pOuterTaskNames.get(), namesLength, "P2P-out");
#endif
} }
void syncData(){ void syncData(){
...@@ -459,68 +429,6 @@ protected: ...@@ -459,68 +429,6 @@ protected:
FTIME_TASKS(cpuWrapper.taskTimeRecorder.saveToDisk("/tmp/taskstime-FGroupTaskStarPUAlgorithm.txt")); FTIME_TASKS(cpuWrapper.taskTimeRecorder.saveToDisk("/tmp/taskstime-FGroupTaskStarPUAlgorithm.txt"));
#endif #endif
}