Commit 8bbb3bda authored by Luka Stanisic's avatar Luka Stanisic

improving the format of the simgrid names output

parents db5262bd 14a6b1c0
......@@ -732,6 +732,7 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
##################################################################
# Remove compilation of the drivers #
##################################################################
message(STATUS "SCALFMM_BUILD_EXAMPLES = ${SCALFMM_BUILD_EXAMPLES}" )
if( SCALFMM_BUILD_EXAMPLES )
# Build - Examples and drivers
add_subdirectory(Examples)
......
......@@ -7,9 +7,18 @@ This file contains the main features as well as overviews of specific
bug fixes (and other actions) for each version of ScalFMM since
version 1.1
1.5
-----
- improvements of the MPI version of ScalFMM
- ScalFMM on StarPu (runtime system) is available
- Add P2P ?? on GPU
- Add GPU version for ufmm (interpolation FMM based on uniform grid points)
-
1.4
-----
- Add interpolation FMM based on uniform grid points
- Add interpolation FMM based on uniform grid points (ufmm)
- Add the group tree and the things related to starpu (runtime system)
- Change the P2P (it is now done by tree functions in the abstract kernel) refer to the P2P page of the doc
- Update the P2P/M2L prototype, the position of the elements is known from an array position
......
......@@ -109,5 +109,5 @@ FOREACH(my_dir ${my_include_dirs})
INSTALL( FILES ${hpp_in_dir} DESTINATION include/${my_dir} )
ENDFOREACH()
INSTALL( FILES "${SCALFMM_BINARY_DIR}/Src/ScalFmmConfig.h" DESTINATION include/Utils/${my_dir} )
INSTALL( FILES "${SCALFMM_BINARY_DIR}/Src/ScalFmmConfig.h" DESTINATION include/${my_dir} )
......@@ -1040,7 +1040,7 @@ protected:
STARPU_NAME, p2mTaskNames.get(),
#else
//"P2M-nb_i"
STARPU_NAME, taskNames.print("P2M-%d_%lld",
STARPU_NAME, taskNames.print("P2M", "%d, %lld\n",
tree->getCellGroup(tree->getHeight()-1,idxGroup)->getNumberOfCellsInBlock(),
tree->getCellGroup(tree->getHeight()-1,idxGroup)->getSizeOfInterval()),
#endif
......@@ -1108,7 +1108,7 @@ protected:
task->name = m2mTaskNames[idxLevel].get();
#else
//"M2M-l_nb_i_nbc_ic_s"
task->name = taskNames.print("M2M-%d_%d_%lld_%d_%lld_%lld",
task->name = taskNames.print("M2M", "%d, %d, %lld, %d, %lld, %lld\n",
idxLevel,
tree->getCellGroup(idxLevel,idxGroup)->getNumberOfCellsInBlock(),
tree->getCellGroup(idxLevel,idxGroup)->getSizeOfInterval(),
......@@ -1156,7 +1156,7 @@ protected:
task->name = m2mTaskNames[idxLevel].get();
#else
//M2M-l_nb_i_nbc_ic_s
task->name = taskNames.print("M2M-%d_%d_%lld_%d_%lld_%lld",
task->name = taskNames.print("M2M", "%d, %d, %lld, %d, %lld, %lld\n",
idxLevel,
tree->getCellGroup(idxLevel,idxGroup)->getNumberOfCellsInBlock(),
tree->getCellGroup(idxLevel,idxGroup)->getSizeOfInterval(),
......@@ -1200,7 +1200,7 @@ protected:
STARPU_NAME, m2lTaskNames[idxLevel].get(),
#else
//"M2L-l_nb_i"
STARPU_NAME, taskNames.print("M2L-%d_%d_%lld",
STARPU_NAME, taskNames.print("M2L", "%d, %d, %lld\n",
idxLevel,
tree->getCellGroup(idxLevel,idxGroup)->getNumberOfCellsInBlock(),
tree->getCellGroup(idxLevel,idxGroup)->getSizeOfInterval()),
......@@ -1236,7 +1236,7 @@ protected:
STARPU_NAME, m2lOuterTaskNames[idxLevel].get(),
#else
//"M2L_out-l_nb_i_nb_i_s
STARPU_NAME, taskNames.print("M2L_out-%d_%d_%lld_%d_%lld_%d",
STARPU_NAME, taskNames.print("M2L_out", "%d, %d, %lld, %d, %lld, %d\n",
idxLevel,
tree->getCellGroup(idxLevel,idxGroup)->getNumberOfCellsInBlock(),
tree->getCellGroup(idxLevel,idxGroup)->getSizeOfInterval(),
......@@ -1266,7 +1266,7 @@ protected:
STARPU_NAME, m2lOuterTaskNames[idxLevel].get(),
#else
//"M2L_out-l_nb_i_nb_i_s"
STARPU_NAME, taskNames.print("M2L_out-%d_%d_%lld_%d_%lld_%d",
STARPU_NAME, taskNames.print("M2L_out", "%d, %d, %lld, %d, %lld, %d\n",
idxLevel,
tree->getCellGroup(idxLevel,interactionid)->getNumberOfCellsInBlock(),
tree->getCellGroup(idxLevel,interactionid)->getSizeOfInterval(),
......@@ -1340,7 +1340,7 @@ protected:
task->name = l2lTaskNames[idxLevel].get();
#else
//"L2L-l_nb_i_nbc_ic_s"
task->name = taskNames.print("L2L-%d_%d_%lld_%d_%lld_%lld",
task->name = taskNames.print("L2L", "%d, %d, %lld, %d, %lld, %lld\n",
idxLevel,
tree->getCellGroup(idxLevel,idxGroup)->getNumberOfCellsInBlock(),
tree->getCellGroup(idxLevel,idxGroup)->getSizeOfInterval(),
......@@ -1391,7 +1391,7 @@ protected:
task->name = l2lTaskNames[idxLevel].get();
#else
//"L2L-l_nb_i_nbc_ic_s"
task->name = taskNames.print("L2L-%d_%d_%lld_%d_%lld_%lld",
task->name = taskNames.print("L2L", "%d, %d, %lld, %d, %lld, %lld\n",
idxLevel,
tree->getCellGroup(idxLevel,idxGroup)->getNumberOfCellsInBlock(),
tree->getCellGroup(idxLevel,idxGroup)->getSizeOfInterval(),
......@@ -1445,7 +1445,7 @@ protected:
STARPU_NAME, p2pOuterTaskNames.get(),
#else
//"P2P_out-nb_i_nb_i_s"
STARPU_NAME, taskNames.print("P2P_out-%d_%lld_%d_%lld_%d",
STARPU_NAME, taskNames.print("P2P_out", "%d, %lld, %d, %lld, %d\n",
tree->getParticleGroup(idxGroup)->getNumberOfLeavesInBlock(),
tree->getParticleGroup(idxGroup)->getSizeOfInterval(),
tree->getParticleGroup(interactionid)->getNumberOfLeavesInBlock(),
......@@ -1476,7 +1476,7 @@ protected:
STARPU_NAME, p2pTaskNames.get(),
#else
//"P2P-nb_i"
STARPU_NAME, taskNames.print("P2P-%d_%lld",
STARPU_NAME, taskNames.print("P2P", "%d, %lld\n",
tree->getParticleGroup(idxGroup)->getNumberOfLeavesInBlock(),
tree->getParticleGroup(idxGroup)->getSizeOfInterval()),
#endif
......@@ -1518,7 +1518,7 @@ protected:
STARPU_NAME, l2pTaskNames.get(),
#else
//"L2P-nb_i"
STARPU_NAME, taskNames.print("L2P-%d_%lld",
STARPU_NAME, taskNames.print("L2P", "%d, %lld\n",
tree->getCellGroup(tree->getHeight()-1,idxGroup)->getNumberOfCellsInBlock(),
tree->getCellGroup(tree->getHeight()-1,idxGroup)->getSizeOfInterval()),
#endif
......
......@@ -14,12 +14,18 @@
class FStarPUTaskNameParams{
protected:
std::list<const char*> names;
FILE* fout;
int taskid;
public:
FStarPUTaskNameParams(){
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();
}
......@@ -31,22 +37,30 @@ public:
}
template <typename ... Params>
const char* print(const char format[], Params... args ){
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, format, args...);
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* 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;
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;
}
};
......
......@@ -23,6 +23,5 @@
FLog FLog::Controller;
#endif // SCALFMM_USE_DEBUG
......@@ -14,7 +14,9 @@
// "http://www.cecill.info".
// "http://www.gnu.org/licenses".
// ===================================================================================
// ==== CMAKE =====
// @BUG_INTEL
// ================
#include <iostream>
#include <iomanip>
......
......@@ -21,7 +21,10 @@
// ================
// Keep in private GIT
// ==== CMAKE =====
// @FUSE_FFT
// @FUSE_BLAS
// ================
#include <iostream>
#include <cstdio>
......
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