summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/src/ompt-general.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'openmp/runtime/src/ompt-general.cpp')
-rw-r--r--openmp/runtime/src/ompt-general.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/openmp/runtime/src/ompt-general.cpp b/openmp/runtime/src/ompt-general.cpp
index 705b452d87b..80a859196e6 100644
--- a/openmp/runtime/src/ompt-general.cpp
+++ b/openmp/runtime/src/ompt-general.cpp
@@ -327,6 +327,8 @@ void ompt_pre_init() {
#endif
}
+extern "C" int omp_get_initial_device(void);
+
void ompt_post_init() {
//--------------------------------------------------
// Execute the post-initialization logic only once.
@@ -343,7 +345,7 @@ void ompt_post_init() {
//--------------------------------------------------
if (ompt_start_tool_result) {
ompt_enabled.enabled = !!ompt_start_tool_result->initialize(
- ompt_fn_lookup, &(ompt_start_tool_result->tool_data));
+ ompt_fn_lookup, omp_get_initial_device(), &(ompt_start_tool_result->tool_data));
if (!ompt_enabled.enabled) {
// tool not enabled, zero out the bitmap, and done
@@ -422,7 +424,7 @@ OMPT_API_ROUTINE int ompt_enumerate_mutex_impls(int current_impl,
* callbacks
****************************************************************************/
-OMPT_API_ROUTINE int ompt_set_callback(ompt_callbacks_t which,
+OMPT_API_ROUTINE ompt_set_result_t ompt_set_callback(ompt_callbacks_t which,
ompt_callback_t callback) {
switch (which) {
@@ -482,8 +484,8 @@ OMPT_API_ROUTINE int ompt_get_parallel_info(int ancestor_level,
team_size);
}
-OMPT_API_ROUTINE ompt_state_t ompt_get_state(ompt_wait_id_t *wait_id) {
- ompt_state_t thread_state = __ompt_get_state_internal(wait_id);
+OMPT_API_ROUTINE int ompt_get_state(ompt_wait_id_t *wait_id) {
+ int thread_state = __ompt_get_state_internal(wait_id);
if (thread_state == ompt_state_undefined) {
thread_state = ompt_state_work_serial;
OpenPOWER on IntegriCloud