~james-page/ubuntu/precise/openmpi1.5/new

« back to all changes in this revision

Viewing changes to ompi/mca/pml/csum/pml_csum_iprobe.c

  • Committer: Bazaar Package Importer
  • Author(s): Manuel Prinz
  • Date: 2009-04-23 14:01:21 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20090423140121-vsi3pqa6g30j4qiy
Tags: 1.3.2-1
* New upstream release. (Closes: #520597, #515116)
  - Manpage and VampirTrace patches removed, included upstream.
* Fixed build issues on Alpha. Huge thanks to Arthur Loiret for providing
  access to his machines for testing! (Closes: #510845, #517543)
* Fixed build issues on Sparc. (Closes: #519725)
* Fixed manpage-has-errors-from-man lintian warnings.
* Faked SONAME change by renaming library package. (Closes: #512616)
* Made libopenmpi-dev depend on libibverbs-dev. (Closes: #522153)
* Support for "nocheck" build option in debian/rules.
* Updated Standards-Version in debian/control.
* Changed section of libopenmpi-dbg to "debug".
* Updated debian/copyright.

* Dirk Eddelbuettel removed himself from Uploaders. The team thanks Dirk
  for his long-term contribution and effort to get Open MPI back to life.
  I personally thank Dirk for encouraging me to become a Debian Developer
  and his support and mentoring on that way and beyond.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
 
3
 *                         University Research and Technology
 
4
 *                         Corporation.  All rights reserved.
 
5
 * Copyright (c) 2004-2005 The University of Tennessee and The University
 
6
 *                         of Tennessee Research Foundation.  All rights
 
7
 *                         reserved.
 
8
 * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, 
 
9
 *                         University of Stuttgart.  All rights reserved.
 
10
 * Copyright (c) 2004-2005 The Regents of the University of California.
 
11
 *                         All rights reserved.
 
12
 * Copyright (c) 2009      Sun Microsystems, Inc. All rights reserved.
 
13
 * $COPYRIGHT$
 
14
 * 
 
15
 * Additional copyrights may follow
 
16
 * 
 
17
 * $HEADER$
 
18
 */
 
19
 
 
20
#include "ompi_config.h"
 
21
#include "ompi/request/request.h"
 
22
#include "pml_csum_recvreq.h"
 
23
 
 
24
 
 
25
int mca_pml_csum_iprobe(int src,
 
26
                       int tag,
 
27
                       struct ompi_communicator_t *comm,
 
28
                       int *matched, ompi_status_public_t * status)
 
29
{
 
30
    int rc = OMPI_SUCCESS;
 
31
    mca_pml_csum_recv_request_t recvreq;
 
32
 
 
33
    OBJ_CONSTRUCT( &recvreq, mca_pml_csum_recv_request_t );
 
34
    recvreq.req_recv.req_base.req_ompi.req_type = OMPI_REQUEST_PML;
 
35
    recvreq.req_recv.req_base.req_type = MCA_PML_REQUEST_IPROBE;
 
36
 
 
37
    MCA_PML_CSUM_RECV_REQUEST_INIT(&recvreq, NULL, 0, &ompi_mpi_char.dt, src, tag, comm, true);
 
38
    MCA_PML_CSUM_RECV_REQUEST_START(&recvreq);
 
39
 
 
40
    if( recvreq.req_recv.req_base.req_ompi.req_complete == true ) {
 
41
        if( NULL != status ) {
 
42
            *status = recvreq.req_recv.req_base.req_ompi.req_status;
 
43
        }
 
44
        *matched = 1;
 
45
    } else {
 
46
        *matched = 0;
 
47
        opal_progress();
 
48
    }
 
49
    MCA_PML_BASE_RECV_REQUEST_FINI( &recvreq.req_recv );
 
50
    return rc;
 
51
}
 
52
 
 
53
 
 
54
int mca_pml_csum_probe(int src,
 
55
                      int tag,
 
56
                      struct ompi_communicator_t *comm,
 
57
                      ompi_status_public_t * status)
 
58
{
 
59
    mca_pml_csum_recv_request_t recvreq;
 
60
 
 
61
    OBJ_CONSTRUCT( &recvreq, mca_pml_csum_recv_request_t );
 
62
    recvreq.req_recv.req_base.req_ompi.req_type = OMPI_REQUEST_PML;
 
63
    recvreq.req_recv.req_base.req_type = MCA_PML_REQUEST_PROBE;
 
64
 
 
65
    MCA_PML_CSUM_RECV_REQUEST_INIT(&recvreq, NULL, 0, &ompi_mpi_char.dt, src, tag, comm, true);
 
66
    MCA_PML_CSUM_RECV_REQUEST_START(&recvreq);
 
67
 
 
68
    ompi_request_wait_completion(&recvreq.req_recv.req_base.req_ompi);
 
69
 
 
70
    if (NULL != status) {
 
71
        *status = recvreq.req_recv.req_base.req_ompi.req_status;
 
72
    }
 
73
    MCA_PML_BASE_RECV_REQUEST_FINI( &recvreq.req_recv );
 
74
    return OMPI_SUCCESS;
 
75
}