示例#1
0
 def check_synced(self):
   synced = True
   if MPIUtil.is_root_proc():
     vars = np.concatenate([self.mean, self.mean_sq])
     MPIUtil.bcast(vars)
   else:
     vars_local = np.concatenate([self.mean, self.mean_sq])
     vars_root = np.empty_like(vars_local)
     MPIUtil.bcast(vars_root)
     synced = (vars_local == vars_root).all()
   return synced
示例#2
0
 def check_synced(self):
   synced = True
   if self._is_root():
     vars = self._get_flat_vars()
     MPIUtil.bcast(vars)
   else:
     vars_local = self._get_flat_vars()
     vars_root = np.empty_like(vars_local)
     MPIUtil.bcast(vars_root)
     synced = (vars_local == vars_root).all()
   return synced
示例#3
0
 def check_synced(self):
     synced = True
     if self._is_root():
         vars = self._get_flat_vars()
         MPIUtil.bcast(vars)
     else:
         vars_local = self._get_flat_vars()
         vars_root = np.empty_like(vars_local)
         MPIUtil.bcast(vars_root)
         synced = (vars_local == vars_root).all()
     return synced
示例#4
0
 def check_synced(self):
     synced = True
     if MPIUtil.is_root_proc():
         vars = np.concatenate([self.mean, self.mean_sq])
         MPIUtil.bcast(vars)
     else:
         vars_local = np.concatenate([self.mean, self.mean_sq])
         vars_root = np.empty_like(vars_local)
         MPIUtil.bcast(vars_root)
         synced = (vars_local == vars_root).all()
     return synced
示例#5
0
 def sync(self):
   vars = self._get_flat_vars()
   MPIUtil.bcast(vars)
   self._set_flat_vars(vars)
   return
示例#6
0
 def sync(self):
     vars = self._get_flat_vars()
     MPIUtil.bcast(vars)
     self._set_flat_vars(vars)
     return