~ubuntu-branches/ubuntu/hardy/openmpi/hardy-updates

« back to all changes in this revision

Viewing changes to ompi/mpi/c/send_init.c

  • Committer: Bazaar Package Importer
  • Author(s): Dirk Eddelbuettel, Manuel Prinz, Dirk Eddelbuettel
  • Date: 2007-10-06 07:54:47 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20071006075447-wr1q1d2u6kpc1bi3
Tags: 1.2.4-3
[ Manuel Prinz ]
* debian/control: Added openmpi-common to libopenmpi-dev's Depends
  (Closes: #445230)

[ Dirk Eddelbuettel ]
* Debian build and upload

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
 *                         University of Stuttgart.  All rights reserved.
10
10
 * Copyright (c) 2004-2005 The Regents of the University of California.
11
11
 *                         All rights reserved.
 
12
 * Copyright (c) 2006      Cisco Systems, Inc.  All rights reserved.
12
13
 * $COPYRIGHT$
13
14
 * 
14
15
 * Additional copyrights may follow
39
40
{
40
41
    int rc = MPI_SUCCESS;
41
42
 
42
 
    if (dest == MPI_PROC_NULL) {
43
 
        *request = &ompi_request_empty;
44
 
        return MPI_SUCCESS;
45
 
    }
46
 
 
47
43
    if ( MPI_PARAM_CHECK ) {
48
44
        OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
49
45
        if (ompi_comm_invalid(comm)) {
54
50
            rc = MPI_ERR_TYPE;
55
51
        } else if (tag < 0 || tag > mca_pml.pml_max_tag) {
56
52
            rc = MPI_ERR_TAG;
57
 
        } else if (ompi_comm_peer_invalid(comm, dest)) {
 
53
        } else if (ompi_comm_peer_invalid(comm, dest) &&
 
54
                   (MPI_PROC_NULL != dest)) {
58
55
            rc = MPI_ERR_RANK;
59
56
        } else if (request == NULL) {
60
57
            rc = MPI_ERR_REQUEST;
65
62
        OMPI_ERRHANDLER_CHECK(rc, comm, rc, FUNC_NAME);
66
63
    }
67
64
 
 
65
    if (MPI_PROC_NULL == dest) {
 
66
        *request = OBJ_NEW(ompi_request_t);
 
67
        /* Other fields were initialized by the constructor for
 
68
           ompi_request_t */
 
69
        (*request)->req_type = OMPI_REQUEST_NOOP;
 
70
        (*request)->req_status = ompi_request_empty.req_status;
 
71
        (*request)->req_complete = true;
 
72
        (*request)->req_state = OMPI_REQUEST_INACTIVE;
 
73
        (*request)->req_persistent = true;
 
74
        (*request)->req_free = ompi_request_persistent_proc_null_free;
 
75
        return MPI_SUCCESS;
 
76
    }
 
77
 
68
78
    rc = MCA_PML_CALL(isend_init(buf,count,type,dest,tag,MCA_PML_BASE_SEND_STANDARD,comm,request));
69
79
    OMPI_ERRHANDLER_RETURN(rc, comm, rc, FUNC_NAME);
70
80
}