lammps-master/lib/gpu/lal_balance.h
inline double all_avg_split() {
    if (_load_balance) {
      double _all_avg_split=0.0;
      MPI_Reduce(&_avg_split,&_all_avg_split,1,MPI_DOUBLE,MPI_SUM,0,
                 _device->replica());
      _all_avg_split/=_device->replica_size();
      return _all_avg_split/_avg_count;
    } else
      return _actual_split;
  }
/// Return the average fraction of particles handled by device on all procs
Return the average fraction of particles handled by device on all procs
Return the average fraction of particles handled by device on all procs
inline double all_avg_split() {
    if (_load_balance) {
      double _all_avg_split=0.0;
      MPI_Reduce(&_avg_split,&_all_avg_split,1,MPI_DOUBLE,MPI_SUM,0,
                 _device->replica());
      _all_avg_split/=_device->replica_size();
      return _all_avg_split/_avg_count;
    } else
      return _actual_split;
  }
inline double all_avg_split ( ) { if ( _load_balance ) { double _all_avg_split = 0.0 ; MPI_Reduce ( & _avg_split , & _all_avg_split , 1 , MPI_DOUBLE , MPI_SUM , 0 , _device -> replica ( ) ) ; _all_avg_split /= _device -> replica_size ( ) ; return _all_avg_split / _avg_count ; } else return _actual_split ; }
Return the average fraction of particles handled by device on all procs
Return the average fraction of particles handled by device on all procs