diff --git a/HySoP/hysop/gpu/tools.py b/HySoP/hysop/gpu/tools.py index 656d1d2ba45fe889b5d417f2afde8c4c2da81beb..f4d2df159e5a4b95db9d15c97e55fcf597e360dd 100644 --- a/HySoP/hysop/gpu/tools.py +++ b/HySoP/hysop/gpu/tools.py @@ -76,9 +76,11 @@ class OpenCLEnvironment(object): ## Kernels configuration dictionary if self.device.name == "Cayman": from config_cayman import kernels_config as kernel_cfg - elif self.device.name == "Tesla K20m": + elif self.device.name == "Tesla K20m" or \ + self.device.name == "Tesla K20Xm": from config_k20m import kernels_config as kernel_cfg else: + print "/!\\ Get a defautl kernels config for", self.device.name from config_default import kernels_config as kernel_cfg self.kernels_config = kernel_cfg self._locMem_Buffers = {} diff --git a/HySoP/hysop/mpi/topology.py b/HySoP/hysop/mpi/topology.py index 41dd5d78ac41e906a9c94b3cae8cbb968f339d8a..55124a224060e6264e51ca3b5ac1b70c92b3ea68 100644 --- a/HySoP/hysop/mpi/topology.py +++ b/HySoP/hysop/mpi/topology.py @@ -495,20 +495,21 @@ class TopoTools(object): rank = comm.Get_rank() dimension = topo.domain.dimension iglob = npw.int_zeros((dimension * 2, size)) + iglob_res = npw.int_zeros((dimension * 2, size)) iglob[0::2, rank] = start iglob[1::2, rank] = end # iglob is saved as a numpy array and then transform into # a dict of slices since mpi send operations are much # more efficient with numpy arrays. if root is None: - comm.Allgather([iglob[:, rank], MPI.INT], [iglob, MPI.INT]) + comm.Allgather([iglob[:, rank], MPI.INT], [iglob_res, MPI.INT]) else: - comm.Gather([iglob[:, rank], MPI.INT], [iglob, MPI.INT], root=root) + comm.Gather([iglob[:, rank], MPI.INT], [iglob_res, MPI.INT], root=root) if toslice: - return utils.arrayToDict(iglob) + return utils.arrayToDict(iglob_res) else: - return iglob + return iglob_res @staticmethod def gather_global_indices_overlap(topo=None, comm=None, dom=None, @@ -562,16 +563,17 @@ class TopoTools(object): rank = comm.Get_rank() dimension = dom.dimension iglob = npw.int_zeros((dimension * 2, size)) + iglob_res = npw.int_zeros((dimension * 2, size)) iglob[1::2, rank] = -1 if root is None: - comm.Allgather([iglob[:, rank], MPI.INT], [iglob, MPI.INT]) + comm.Allgather([iglob[:, rank], MPI.INT], [iglob_res, MPI.INT]) else: - comm.Gather([iglob[:, rank], MPI.INT], [iglob, MPI.INT], + comm.Gather([iglob[:, rank], MPI.INT], [iglob_res, MPI.INT], root=root) if toslice: - return utils.arrayToDict(iglob) + return utils.arrayToDict(iglob_res) else: - return iglob + return iglob_res else: return TopoTools.gather_global_indices(topo, toslice, root, comm)