diff --git a/cpp/particles/interpolation/abstract_particle_set.hpp b/cpp/particles/interpolation/abstract_particle_set.hpp index 2361b142fdaedbe1da65a496e3e2ef403733008c..87324be450856e0edff9946aa3dc8654b7ced406 100644 --- a/cpp/particles/interpolation/abstract_particle_set.hpp +++ b/cpp/particles/interpolation/abstract_particle_set.hpp @@ -45,6 +45,7 @@ * - updating particle information and redistributing data among MPI processes * accordingly. * - approximating fields at particle locations ("sampling"). + * - applying a generic particle-to-particle interaction object (P2PKernel) * */ @@ -80,6 +81,7 @@ class abstract_particle_set template <class func_type> int LOOP(func_type expression) { + TIMEZONE("abstract_particle_set::LOOP"); for (partsize_t idx = 0; idx < this->getLocalNumberOfParticles()*this->getStateSize(); idx++) expression(idx); return EXIT_SUCCESS; @@ -87,6 +89,7 @@ class abstract_particle_set template <class func_type> int LOOP_state(func_type expression) { + TIMEZONE("abstract_particle_set::LOOP_state"); for (partsize_t idx_part = 0; idx_part < this->getLocalNumberOfParticles(); idx_part++) for (unsigned int cc = 0; cc < this->getStateSize(); cc++) expression(idx_part, cc); @@ -141,6 +144,7 @@ class abstract_particle_set p2p_kernel_class p2p_kernel, std::vector<std::unique_ptr<particle_rnumber[]>> &additional_data) { + TIMEZONE("abstract_particle_set::applyP2PKernel"); // there must be at least one array with additional data, // since the p2p kernel expects an array where to store the result of the computation assert(int(additional_data.size()) > int(0)); @@ -166,6 +170,7 @@ class abstract_particle_set const std::string field_name, const int iteration) { + TIMEZONE("abstract_particle_set::writeSample"); // set file layout particle_sample_writer->setParticleFileLayout(this->getParticleFileLayout()); // allocate position array @@ -197,6 +202,7 @@ class abstract_particle_set const std::string field_name, const int iteration) { + TIMEZONE("abstract_particle_set::writeStateTriplet"); assert(i0 >= 0); assert(i0 <= this->getStateSize()-3); // set file layout diff --git a/cpp/particles/interpolation/particle_set.hpp b/cpp/particles/interpolation/particle_set.hpp index a9f083db9402c2530fb728c7d86f3a8fd736866f..2e4e8344a9a80a69b4e6e3b19f3bfeef7bc2d926 100644 --- a/cpp/particles/interpolation/particle_set.hpp +++ b/cpp/particles/interpolation/particle_set.hpp @@ -151,6 +151,7 @@ class particle_set: public abstract_particle_set p2p_cutoff) { + TIMEZONE("particle_set::particle_set"); // if these assertions fail, // it means the constructor prototype is broken // because the arrays above are wrong. @@ -224,6 +225,7 @@ class particle_set: public abstract_particle_set const int firstState, const int lastState) const { + TIMEZONE("particle_set::extractFromParticleState"); const int numberOfStates = std::max(0,(std::min(lastState, state_size)-firstState)); std::unique_ptr<particle_rnumber[]> stateExtract(new particle_rnumber[local_number_of_particles*numberOfStates]); @@ -243,6 +245,7 @@ class particle_set: public abstract_particle_set int template_sample(const field<field_rnumber, be, fc> &field_to_sample, particle_rnumber *result) { + TIMEZONE("particle_set::template_sample"); // attention: compute_distr adds result on top of existing values. // please clean up result as appropriate before call. this->pDistributor.template compute_distr<interpolator_class, @@ -291,6 +294,7 @@ class particle_set: public abstract_particle_set int redistribute(std::vector<std::unique_ptr<particle_rnumber[]>> &additional_data) { + TIMEZONE("particle_set::redistribute"); this->pDistributor.template redistribute<interpolator_class, state_size, state_size, @@ -307,7 +311,7 @@ class particle_set: public abstract_particle_set int init(abstract_particles_input<partsize_t, particle_rnumber>& particles_input) { - TIMEZONE("particles_system::init"); + TIMEZONE("particle_set::init"); this->local_state = particles_input.getMyParticles(); this->local_index = particles_input.getMyParticlesIndexes();