예제 #1
0
def comm_create(comm, processor_list):
    """
    new_comm = comm_create(comm, processor_list)
    
    processor_list: simple python list specifying all the processors
    to put into the new communicator.
    """
    oldGroup = core.comm_group( comm )
    newGroup = core.group_incl( oldGroup, len(processor_list), processor_list )
    new_comm = core.comm_create( comm, newGroup )
    if new_comm == core.MPI_COMM_NULL:
        return None
    return Communicator( new_comm )
예제 #2
0
def comm_create(group, comm ):
    """
    """
    return Communicator(core.comm_create(group, comm))