https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113698
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- You can use GOMP_CPU_AFFINITY or different setting of OMP_PROC_BIND together with OMP_PLACES to bind the initial thread to different CPU. While the OpenMP spec allows moving the initial thread from unspecified place to the requested one only before the first active parallel region, doing that there would add to the overhead of #pragma omp parallel and what exactly the application wants is hard to guess, whether the allocations done in the initial thread prior to the first parallel are meant for the initial thread or other threads too. And, if you just add an empty #pragma omp parallel at the start of main, then OpenMP requires the thread to be bound there. There are OpenMP allocators one can use and request specific thread binding for the allocations, or perform the allocations from the threads.