[Openmp-dev] omp_get_team_size(1) returns wrong value on Windows

Simone Atzeni via Openmp-dev openmp-dev at lists.llvm.org
Thu Aug 16 21:41:05 PDT 2018


Hi,

Given this program:

--------------------------------------------------------------------
#include <stdio.h>
#include "omp.h"

int main()
{
  printf("omp_get_team_size(1) = %d\n", omp_get_team_size(1));
}
--------------------------------------------------------------------

omp_get_team_size(1) should return -1 when it's outside a parallel region.
This is the case for Linux, but not for Windows. On Windows it returns 1.

I am using PGI compiler and LLVM OpenMP 6.0.
I don't have access to Clang on Windows at the moment, so I can't say if it's a compiler or runtime bug.
Could any of you confirm this behavior with Clang?

Thanks.
Simone

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20180817/fd77bee3/attachment.html>


More information about the Openmp-dev mailing list