Commit dace132b authored by BRAMAS Berenger's avatar BRAMAS Berenger

update the task name to use simgrid

parent 48c0856a
...@@ -97,6 +97,7 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/ ...@@ -97,6 +97,7 @@ 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" 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 ) option( SCALFMM_TIME_OMPTASKS "Set to ON to time omp4 tasks and generate output file" OFF )
option( SCALFMM_SIMGRID_NODATA "Set to ON to avoid the allocation of numerical parts in the group tree" OFF ) 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 # 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_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_REDUX "Set to ON to enable redux with StarPU" OFF "SCALFMM_USE_STARPU" OFF)
......
#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;
public:
FStarPUTaskNameParams(){
}
~FStarPUTaskNameParams(){
clear();
}
void clear(){
while(names.size()){
delete[] names.front();
names.pop_front();
}
}
template <typename ... Params>
const char* print(const char format[], Params... args ){
const size_t length = 512;
char* name = new char[length+1];
snprintf(name, format, args...);
name[length] = '\0';
names.push_back(name);
return name;
}
const char* add(const char* strToCpy){
const size_t length = strlen(strToCpy);
char* cpy = new char[length+1];
memcpy(cpy, strToCpy, length);
cpy[length] = '\0';
names.push_back(cpy);
return cpy;
}
};
#endif // FSTARPUTASKNAMEPARAMS_HPP
...@@ -163,5 +163,6 @@ const std::string SCALFMMCompileLibs("@SCALFMM_COMPILE_LIBS@"); ...@@ -163,5 +163,6 @@ const std::string SCALFMMCompileLibs("@SCALFMM_COMPILE_LIBS@");
/////////////////////////////////////////////////////// ///////////////////////////////////////////////////////
#cmakedefine SCALFMM_SIMGRID_NODATA #cmakedefine SCALFMM_SIMGRID_NODATA
#cmakedefine SCALFMM_SIMGRID_TASKNAMEPARAMS
#endif // CONFIG_H #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