Commit 06742e8c authored by Luka Stanisic's avatar Luka Stanisic

wrapping MLR model changes for calibration and simulation with a new option

parent 2ec4a036
......@@ -96,7 +96,9 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
option( OPENMP_SUPPORT_TASK_NAME "Set to ON to enable a taskname clause for tasks (KSTAR/StarPU compiler only)" OFF )
option( SCALFMM_DISABLE_NATIVE_OMP4 "Set to ON to disable the gcc/intel omp4" OFF )
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( 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)
......
......@@ -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);
}
......
......@@ -163,5 +163,6 @@ const std::string SCALFMMCompileLibs("@SCALFMM_COMPILE_LIBS@");
///////////////////////////////////////////////////////
#cmakedefine SCALFMM_SIMGRID_NODATA
#cmakedefine STARPU_SIMGRID_MLR_MODELS
#endif // CONFIG_H
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