-: 0:Source:/home/MPI/testing/mpich2/mpich2/src/mpid/ch3/src/mpid_issend.c
-: 0:Graph:mpid_issend.gcno
-: 0:Data:mpid_issend.gcda
-: 0:Runs:805
-: 0:Programs:258
-: 1:/* -*- Mode: C; c-basic-offset:4 ; -*- */
-: 2:/*
-: 3: * (C) 2001 by Argonne National Laboratory.
-: 4: * See COPYRIGHT in top-level directory.
-: 5: */
-: 6:
-: 7:#include "mpidimpl.h"
-: 8:
-: 9:/* FIXME: HOMOGENEOUS SYSTEMS ONLY -- no data conversion is performed */
-: 10:
-: 11:/*
-: 12: * MPID_Issend()
-: 13: */
-: 14:#undef FUNCNAME
-: 15:#define FUNCNAME MPID_Issend
-: 16:#undef FCNAME
-: 17:#define FCNAME MPIDI_QUOTE(FUNCNAME)
-: 18:int MPID_Issend(const void * buf, int count, MPI_Datatype datatype, int rank, int tag, MPID_Comm * comm, int context_offset,
-: 19: MPID_Request ** request)
82876: 20:{
-: 21: MPIDI_msg_sz_t data_sz;
-: 22: int dt_contig;
-: 23: MPI_Aint dt_true_lb;
-: 24: MPID_Datatype * dt_ptr;
-: 25: MPID_Request * sreq;
82876: 26: MPIDI_VC_t * vc=0;
-: 27:#if defined(MPID_USE_SEQUENCE_NUMBERS)
-: 28: MPID_Seqnum_t seqnum;
-: 29:#endif
82876: 30: int mpi_errno = MPI_SUCCESS;
-: 31: MPIDI_STATE_DECL(MPID_STATE_MPID_ISSEND);
-: 32:
-: 33: MPIDI_FUNC_ENTER(MPID_STATE_MPID_ISSEND);
-: 34:
-: 35: MPIU_DBG_MSG_FMT(CH3_OTHER,VERBOSE,(MPIU_DBG_FDEST,
-: 36: "rank=%d, tag=%d, context=%d",
-: 37: rank, tag, comm->context_id + context_offset));
-: 38:
82876: 39: if (rank == comm->rank && comm->comm_kind != MPID_INTERCOMM)
-: 40: {
12: 41: mpi_errno = MPIDI_Isend_self(buf, count, datatype, rank, tag, comm, context_offset, MPIDI_REQUEST_TYPE_SSEND, &sreq);
12: 42: goto fn_exit;
-: 43: }
-: 44:
82864: 45: if (rank != MPI_PROC_NULL)
-: 46: {
76816: 47: MPIDI_Comm_get_vc_set_active(comm, rank, &vc);
-: 48: /* this needs to come before the sreq is created, since the override */
-: 49: /* function is responsible for creating its own request */
-: 50:#ifdef ENABLE_COMM_OVERRIDES
-: 51: if (vc->comm_ops && vc->comm_ops->issend)
-: 52: {
-: 53: mpi_errno = vc->comm_ops->issend( vc, buf, count, datatype, rank, tag, comm, context_offset, &sreq);
-: 54: goto fn_exit;
-: 55: }
-: 56:#endif
-: 57: }
-: 58:
82864: 59: MPIDI_Request_create_sreq(sreq, mpi_errno, goto fn_exit);
82864: 60: MPIDI_Request_set_type(sreq, MPIDI_REQUEST_TYPE_SSEND);
-: 61:
82864: 62: if (rank == MPI_PROC_NULL)
-: 63: {
6048: 64: MPIU_Object_set_ref(sreq, 1);
6048: 65: sreq->cc = 0;
6048: 66: goto fn_exit;
-: 67: }
-: 68:
76816: 69: MPIDI_Datatype_get_info(count, datatype, dt_contig, data_sz, dt_ptr, dt_true_lb);
-: 70:
76816: 71: if (data_sz == 0)
-: 72: {
6354: 73: mpi_errno = MPIDI_CH3_EagerSyncZero( &sreq, rank, tag, comm,
-: 74: context_offset );
6354: 75: goto fn_exit;
-: 76: }
-: 77:
70462: 78: if (data_sz + sizeof(MPIDI_CH3_Pkt_eager_sync_send_t) <= vc->eager_max_msg_sz)
-: 79: {
70459: 80: mpi_errno = MPIDI_CH3_EagerSyncNoncontigSend( &sreq, buf, count,
-: 81: datatype, data_sz,
-: 82: dt_contig, dt_true_lb,
-: 83: rank, tag, comm,
-: 84: context_offset );
-: 85: /* If we're not complete, then add a reference to the datatype */
70459: 86: if (sreq && sreq->dev.OnDataAvail) {
|
3: 94: MPIDI_Request_set_msg_type(sreq, MPIDI_REQUEST_RNDV_MSG);
3: 95: mpi_errno = vc->rndvSend_fn( &sreq, buf, count, datatype, dt_contig,
-: 96: data_sz, dt_true_lb, rank, tag, comm,
-: 97: context_offset );
-: 98:
-: 99: /* FIXME: fill temporary IOV or pack temporary buffer after send to
-: 100: hide some latency. This requires synchronization
-: 101: because the CTS packet could arrive and be processed before the
-: 102: above iStartmsg completes (depending on the progress
-: 103: engine, threads, etc.). */
-: 104:
3: 105: if (sreq && dt_ptr != NULL)
-: 106: {
|