# - allgatherTree (pyTree) - import Converter.PyTree as C import Converter.Mpi as Cmpi import Distributor2.PyTree as Distributor2 import Generator.PyTree as G import Converter.Internal as Internal # Create test file if Cmpi.rank == 0: a = G.cart((0,0,0), (1,1,1), (10,10,10)) b = G.cart((9,0,0), (1,1,1), (10,10,10)) t = C.newPyTree(['Base',a,b]) C.convertPyTree2File(t, 'test.cgns') Cmpi.barrier() # Reread in parallel t = Cmpi.convertFile2SkeletonTree('test.cgns') (t, dic) = Distributor2.distribute(t, NProc=Cmpi.size, algorithm='fast') t = Cmpi.readZones(t, 'test.cgns', rank=Cmpi.rank) t = Cmpi.convert2PartialTree(t) t = Cmpi.allgatherTree(t) # full tree on every processors if Cmpi.rank == 0: Internal.printTree(t)