Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 0c6ea8fb authored by Olivier COULAUD's avatar Olivier COULAUD
Browse files

added define, output for benchmark purpose

parent cdff83b5
No related merge requests found
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
// ==== CMAKE ===== // ==== CMAKE =====
// @FUSE_BLAS // @FUSE_BLAS
// @FUSE_FFT // @FUSE_FFT
// @FUSE_STARPU
// ================ // ================
// Keep in private GIT // Keep in private GIT
...@@ -44,7 +43,11 @@ ...@@ -44,7 +43,11 @@
#include <memory> #include <memory>
#define RANDOM_PARTICLES //#define RANDOM_PARTICLES
#if defined(SCALFMM_SEQUENTIAL)
#undef SCALFMM_USE_STARPU
#undef SCALFMM_USE_OMP4
#endif
#ifdef STARPU_SIMGRID_MLR_MODELS #ifdef STARPU_SIMGRID_MLR_MODELS
extern "C" { extern "C" {
...@@ -65,7 +68,7 @@ int main(int argc, char* argv[]){ ...@@ -65,7 +68,7 @@ int main(int argc, char* argv[]){
// Initialize the types // Initialize the types
typedef double FReal; typedef double FReal;
static const int ORDER = 5; static const int ORDER = 6;
typedef FInterpMatrixKernelR<FReal> MatrixKernelClass; typedef FInterpMatrixKernelR<FReal> MatrixKernelClass;
typedef FUnifCellPODCore GroupCellSymbClass; typedef FUnifCellPODCore GroupCellSymbClass;
...@@ -85,14 +88,21 @@ int main(int argc, char* argv[]){ ...@@ -85,14 +88,21 @@ int main(int argc, char* argv[]){
omp_set_num_threads(FParameters::getValue(argc,argv,FParameterDefinitions::NbThreads.options, omp_get_max_threads())); omp_set_num_threads(FParameters::getValue(argc,argv,FParameterDefinitions::NbThreads.options, omp_get_max_threads()));
typedef FGroupTaskDepAlgorithm<GroupOctreeClass, typename GroupOctreeClass::CellGroupClass, GroupCellClass, typedef FGroupTaskDepAlgorithm<GroupOctreeClass, typename GroupOctreeClass::CellGroupClass, GroupCellClass,
GroupCellSymbClass, GroupCellUpClass, GroupCellDownClass, GroupKernelClass, typename GroupOctreeClass::ParticleGroupClass, GroupContainerClass > GroupAlgorithm; GroupCellSymbClass, GroupCellUpClass, GroupCellDownClass, GroupKernelClass, typename GroupOctreeClass::ParticleGroupClass, GroupContainerClass > GroupAlgorithm;
#elif defined(SCALFMM_SEQUENTIAL)
typedef FUnifKernel<FReal,GroupCellClass,GroupContainerClass,MatrixKernelClass,ORDER> GroupKernelClass;
typedef FGroupSeqAlgorithm<GroupOctreeClass, typename GroupOctreeClass::CellGroupClass, GroupCellClass, GroupKernelClass, typename GroupOctreeClass::ParticleGroupClass, GroupContainerClass > GroupAlgorithm;
#else #else
typedef FUnifKernel<FReal,GroupCellClass,GroupContainerClass,MatrixKernelClass,ORDER> GroupKernelClass; FUnifKernel<FReal,GroupCellClass,GroupContainerClass,MatrixKernelClass,ORDER> GroupKernelClass;
//typedef FGroupSeqAlgorithm<GroupOctreeClass, typename GroupOctreeClass::CellGroupClass, GroupCellClass, GroupKernelClass, typename GroupOctreeClass::ParticleGroupClass, GroupContainerClass > GroupAlgorithm; //typedef FGroupSeqAlgorithm<GroupOctreeClass, typename GroupOctreeClass::CellGroupClass, GroupCellClass, GroupKernelClass, typename GroupOctreeClass::ParticleGroupClass, GroupContainerClass > GroupAlgorithm;
typedef FGroupTaskAlgorithm<GroupOctreeClass, typename GroupOctreeClass::CellGroupClass, GroupCellClass, GroupKernelClass, typename GroupOctreeClass::ParticleGroupClass, GroupContainerClass > GroupAlgorithm; typedef FGroupTaskAlgorithm<GroupOctreeClass, typename GroupOctreeClass::CellGroupClass, GroupCellClass, GroupKernelClass, typename GroupOctreeClass::ParticleGroupClass, GroupContainerClass > GroupAlgorithm;
#endif #endif
// Get params // Get params
const int NbLevels = FParameters::getValue(argc,argv,FParameterDefinitions::OctreeHeight.options, 5); const int NbLevels = FParameters::getValue(argc,argv,FParameterDefinitions::OctreeHeight.options, 5);
const int groupSize = FParameters::getValue(argc,argv,LocalOptionBlocSize.options, 250); const int groupSize = FParameters::getValue(argc,argv,LocalOptionBlocSize.options, 250);
//
std::cout << "Tree height: " << NbLevels <<"\n"
<< "Group Size: " << groupSize <<"\n"
<< "Order: " << ORDER << "\n";
// Load the particles // Load the particles
#ifdef RANDOM_PARTICLES #ifdef RANDOM_PARTICLES
...@@ -121,7 +131,7 @@ int main(int argc, char* argv[]){ ...@@ -121,7 +131,7 @@ int main(int argc, char* argv[]){
// Put the data into the tree // Put the data into the tree
timer.tic(); timer.tic();
GroupOctreeClass groupedTree(NbLevels, loader.getBoxWidth(), loader.getCenterOfBox(), groupSize, &allParticles); GroupOctreeClass groupedTree(NbLevels, loader.getBoxWidth(), loader.getCenterOfBox(), groupSize, &allParticles);
groupedTree.printInfoBlocks(); // groupedTree.printInfoBlocks();
std::cout << "Tree created in " << timer.tacAndElapsed() << "s\n"; std::cout << "Tree created in " << timer.tacAndElapsed() << "s\n";
// Run the algorithm // Run the algorithm
...@@ -131,12 +141,15 @@ int main(int argc, char* argv[]){ ...@@ -131,12 +141,15 @@ int main(int argc, char* argv[]){
// Extended for Native vs SimGrid makespans comparison // Extended for Native vs SimGrid makespans comparison
timer.tic(); timer.tic();
#ifdef SCALFMM_USE_STARPU
double start_time = starpu_timing_now(); double start_time = starpu_timing_now();
#endif
groupalgo.execute(); groupalgo.execute();
#ifdef SCALFMM_USE_STARPU
double end_time = starpu_timing_now(); double end_time = starpu_timing_now();
std::cout << "Kernel executed in in " << timer.tacAndElapsed() << "s\n";
std::cout << (end_time - start_time)/1000 << "\n"; std::cout << (end_time - start_time)/1000 << "\n";
#endif
std::cout << "Kernel executed in in " << timer.tacAndElapsed() << "s\n";
// Validate the result // Validate the result
if(FParameters::existParameter(argc, argv, LocalOptionNoValidate.options) == false){ if(FParameters::existParameter(argc, argv, LocalOptionNoValidate.options) == false){
FSize offsetParticles = 0; FSize offsetParticles = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment