[Openmp-commits] [PATCH] D40949: [OMPT] Add missing ompt_get_num_procs function

Jonas Hahnfeld via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Dec 8 06:10:04 PST 2017

Hahnfeld added inline comments.

Comment at: runtime/test/ompt/misc/api_calls.c:67
+  // CHECK: {{^}}[[MASTER_ID]]: omp_get_num_procs()=[[NUM_PROCS:[-]?[0-9]+]]
+  // CHECK: {{^}}[[MASTER_ID]]: ompt_get_num_procs()=[[NUM_PROCS]]
protze.joachim wrote:
> Hahnfeld wrote:
> > Can we get a negative result?!?
> The return value is int, thus could be negative.
> If a negative value is invalid for omp_get_num_procs, it should be tested somewhere else.
`omp_get_num_places` didn't have it, so I was confused. Anyway I think you are right, this is fine for OMPT as long as the two functions return the same value.


More information about the Openmp-commits mailing list