Changed Allreduce to Reduce for CurrentCollector

and DeletionLogger; removed sync_ field copies
This commit is contained in:
2025-10-21 14:26:45 +02:00
parent f5ff3d2f7c
commit f57895bcef
6 changed files with 101 additions and 61 deletions
+7
View File
@@ -45,6 +45,13 @@ class CpuSynchronizer {
// array has to be the delta of the timestep
void sumToAll(blitz::Array<double, 5>& array);
// collect data to rank 0 functions
void sumToRoot(blitz::Array<double, 3>& array);
void sumToRoot(long int& value);
void sumToRoot(double& value);
const int root = 0;
};
#endif /* CPU_SYNCHRONIZER_H */
+6 -6
View File
@@ -70,14 +70,14 @@ class CurrentCollector {
blitz::Array<double, 3> r_negative_crossings;
blitz::Array<double, 3> r_positive_crossings;
blitz::Array<double, 3> sync_z_negative_crossings;
blitz::Array<double, 3> sync_z_positive_crossings;
// blitz::Array<double, 3> sync_z_negative_crossings;
// blitz::Array<double, 3> sync_z_positive_crossings;
blitz::Array<double, 3> sync_phi_negative_crossings;
blitz::Array<double, 3> sync_phi_positive_crossings;
// blitz::Array<double, 3> sync_phi_negative_crossings;
// blitz::Array<double, 3> sync_phi_positive_crossings;
blitz::Array<double, 3> sync_r_negative_crossings;
blitz::Array<double, 3> sync_r_positive_crossings;
// blitz::Array<double, 3> sync_r_negative_crossings;
// blitz::Array<double, 3> sync_r_positive_crossings;
blitz::Array<double, 3> collector_areas_r;
blitz::Array<double, 3> collector_areas_phi;
+2 -2
View File
@@ -40,10 +40,10 @@ class DeletionLogger {
private:
std::map<DeletionType, long int> num_deletions;
std::map<DeletionType, long int> sync_num_deletions;
// std::map<DeletionType, long int> sync_num_deletions;
std::map<PhysicalDeletionType, double> num_phys_deletions;
std::map<PhysicalDeletionType, double> sync_num_phys_deletions;
// std::map<PhysicalDeletionType, double> sync_num_phys_deletions;
};