My understanding of "openMP threads" is that they may not map to OS thread one to one. The openMP spec doesn't appear to require this.
GCC has the __thread keyword, which is for thread local storage (thread as in OS thread based on my interpretation). Does this mean GCC __thread is not compatible with openMP's threadprivate? If the openMP spec allows multiplexing openMP threads onto OS thread, then I think __thread and threadprivate are not compatible.
I saw there was this question asked a while ago for an older version of GCC, and it says that they are basically compatible. Is it still true for newer versions of GCC (say GCC 11.2)?