OpenMPI  0.1.1
pml_ob1_comm.h
Go to the documentation of this file.
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-2006 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$
13  *
14  * Additional copyrights may follow
15  *
16  * $HEADER$
17  */
18 /**
19  * @file
20  */
21 #ifndef MCA_PML_OB1_COMM_H
22 #define MCA_PML_OB1_COMM_H
23 
24 #include "opal/threads/mutex.h"
25 #include "opal/class/opal_list.h"
26 #include "ompi/proc/proc.h"
27 BEGIN_C_DECLS
28 
29 
31  opal_object_t super;
32  uint16_t expected_sequence; /**< send message sequence number - receiver side */
33  struct ompi_proc_t* ompi_proc;
34 #if OPAL_ENABLE_MULTI_THREADS
35  volatile int32_t send_sequence; /**< send side sequence number */
36 #else
37  int32_t send_sequence; /**< send side sequence number */
38 #endif
39  opal_list_t frags_cant_match; /**< out-of-order fragment queues */
40  opal_list_t specific_receives; /**< queues of unmatched specific receives */
41  opal_list_t unexpected_frags; /**< unexpected fragment queues */
42 };
44 
45 
46 /**
47  * Cached on ompi_communicator_t to hold queues/state
48  * used by the PML<->PTL interface for matching logic.
49  */
50 struct mca_pml_comm_t {
51  opal_object_t super;
52 #if OPAL_ENABLE_MULTI_THREADS
53  volatile uint32_t recv_sequence; /**< recv request sequence number - receiver side */
54 #else
55  uint32_t recv_sequence; /**< recv request sequence number - receiver side */
56 #endif
57  opal_mutex_t matching_lock; /**< matching lock */
58  opal_list_t wild_receives; /**< queue of unmatched wild (source process not specified) receives */
60  size_t num_procs;
61  size_t last_probed;
62 };
63 typedef struct mca_pml_comm_t mca_pml_ob1_comm_t;
64 
66 
67 
68 /**
69  * Initialize an instance of mca_pml_ob1_comm_t based on the communicator size.
70  *
71  * @param comm Instance of mca_pml_ob1_comm_t
72  * @param size Size of communicator
73  * @return OMPI_SUCCESS or error status on failure.
74  */
75 
76 extern int mca_pml_ob1_comm_init_size(mca_pml_ob1_comm_t* comm, size_t size);
77 
78 END_C_DECLS
79 #endif
80 
uint32_t recv_sequence
recv request sequence number - receiver side
Definition: pml_bfo_comm.h:56
Cached on ompi_communicator_t to hold queues/state used by the PML<->PTL interface for matching logic...
Definition: pml_bfo_comm.h:51
Definition: mutex_unix.h:53
opal_list_t frags_cant_match
out-of-order fragment queues
Definition: pml_ob1_comm.h:39
The opal_list_t interface is used to provide a generic doubly-linked list container for Open MPI...
opal_list_t specific_receives
queues of unmatched specific receives
Definition: pml_ob1_comm.h:40
Process identification structure interface.
Remote Open MPI process structure.
Definition: proc.h:56
int mca_pml_ob1_comm_init_size(mca_pml_ob1_comm_t *comm, size_t size)
Initialize an instance of mca_pml_ob1_comm_t based on the communicator size.
Definition: pml_ob1_comm.c:83
uint16_t expected_sequence
send message sequence number - receiver side
Definition: pml_ob1_comm.h:32
opal_list_t unexpected_frags
unexpected fragment queues
Definition: pml_ob1_comm.h:41
Definition: pml_ob1_comm.h:30
opal_list_t wild_receives
queue of unmatched wild (source process not specified) receives
Definition: pml_bfo_comm.h:59
Base object.
Definition: opal_object.h:182
Definition: opal_list.h:147
opal_mutex_t matching_lock
matching lock
Definition: pml_bfo_comm.h:58
Mutual exclusion functions.
int32_t send_sequence
send side sequence number
Definition: pml_ob1_comm.h:37
#define OBJ_CLASS_DECLARATION(NAME)
Declaration for class descriptor.
Definition: opal_object.h:236