Commit 03f041bf authored by COULAUD Olivier's avatar COULAUD Olivier
parents ce1151d8 41ecd20c
......@@ -114,13 +114,15 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
option( SCALFMM_DISABLE_NATIVE_OMP4 "Set to ON to disable the gcc/intel omp4" ON )
endif()
option( SCALFMM_TIME_OMPTASKS "Set to ON to time omp4 tasks and generate output file" OFF )
# SIMGRID and peformance models options
option( SCALFMM_SIMGRID_NODATA "Set to ON to avoid the allocation of numerical parts in the group tree" OFF )
option( SCALFMM_SIMGRID_TASKNAMEPARAMS "Set to ON to have verbose information in the task name" OFF )
# STARPU options
option( STARPU_SIMGRID_MLR_MODELS "Set to ON to enable MLR models need for calibration and simulation" OFF )
# STARPU options
CMAKE_DEPENDENT_OPTION(SCALFMM_STARPU_USE_COMMUTE "Set to ON to enable commute with StarPU" ON "SCALFMM_USE_STARPU" OFF)
CMAKE_DEPENDENT_OPTION(SCALFMM_STARPU_USE_REDUX "Set to ON to enable redux with StarPU" OFF "SCALFMM_USE_STARPU" OFF)
CMAKE_DEPENDENT_OPTION(SCALFMM_STARPU_USE_PRIO "Set to ON to enable priority with StarPU" ON "SCALFMM_USE_STARPU" OFF)
CMAKE_DEPENDENT_OPTION(SCALFMM_STARPU_FORCE_NO_SCHEDULER "Set to ON to disable heteroprio even if supported" OFF "SCALFMM_USE_STARPU" OFF)
CMAKE_DEPENDENT_OPTION(SCALFMM_USE_STARPU_EXTRACT "Set to ON to enable extract with StarPU mpi implicit" ON "SCALFMM_USE_STARPU" OFF)
endif()
message(STATUS "AVANT ${CMAKE_CXX_COMPILER_ID}" )
#
......@@ -599,6 +601,10 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
set(SCALFMM_INCLUDES "${SCALFMM_INCLUDES}; ${STARPU_INCLUDE_DIRS}")
endif()
# Adding SimGrid includes
set(SCALFMM_INCLUDES "${SCALFMM_INCLUDES};$ENV{SIMGRID_INCLUDE}")
message(STATUS " Adding SIMGRID = $ENV{SIMGRID_INCLUDE}")
# TODO: replace this by a component of find starpu
OPTION( SCALFMM_USE_OPENCL "Set to ON to use OPENCL with StarPU" OFF )
MESSAGE( STATUS "SCALFMM_USE_OPENCL = ${SCALFMM_USE_OPENCL}" )
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -213,11 +213,12 @@ protected:
CellClass* potentialChild[8];
CellClass** const realChild = iterArray[idxCell].getCurrentChild();
CellClass* const currentCell = iterArray[idxCell].getCurrentCell();
int nbChildWithSrc = 0;
for(int idxChild = 0 ; idxChild < 8 ; ++idxChild){
potentialChild[idxChild] = nullptr;
if(realChild[idxChild]){
if(realChild[idxChild]->hasSrcChild()){
currentCell->setSrcChildTrue();
nbChildWithSrc += 1;
potentialChild[idxChild] = realChild[idxChild];
}
if(realChild[idxChild]->hasTargetsChild()){
......@@ -225,7 +226,10 @@ protected:
}
}
}
myThreadkernels->M2M( currentCell , potentialChild, idxLevel);
if(nbChildWithSrc){
currentCell->setSrcChildTrue();
myThreadkernels->M2M( currentCell , potentialChild, idxLevel);
}
}
}
FLOG(computationCounter.tac());
......
......@@ -124,8 +124,7 @@ void unifRandomPointsInBall(const FSize N, const FReal R, FReal* points) {
* \param points array of size 4*N and stores data as follow x,y,z,0,x,y,z,0....
*/
template <class FReal>
void nonunifRandomPointsOnElipsoid(const FSize N, const FReal& a, const FReal& b,
const FReal& c, FReal* points)
void nonunifRandomPointsOnElipsoid(const FSize N, const FReal& a, const FReal& b, const FReal& c, FReal* points)
{
#ifdef SCALFMM_OLD_ELLIPSOID
FReal u, v, cosu;
......@@ -193,6 +192,11 @@ void nonunifRandomPointsOnElipsoid(const FSize N, const FReal& a, const FReal& b
}
template <class FReal>
void nonunifRandomPointsOnElipsoid(const FSize N, const FReal& a, const FReal& b, FReal* points){
nonunifRandomPointsOnElipsoid(N, a, b, FReal(1), points);
}
/**
* \brief Generate N points uniformly distributed on the ellipsoid of aspect ratio a:a:c
*
......
......@@ -408,7 +408,7 @@ public:
<< " from " << pack.elementFrom << " to " << pack.elementTo << " \n"; FLog::Controller.flush(); );
// Send the size of the data
requestsNbParts.emplace_back();
FMpi::MpiAssert(MPI_Isend(const_cast<long long int*>(&nbPartsPerPackToSend),1,MPI_LONG_LONG_INT,pack.idProc,
FMpi::MpiAssert(MPI_Isend((void*)&nbPartsPerPackToSend,1,MPI_LONG_LONG_INT,pack.idProc,
FMpi::TagExchangeIndexs, communicator.getComm(), &requestsNbParts.back()),__LINE__);
}
......@@ -580,7 +580,6 @@ public:
// for(int idx = 0 ; idx < nbParticlesInArray ; ++idx){
// particleSaver->push(sortedParticlesArray[idx].particle);
// }
ParticleClass* particlesArrayInLeafOrder = nullptr;
FSize * leavesOffsetInParticles = nullptr;
FSize nbLeaves = 0;
......
......@@ -401,6 +401,90 @@ public:
));
}
}
/** Extract for implicit MPI */
size_t extractGetSizeSymbUp(const std::vector<int>& cellsToExtract) const {
return cellsToExtract.size() * (sizeof(SymboleCellClass) + sizeof(PoleCellClass));
}
void extractDataUp(const std::vector<int>& cellsToExtract,
unsigned char* outputBuffer, const size_t outputBufferSize) const {
FAssertLF(outputBuffer || outputBufferSize == 0);
size_t idxValue = 0;
for(size_t idxEx = 0 ; idxEx < cellsToExtract.size() ; ++idxEx){
const int idCell = cellsToExtract[idxEx];
FAssertLF(idCell < blockHeader->numberOfCellsInBlock);
memcpy(&outputBuffer[idxValue],
&blockCells[idCell],
sizeof(SymboleCellClass));
idxValue += sizeof(SymboleCellClass);
FAssertLF(idxValue <= outputBufferSize);
memcpy(&outputBuffer[idxValue],
&cellMultipoles[idCell],
sizeof(PoleCellClass));
idxValue += sizeof(PoleCellClass);
FAssertLF(idxValue <= outputBufferSize);
}
FAssertLF(idxValue == outputBufferSize);
}
void restoreDataUp(const std::vector<int>& cellsToExtract,
const unsigned char* intputBuffer, const size_t inputBufferSize){
size_t idxValue = 0;
for(size_t idxEx = 0 ; idxEx < cellsToExtract.size() ; ++idxEx){
const int idCell = cellsToExtract[idxEx];
memcpy(&blockCells[idCell],
&intputBuffer[idxValue],
sizeof(SymboleCellClass));
idxValue += sizeof(SymboleCellClass);
memcpy(&cellMultipoles[idCell],
&intputBuffer[idxValue],
sizeof(PoleCellClass));
idxValue += sizeof(PoleCellClass);
}
FAssertLF(idxValue == inputBufferSize);
}
size_t extractGetSizeSymbDown(const std::vector<int>& cellsToExtract) const {
return cellsToExtract.size() * (sizeof(SymboleCellClass) + sizeof(LocalCellClass));
}
void extractDataDown(const std::vector<int>& cellsToExtract,
unsigned char* outputBuffer, const size_t outputBufferSize) const {
size_t idxValue = 0;
for(size_t idxEx = 0 ; idxEx < cellsToExtract.size() ; ++idxEx){
const int idCell = cellsToExtract[idxEx];
memcpy(&outputBuffer[idxValue],
&blockCells[idCell],
sizeof(SymboleCellClass));
idxValue += sizeof(SymboleCellClass);
memcpy(&outputBuffer[idxValue],
&cellLocals[idCell],
sizeof(PoleCellClass));
idxValue += sizeof(PoleCellClass);
}
FAssertLF(idxValue == outputBufferSize);
}
void restoreDataDown(const std::vector<int>& cellsToExtract,
const unsigned char* intputBuffer, const size_t inputBufferSize){
size_t idxValue = 0;
for(size_t idxEx = 0 ; idxEx < cellsToExtract.size() ; ++idxEx){
const int idCell = cellsToExtract[idxEx];
memcpy(&blockCells[idCell],
&intputBuffer[idxValue],
sizeof(SymboleCellClass));
idxValue += sizeof(SymboleCellClass);
memcpy(&cellLocals[idCell],
&intputBuffer[idxValue],
sizeof(PoleCellClass));
idxValue += sizeof(PoleCellClass);
}
FAssertLF(idxValue == inputBufferSize);
}
};
......
......@@ -345,6 +345,50 @@ public:
#endif
blockHeader->attributeLeadingDim);
}
/** Extract methods */
size_t getExtractBufferSize(const std::vector<int>& inLeavesIdxToExtract) const {
size_t totalSize = 0;
for(size_t idxEx = 0 ; idxEx < inLeavesIdxToExtract.size() ; ++idxEx){
const int idLeaf = inLeavesIdxToExtract[idxEx];
totalSize += leafHeader[idLeaf].nbParticles*sizeof(FReal)*NbSymbAttributes;
}
return totalSize;
}
void extractData(const std::vector<int>& inLeavesIdxToExtract,
unsigned char* outputBuffer, const size_t outputBufferSize) const {
size_t idxValue = 0;
for(size_t idxEx = 0 ; idxEx < inLeavesIdxToExtract.size() ; ++idxEx){
const int idLeaf = inLeavesIdxToExtract[idxEx];
for(unsigned idxAttr = 0 ; idxAttr < NbSymbAttributes ; ++idxAttr){
const FReal* ptrData = particlePosition[0] + leafHeader[idLeaf].offSet
+ blockHeader->positionsLeadingDim*idxAttr;
for(int idxPart = 0 ; idxPart < leafHeader[idLeaf].nbParticles ; ++idxPart){
((FReal*)outputBuffer)[idxValue++] = ptrData[idxPart];
}
}
}
FAssertLF(idxValue*sizeof(FReal) == outputBufferSize);
}
void restoreData(const std::vector<int>& inLeavesIdxToExtract,
const unsigned char* intputBuffer, const size_t inputBufferSize){
size_t idxValue = 0;
for(size_t idxEx = 0 ; idxEx < inLeavesIdxToExtract.size() ; ++idxEx){
const int idLeaf = inLeavesIdxToExtract[idxEx];
for(unsigned idxAttr = 0 ; idxAttr < NbSymbAttributes ; ++idxAttr){
FReal* ptrData = particlePosition[0] + leafHeader[idLeaf].offSet
+ blockHeader->positionsLeadingDim*idxAttr;
for(int idxPart = 0 ; idxPart < leafHeader[idLeaf].nbParticles ; ++idxPart){
ptrData[idxPart] = ((const FReal*)intputBuffer)[idxValue++];
}
}
}
FAssertLF(idxValue*sizeof(FReal) == inputBufferSize);
}
};
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
#ifndef __STARPU_CODELET_PARAMETERS_H__
#define __STARPU_CODELET_PARAMETERS_H__
#include <starpu.h>
#include "../StarPUUtils/FStarPUUtils.hpp"
#ifdef __cplusplus
extern "C"
{
#endif
/* P2P */
static const char *p2p_cl_in_parameters_names[] = { "NbLeavesBlock", "SizeInterval", "NbParticlesGroup", "NbInteractions" };
static unsigned p2p_cl_in_combi1 [4] = { 0, 0, 1, 0 };
static unsigned p2p_cl_in_combi2 [4] = { 0, 0, 0, 1 };
static unsigned *p2p_cl_in_combinations[] = { p2p_cl_in_combi1, p2p_cl_in_combi2 };
static inline void p2p_cl_in_perf_func(struct starpu_task *task, double *parameters){
FStarPUPtrInterface* wrapperptr;
int i;
starpu_codelet_unpack_args(task->cl_arg,
&wrapperptr,
&i,
&parameters[0],
&parameters[1],
&parameters[2],
&parameters[3]);
}
/* P2P_out */
static const char *p2p_cl_inout_parameters_names[] = { "NbLeavesBlock", "SizeInterval", "NbParticlesGroup", "iNbLeavesBlock", "iSizeInterval", "iNBParticlesGroup", "OutsideInteractionsSize", "NbDiff0", "NbDiff1", "NbInteractions" };
static unsigned p2p_cl_inout_combi1 [10] = { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 };
static unsigned p2p_cl_inout_combi2 [10] = { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 };
static unsigned p2p_cl_inout_combi3 [10] = { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 };
static unsigned p2p_cl_inout_combi4 [10] = { 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 };
static unsigned p2p_cl_inout_combi5 [10] = { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 };
static unsigned p2p_cl_inout_combi6 [10] = { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0 };
static unsigned p2p_cl_inout_combi7 [10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 };
static unsigned *p2p_cl_inout_combinations[] = { p2p_cl_inout_combi1, p2p_cl_inout_combi2, p2p_cl_inout_combi3, p2p_cl_inout_combi4, p2p_cl_inout_combi5, p2p_cl_inout_combi6, p2p_cl_inout_combi7 };
static inline void p2p_cl_inout_perf_func(struct starpu_task *task, double *parameters){
FStarPUPtrInterface* wrapperptr;
std::vector<OutOfBlockInteraction>* outsideInteractions;
int i;
starpu_codelet_unpack_args(task->cl_arg,
&wrapperptr,
&outsideInteractions,
&i,
&parameters[0],
&parameters[1],
&parameters[2],
&parameters[3],
&parameters[4],
&parameters[5],
&parameters[6],
&parameters[7],
&parameters[8],
&parameters[9]);
}
/* P2M */
static const char *p2m_cl_parameters_names[] = { "NbCellsBlock", "SizeInterval", "NbParticlesGroup" };
static unsigned p2m_cl_combi1 [3] = { 0, 0, 1 };
static unsigned *p2m_cl_combinations[] = { p2m_cl_combi1 };
static inline void p2m_cl_perf_func(struct starpu_task *task, double *parameters){
FStarPUPtrInterface* wrapperptr;
int i;
starpu_codelet_unpack_args(task->cl_arg,
&wrapperptr,
&i,
&parameters[0],
&parameters[1],
&parameters[2]);
}
/* M2M */
static const char *m2m_cl_parameters_names[] = { "Lvl", "NbCellsBlock", "SizeInterval", "NbCellsBlockLvl+1", "SizeIntervalLvl+1", "NbDiff", "NbChildParent" };
static unsigned m2m_cl_combi1 [7] = { 0, 0, 0, 0, 0, 1, 0 };
static unsigned m2m_cl_combi2 [7] = { 0, 0, 0, 0, 1, 1, 0 };
static unsigned *m2m_cl_combinations[] = { m2m_cl_combi1, m2m_cl_combi2 };
static inline void m2m_cl_perf_func(struct starpu_task *task, double *parameters){
FStarPUPtrInterface* wrapperptr;
int idxLevel, i;
starpu_codelet_unpack_args(task->cl_arg,
&wrapperptr,
&idxLevel,
&i,
&parameters[0],
&parameters[1],
&parameters[2],
&parameters[3],
&parameters[4],
&parameters[5],
&parameters[6]);
}
/* M2L */
static const char *m2l_cl_in_parameters_names[] = { "Lvl", "NbLeavesBlock", "SizeInterval", "NbM2LInteractions" };
static unsigned m2l_cl_in_combi1 [4] = { 0, 0, 0, 1 };
static unsigned *m2l_cl_in_combinations[] = { m2l_cl_in_combi1 };
static inline void m2l_cl_in_perf_func(struct starpu_task *task, double *parameters){
FStarPUPtrInterface* wrapperptr;
int idxLevel, i;
starpu_codelet_unpack_args(task->cl_arg,
&wrapperptr,
&idxLevel,
&i,
&parameters[0],
&parameters[1],
&parameters[2],
&parameters[3]);
}
/* M2L_out */
static const char *m2l_cl_inout_parameters_names[] = { "Lvl", "NbLeavesBlock", "SizeInterval", "iNbLeavesBlock", "iSizeInterval", "OutsideInteractionsSize", "NbDiff0", "NbDiff1" };
static unsigned m2l_cl_inout_combi1 [8] = { 0, 0, 0, 0, 0, 1, 0, 0 };
static unsigned m2l_cl_inout_combi2 [8] = { 0, 0, 0, 0, 0, 0, 1, 0 };
static unsigned *m2l_cl_inout_combinations[] = { m2l_cl_inout_combi1, m2l_cl_inout_combi2 };
static inline void m2l_cl_inout_perf_func(struct starpu_task *task, double *parameters){
FStarPUPtrInterface* wrapperptr;
const std::vector<OutOfBlockInteraction>* outsideInteractions;
int idxLevel, i, m;
starpu_codelet_unpack_args(task->cl_arg,
&wrapperptr,
&idxLevel,
&outsideInteractions,
&i,
&m,
&parameters[0],
&parameters[1],
&parameters[2],
&parameters[3],
&parameters[4],
&parameters[5],
&parameters[6],
&parameters[7]);
}
/* L2L */
static const char *l2l_cl_parameters_names[] = { "Lvl", "NbCellsBlock", "SizeInterval", "NbCellsBlockLvl+1", "SizeIntervalLvl+1", "NbDiff", "NbChildParent" };
static unsigned l2l_cl_combi1 [7] = { 0, 0, 0, 0, 0, 1, 0 };
static unsigned *l2l_cl_combinations[] = { l2l_cl_combi1 };
static inline void l2l_cl_perf_func(struct starpu_task *task, double *parameters){
FStarPUPtrInterface* wrapperptr;
int idxLevel, i;
starpu_codelet_unpack_args(task->cl_arg,
&wrapperptr,
&idxLevel,
&i,
&parameters[0],
&parameters[1],
&parameters[2],
&parameters[3],
&parameters[4],
&parameters[5],
&parameters[6]);
}
/* L2L_NOCOMMUTE */
static const char *l2l_cl_nocommute_parameters_names[] = { "Lvl", "NbCellsBlock", "SizeInterval", "NbCellsBlockLvl+1", "SizeIntervalLvl+1", "NbDiff", "NbChildParent" };
static unsigned l2l_cl_nocommute_combi1 [7] = { 0, 0, 0, 0, 0, 1, 0 };
static unsigned *l2l_cl_nocommute_combinations[] = { l2l_cl_nocommute_combi1 };
static inline void l2l_cl_nocommute_perf_func(struct starpu_task *task, double *parameters){
FStarPUPtrInterface* wrapperptr;
int idxLevel, i;
starpu_codelet_unpack_args(task->cl_arg,
&wrapperptr,
&idxLevel,
&i,
&parameters[0],
&parameters[1],
&parameters[2],
&parameters[3],
&parameters[4],
&parameters[5],
&parameters[6]);
}
/* L2P */
static const char *l2p_cl_parameters_names[] = { "NbCellsBlock", "SizeInterval", "NbParticlesGroup" };
static unsigned l2p_cl_combi1 [3] = { 0, 0, 1 };
static unsigned *l2p_cl_combinations[] = { l2p_cl_combi1 };
static inline void l2p_cl_perf_func(struct starpu_task *task, double *parameters){
FStarPUPtrInterface* wrapperptr;
int i;
starpu_codelet_unpack_args(task->cl_arg,
&wrapperptr,
&i,
&parameters[0],
&parameters[1],
&parameters[2],
&parameters[3]);
}
#ifdef __cplusplus
}
#endif
#endif /* __STARPU_CODELET_PARAMETERS_H__ */
......@@ -102,7 +102,11 @@ public:
FStarPUPtrInterface* worker = nullptr;
int intervalSize;
#ifdef STARPU_SIMGRID_MLR_MODELS
starpu_codelet_unpack_args(cl_arg, &worker, &intervalSize, NULL);
#else
starpu_codelet_unpack_args(cl_arg, &worker, &intervalSize);
#endif
worker->get<ThisClass>(FSTARPU_CPU_IDX)->bottomPassPerform(&leafCells, &containers);
}
......@@ -132,7 +136,11 @@ public:
FStarPUPtrInterface* worker = nullptr;
int idxLevel = 0;
int intervalSize;
#ifdef STARPU_SIMGRID_MLR_MODELS
starpu_codelet_unpack_args(cl_arg, &worker, &idxLevel, &intervalSize, NULL);
#else
starpu_codelet_unpack_args(cl_arg, &worker, &idxLevel, &intervalSize);
#endif
CellContainerClass subCellGroup(
(unsigned char*)STARPU_VARIABLE_GET_PTR(buffers[2]),
......@@ -243,7 +251,11 @@ public:
FStarPUPtrInterface* worker = nullptr;
int idxLevel = 0;
int intervalSize;
#ifdef STARPU_SIMGRID_MLR_MODELS
starpu_codelet_unpack_args(cl_arg, &worker, &idxLevel, &intervalSize, NULL);
#else
starpu_codelet_unpack_args(cl_arg, &worker, &idxLevel, &intervalSize);
#endif
worker->get<ThisClass>(FSTARPU_CPU_IDX)->transferInPassPerform(&currentCells, idxLevel);
}
......@@ -301,7 +313,11 @@ public:
const std::vector<OutOfBlockInteraction>* outsideInteractions;
int intervalSize;
int mode = 0;
#ifdef STARPU_SIMGRID_MLR_MODELS
starpu_codelet_unpack_args(cl_arg, &worker, &idxLevel, &outsideInteractions, &intervalSize, &mode, NULL);
#else
starpu_codelet_unpack_args(cl_arg, &worker, &idxLevel, &outsideInteractions, &intervalSize, &mode);
#endif
worker->get<ThisClass>(FSTARPU_CPU_IDX)->transferInoutPassPerform(&currentCells, &externalCells, idxLevel, outsideInteractions, mode);
}
......@@ -353,7 +369,11 @@ public:
FStarPUPtrInterface* worker = nullptr;
int idxLevel = 0;
int intervalSize;
#ifdef STARPU_SIMGRID_MLR_MODELS
starpu_codelet_unpack_args(cl_arg, &worker, &idxLevel, &intervalSize, NULL);
#else
starpu_codelet_unpack_args(cl_arg, &worker, &idxLevel, &intervalSize);
#endif
CellContainerClass subCellGroup(
(unsigned char*)STARPU_VARIABLE_GET_PTR(buffers[2]),
......@@ -457,7 +477,11 @@ public:
FStarPUPtrInterface* worker = nullptr;
int intervalSize;
#ifdef STARPU_SIMGRID_MLR_MODELS
starpu_codelet_unpack_args(cl_arg, &worker, &intervalSize, NULL);
#else
starpu_codelet_unpack_args(cl_arg, &worker, &intervalSize);
#endif
worker->get<ThisClass>(FSTARPU_CPU_IDX)->directInPassPerform(&containers);
}
......@@ -506,7 +530,11 @@ public:
FStarPUPtrInterface* worker = nullptr;
const std::vector<OutOfBlockInteraction>* outsideInteractions = nullptr;
int intervalSize;
#ifdef STARPU_SIMGRID_MLR_MODELS
starpu_codelet_unpack_args(cl_arg, &worker, &outsideInteractions, &intervalSize, NULL);
#else
starpu_codelet_unpack_args(cl_arg, &worker, &outsideInteractions, &intervalSize);
#endif
worker->get<ThisClass>(FSTARPU_CPU_IDX)->directInoutPassPerform(&containers, &externalContainers, outsideInteractions);
}
......@@ -547,7 +575,11 @@ public:
FStarPUPtrInterface* worker = nullptr;
int intervalSize;
#ifdef STARPU_SIMGRID_MLR_MODELS
starpu_codelet_unpack_args(cl_arg, &worker, &intervalSize, NULL);
#else
starpu_codelet_unpack_args(cl_arg, &worker, &intervalSize);
#endif
worker->get<ThisClass>(FSTARPU_CPU_IDX)->mergePassPerform(&leafCells, &containers);
}
......
......@@ -706,7 +706,7 @@ static struct starpu_task *pop_task_heteroprio_policy(unsigned sched_ctx_id)
if(child_sched_ctx != STARPU_NMAX_SCHED_CTXS){
starpu_sched_ctx_revert_task_counters(sched_ctx_id, task->flops);
#if (STARPU_MAJOR_VERSION >= 1) && (STARPU_MINOR_VERSION >= 3)
starpu_sched_ctx_move_task_to_ctx(task, child_sched_ctx, 1);
starpu_sched_ctx_move_task_to_ctx(task, child_sched_ctx, 1, 1);
#else
starpu_sched_ctx_move_task_to_ctx(task, child_sched_ctx);
#endif
......
#ifndef FSTARPUTASKNAMEPARAMS_HPP
#define FSTARPUTASKNAMEPARAMS_HPP
#include "../../Utils/FGlobal.hpp"
#include <list>
#include <cstring>
#include <cstdio>
/**
* This class creates task name for starpu
* it is used for simgrid (to pass task parameters)
*/
class FStarPUTaskNameParams{
protected:
std::list<const char*> names;
FILE* fout;
int taskid;
public:
FStarPUTaskNameParams() : fout(nullptr), taskid(0){
const char* fname = getenv("SCALFMM_SIMGRIDOUT")?getenv("SCALFMM_SIMGRIDOUT"):"/tmp/scalfmm.out";
fout = fopen(fname, "w");
std::cout << "output task name in " << fname << "\n";
}
~FStarPUTaskNameParams(){
fclose(fout);
clear();
}
void clear(){
while(names.size()){
delete[] names.front();
names.pop_front();
}
}
template <typename ... Params>
const char* print(const char key[], const char format[], Params... args ){
const size_t length = 512;
char* name = new char[length+1];
snprintf(name, length, "%s_%d", key, taskid++);
name[length] = '\0';
names.push_back(name);
fprintf(fout, "%s, %d, ", key, taskid);
fprintf(fout, format, args...);
return name;
}
const char* add(const char key[], const char* strToCpy){
const size_t length = 512;
char* name = new char[length+1];
snprintf(name, length, "%s_%d", key, taskid++);
name[length] = '\0';
names.push_back(name);
fprintf(fout, "%s=", name);
fprintf(fout, strToCpy);
return name;
}
};
#endif // FSTARPUTASKNAMEPARAMS_HPP
......@@ -11,32 +11,42 @@
/////////////////////////////////////////////////////
#if (STARPU_MAJOR_VERSION >= 1) && (STARPU_MINOR_VERSION >= 3) && defined(SCALFMM_STARPU_USE_COMMUTE)
#if (STARPU_MAJOR_VERSION >= 1) && (STARPU_MINOR_VERSION >= 2) && defined(SCALFMM_STARPU_USE_COMMUTE)
#define STARPU_SUPPORT_COMMUTE
#else
#warning StarPU Commute is not supported
#if defined(SCALFMM_STARPU_USE_COMMUTE)
#error StarPU Commute is not supported
#else
#warning StarPU Commute is not enabled
#endif
#endif
#if (STARPU_MAJOR_VERSION >= 1) && (STARPU_MINOR_VERSION >= 3)
#if (STARPU_MAJOR_VERSION >= 1) && (STARPU_MINOR_VERSION >= 2)
#define STARPU_SUPPORT_ARBITER
#else
#warning StarPU Arbiter is not supported
#endif
#if (STARPU_MAJOR_VERSION >= 1) && (STARPU_MINOR_VERSION >= 3) && defined(SCALFMM_STARPU_USE_PRIO) && !defined(SCALFMM_STARPU_FORCE_NO_SCHEDULER)
#if (STARPU_MAJOR_VERSION >= 1) && (STARPU_MINOR_VERSION >= 2) && !defined(SCALFMM_STARPU_USE_PRIO)
#warning Priorities is not supported
#endif
#if (STARPU_MAJOR_VERSION >= 1) && (STARPU_MINOR_VERSION >= 2) && defined(SCALFMM_STARPU_USE_PRIO) && !defined(SCALFMM_STARPU_FORCE_NO_SCHEDULER)
#define STARPU_SUPPORT_SCHEDULER
#else