OpenMPI  0.1.1
vt_mpicom.h
1 /**
2  * VampirTrace
3  * http://www.tu-dresden.de/zih/vampirtrace
4  *
5  * Copyright (c) 2005-2012, ZIH, TU Dresden, Federal Republic of Germany
6  *
7  * Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
8  * Centre, Federal Republic of Germany
9  *
10  * See the file COPYING in the package base directory for details
11  **/
12 
13 #ifndef _VT_MPICOM_H
14 #define _VT_MPICOM_H
15 
16 #ifdef __cplusplus
17 # define EXTERN extern "C"
18 #else
19 # define EXTERN extern
20 #endif
21 
22 #include "config.h"
23 
24 #include "vt_inttypes.h"
25 
26 #include "mpi.h"
27 
28 EXTERN void vt_comm_init(void);
29 EXTERN void vt_comm_finalize(void);
30 EXTERN uint32_t vt_rank_to_pe(VT_MPI_INT rank, MPI_Comm comm);
31 
32 EXTERN void vt_group_create(MPI_Group group);
33 EXTERN void vt_group_free(MPI_Group group);
34 EXTERN uint32_t vt_group_id(MPI_Group group);
35 
36 EXTERN void vt_comm_create(MPI_Comm comm);
37 EXTERN void vt_comm_free(MPI_Comm comm);
38 EXTERN uint32_t vt_comm_id(MPI_Comm comm);
39 
40 #if defined(HAVE_MPI2_1SIDED) && HAVE_MPI2_1SIDED
41 EXTERN void vt_win_create(MPI_Win win, MPI_Comm comm);
42 EXTERN void vt_win_free(MPI_Win win);
43 EXTERN void vt_win_id(MPI_Win win, MPI_Comm* comm, uint32_t* gid, uint32_t* wid);
44 EXTERN void vt_win_set_gid(MPI_Win win, uint32_t gid);
45 #endif /* HAVE_MPI2_1SIDED */
46 
47 /* MPI communicator |-> VampirTrace communicator id */
48 #define VT_COMM_ID(c) vt_comm_id(c)
49 
50 /* Rank with respect to arbitrary communicator |-> global rank */
51 #define VT_RANK_TO_PE(r,c) (((c)==MPI_COMM_WORLD) ? (uint32_t)r : vt_rank_to_pe(r,c))
52 
53 #endif
Definition: win.h:53
Group structure Currently we have four formats for storing the process pointers that are members of t...
Definition: group.h:79
Definition: communicator.h:118