This source file includes following definitions.
- pvar_handle_start
- MPI_T_pvar_start
1
2
3
4
5
6
7
8
9
10
11
12
13
14 #include "ompi/mpi/tool/mpit-internal.h"
15
16 #if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
17 #pragma weak MPI_T_pvar_start = PMPI_T_pvar_start
18 #endif
19
20 #if OMPI_PROFILING_DEFINES
21 #include "ompi/mpi/tool/profile/defines.h"
22 #endif
23
24
25 static int pvar_handle_start (mca_base_pvar_handle_t *handle)
26 {
27 if (OPAL_SUCCESS != mca_base_pvar_handle_start (handle)) {
28 return MPI_T_ERR_PVAR_NO_STARTSTOP;
29 }
30
31 return MPI_SUCCESS;
32 }
33
34 int MPI_T_pvar_start(MPI_T_pvar_session session, MPI_T_pvar_handle handle)
35 {
36 int ret = MPI_SUCCESS;
37
38 if (!mpit_is_initialized ()) {
39 return MPI_T_ERR_NOT_INITIALIZED;
40 }
41
42 ompi_mpit_lock ();
43
44 if (MPI_T_PVAR_ALL_HANDLES == handle) {
45 OPAL_LIST_FOREACH(handle, &session->handles, mca_base_pvar_handle_t) {
46
47
48 if (!mca_base_pvar_handle_is_running (handle) &&
49 OMPI_SUCCESS != pvar_handle_start (handle)) {
50 ret = MPI_T_ERR_PVAR_NO_STARTSTOP;
51 }
52 }
53 } else {
54 ret = pvar_handle_start (handle);
55 }
56
57 ompi_mpit_unlock ();
58
59 return ompit_opal_to_mpit_error (ret);
60 }