def MPI_Comm_free(context, args): comm_ptr = args[0] comm_id = context.controller.read_int(comm_ptr) if comm_id == consts.MPI_COMM_WORLD or comm_id == consts.MPI_COMM_SELF: e = errormsg.FreeingPermanentComm(context, comm_id=comm_id) context.add_error_and_throw(e) comm = check.check_comm(context, comm_id, 1) context.state.remove_comm(context, comm) context.controller.write_int(comm_ptr, consts.MPI_COMM_NULL); return False
def convert(cls, value, arg_position, context): return check.check_comm(context, value, arg_position)