summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/test
diff options
context:
space:
mode:
Diffstat (limited to 'openmp/runtime/test')
-rwxr-xr-xopenmp/runtime/test/ompt/callback.h2
-rw-r--r--openmp/runtime/test/ompt/misc/api_calls.c6
2 files changed, 8 insertions, 0 deletions
diff --git a/openmp/runtime/test/ompt/callback.h b/openmp/runtime/test/ompt/callback.h
index b013e897f01..6dc8834cffd 100755
--- a/openmp/runtime/test/ompt/callback.h
+++ b/openmp/runtime/test/ompt/callback.h
@@ -37,6 +37,7 @@ static ompt_get_task_info_t ompt_get_task_info;
static ompt_get_thread_data_t ompt_get_thread_data;
static ompt_get_parallel_info_t ompt_get_parallel_info;
static ompt_get_unique_id_t ompt_get_unique_id;
+static ompt_get_num_procs_t ompt_get_num_procs;
static ompt_get_num_places_t ompt_get_num_places;
static ompt_get_place_proc_ids_t ompt_get_place_proc_ids;
static ompt_get_place_num_t ompt_get_place_num;
@@ -684,6 +685,7 @@ int ompt_initialize(
ompt_get_parallel_info = (ompt_get_parallel_info_t) lookup("ompt_get_parallel_info");
ompt_get_unique_id = (ompt_get_unique_id_t) lookup("ompt_get_unique_id");
+ ompt_get_num_procs = (ompt_get_num_procs_t) lookup("ompt_get_num_procs");
ompt_get_num_places = (ompt_get_num_places_t) lookup("ompt_get_num_places");
ompt_get_place_proc_ids = (ompt_get_place_proc_ids_t) lookup("ompt_get_place_proc_ids");
ompt_get_place_num = (ompt_get_place_num_t) lookup("ompt_get_place_num");
diff --git a/openmp/runtime/test/ompt/misc/api_calls.c b/openmp/runtime/test/ompt/misc/api_calls.c
index f7f1e16aa6d..a41de086316 100644
--- a/openmp/runtime/test/ompt/misc/api_calls.c
+++ b/openmp/runtime/test/ompt/misc/api_calls.c
@@ -43,6 +43,9 @@ int main()
printf("%" PRIu64 ": sched_getcpu()=%d\n", ompt_get_thread_data()->value, sched_getcpu());
printf("%" PRIu64 ": ompt_get_proc_id()=%d\n", ompt_get_thread_data()->value, ompt_get_proc_id());
+
+ printf("%" PRIu64 ": omp_get_num_procs()=%d\n", ompt_get_thread_data()->value, omp_get_num_procs());
+ printf("%" PRIu64 ": ompt_get_num_procs()=%d\n", ompt_get_thread_data()->value, ompt_get_num_procs());
}
// Check if libomp supports the callbacks for this test.
@@ -61,6 +64,9 @@ int main()
// CHECK: {{^}}[[MASTER_ID]]: sched_getcpu()=[[CPU_ID:[0-9]+]]
// CHECK: {{^}}[[MASTER_ID]]: ompt_get_proc_id()=[[CPU_ID]]
+ // CHECK: {{^}}[[MASTER_ID]]: omp_get_num_procs()=[[NUM_PROCS:[-]?[0-9]+]]
+ // CHECK: {{^}}[[MASTER_ID]]: ompt_get_num_procs()=[[NUM_PROCS]]
+
return 0;
}
OpenPOWER on IntegriCloud