def enter_main(self, context, comm, args): sendbuf, sendcount, sendtype, \ recvbuf, recvcount, recvtype, root = args check.check_rank(context, comm, root, 7, False, False) self.check_root(context, comm, root) rank = context.state.get_rank(comm) if self.root == rank: self.recvbuf = recvbuf self.recvtype = check.check_datatype(context, recvtype, 7) check.check_count(context, recvcount, 5) self.recvcount = recvcount self.sendtype = sendtype self.sendcount = sendcount assert self.buffers[rank] is None if sendbuf == consts.MPI_IN_PLACE: if rank != root: context.add_error_and_throw(errormsg.InvalidInPlace(context)) else: self.make_buffer_for_root( context, rank, comm, sendbuf, sendtype, sendcount)
def enter_main(self, context, comm, args): sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype = args rank = context.state.get_rank(comm) self.recvbufs[rank] = recvbuf self.recvtypes[rank] = check.check_datatype(context, recvtype, 7) check.check_count(context, recvcount, 5) self.recvcounts[rank] = recvcount self.make_buffer_for_all(context, rank, comm, sendbuf, sendtype, sendcount)
def enter_main(self, context, comm, args): sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root = args check.check_rank(context, comm, root, 8) self.check_root(context, comm, root) rank = context.state.get_rank(comm) self.recvbufs[rank] = recvbuf self.recvtypes[rank] = recvtype self.recvcounts[rank] = recvcount if self.root == rank: check.check_count(context, sendcount, 2) sendtype = check.check_datatype(context, sendtype, 3) self.sendtype = sendtype self.sendcount = sendcount self.make_buffer_for_all(context, rank, comm, sendbuf, sendtype, sendcount * self.process_count) elif recvbuf == consts.MPI_IN_PLACE: context.add_error_and_throw(errormsg.InvalidInPlace(context))
def convert(cls, value, arg_position, context): return check.check_count(context, value, arg_position)