Attention une mise à jour du serveur va être effectuée le lundi 17 mai entre 13h et 13h30. Cette mise à jour va générer une interruption du service de quelques minutes.

Commit ad854409 authored by Quentin Khan's avatar Quentin Khan

Use the checksum option in the PerfTest driver

parent e24f04f4
......@@ -433,6 +433,16 @@ namespace scalfmm {
std::cout << algo->name() << ": ";
std::cout << algo->description() << '\n';
if(params.checksum) {
checksum_generator check{0, 0,
loader->getNumberOfParticles()/2,
loader->getNumberOfParticles()-1};
tree->forEachLeaf(check);
std::cerr << "Energy: " << check.energy << '\n';
params.json["checksum"]["energy"] = check.energy;
}
// Run the algorithm
timers["algo"].tic();
algo->execute();
......@@ -458,21 +468,12 @@ namespace scalfmm {
setup_step::call_info<kernel_desc>(params, *kernel);
if(params.checksum) {
checksum_generator check{0, 0, loader->getNumberOfParticles()/2, loader->getNumberOfParticles()-1};
checksum_generator check{0, 0,
loader->getNumberOfParticles()/2,
loader->getNumberOfParticles()-1};
tree->forEachLeaf(check);
std::cerr << "Energy: " << check.energy << '\n';
params.json["checksum"]["energy"] = check.energy;
// for(int i = 0; i < 3; ++i) {
// using Ids = typename checksum_generator::TupleIds;
// params.json["checksum"]["N"+std::to_string(i)]["index"] = std::get<Ids::index>(check.particles[i]) ;
// params.json["checksum"]["N"+std::to_string(i)]["potential"] = std::get<Ids::potential>(check.particles[i]);
// params.json["checksum"]["N"+std::to_string(i)]["posx"] = std::get<Ids::posx>(check.particles[i]) ;
// params.json["checksum"]["N"+std::to_string(i)]["posy"] = std::get<Ids::posy>(check.particles[i]) ;
// params.json["checksum"]["N"+std::to_string(i)]["posz"] = std::get<Ids::posz>(check.particles[i]) ;
// params.json["checksum"]["N"+std::to_string(i)]["fx"] = std::get<Ids::fx>(check.particles[i]) ;
// params.json["checksum"]["N"+std::to_string(i)]["fy"] = std::get<Ids::fy>(check.particles[i]) ;
// params.json["checksum"]["N"+std::to_string(i)]["fz"] = std::get<Ids::fz>(check.particles[i]) ;
// }
}
}
};
......
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