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