summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/src
diff options
context:
space:
mode:
Diffstat (limited to 'openmp/runtime/src')
-rw-r--r--openmp/runtime/src/include/50/ompt.h.var4
-rw-r--r--openmp/runtime/src/ompt-general.cpp9
2 files changed, 13 insertions, 0 deletions
diff --git a/openmp/runtime/src/include/50/ompt.h.var b/openmp/runtime/src/include/50/ompt.h.var
index 0cae6a0f69d..930822d2269 100644
--- a/openmp/runtime/src/include/50/ompt.h.var
+++ b/openmp/runtime/src/include/50/ompt.h.var
@@ -32,6 +32,7 @@
macro (ompt_get_thread_data) \
macro (ompt_get_unique_id) \
\
+ macro(ompt_get_num_procs) \
macro(ompt_get_num_places) \
macro(ompt_get_place_proc_ids) \
macro(ompt_get_place_num) \
@@ -582,6 +583,9 @@ OMPT_API_FUNCTION(int, ompt_get_task_info, (
int *thread_num
));
+/* procs */
+OMPT_API_FUNCTION(int, ompt_get_num_procs, (void));
+
/* places */
OMPT_API_FUNCTION(int, ompt_get_num_places, (void));
diff --git a/openmp/runtime/src/ompt-general.cpp b/openmp/runtime/src/ompt-general.cpp
index 9f21214f808..7e1c67a7c26 100644
--- a/openmp/runtime/src/ompt-general.cpp
+++ b/openmp/runtime/src/ompt-general.cpp
@@ -491,6 +491,15 @@ OMPT_API_ROUTINE int ompt_get_task_info(int ancestor_level, int *type,
}
/*****************************************************************************
+ * num_procs
+ ****************************************************************************/
+
+OMPT_API_ROUTINE int ompt_get_num_procs(void) {
+// copied from kmp_ftn_entry.h (but modified: OMPT can only be called when runtime is initialized)
+ return __kmp_avail_proc;
+}
+
+/*****************************************************************************
* places
****************************************************************************/
OpenPOWER on IntegriCloud