Exemplo n.º 1
0
  def __init__(self, _type, _namei, _namej, _comm, _dim=3):  
    self.dim = _dim  
    self.CD  = Commdomm.CommDom()
    self.CD.init()
    self.CD.set_app_type(   _type  ) 
    self.CD.set_app_name(   _namei ) 
    self.CD.set_world_comm( _comm  ) 

    self.lcomm = self.CD.set_mpi_comms()
    self.lrank = self.lcomm.Get_rank()
    self.lsize = self.lcomm.Get_size()

    self.wcomm = _comm  
    self.wrank = _comm.Get_rank()
    self.wsize = _comm.Get_size()
 
    self.commij = MPI.COMM_NULL
    if( (self.CD.__get_app_name__() == _namei) and (self.CD.__get_friends__(_namej) == 1) ):
      self.commij = self.CD.get_mpi_commij(_namej)
    if( (self.CD.__get_app_name__() == _namej) and (self.CD.__get_friends__(_namei) == 1) ):
      self.commij = self.CD.get_mpi_commij(_namei)
    self.lcomm.Barrier()
Exemplo n.º 2
0
import Commdomm
import Loader_alya
import Read_file 

Types     = ["COORDINATES", "ELEMENTS", "CHARACTERISTICS"]

## 3d case, coinciding meshes, Temper 3-interaction
basenamei = ROOT+"/Tools/Temper/Mesh01/METIS02/xxx_%s%s.alya"
filenamej = ROOT+"/Tools/Temper/Mesh02/METIS01/xxx_COORDINATES000.alya" 


#=================================================================| COMMs |===#
app_type = "PYTH"
app_name = "MESH01"

CD = Commdomm.CommDom() 
CD.init() 
CD.set_app_type(app_type);
CD.set_app_name(app_name);
CD.set_world_comm(world_comm)

local_comm = MPI.COMM_NULL
local_comm = CD.set_mpi_comms()
local_rank = local_comm.Get_rank()
local_size = local_comm.Get_size()


rank = str( local_rank ).zfill(3) 

DATA = {}
for typei in Types: