Question about gcc support related to file kmp_gsupport.cpp

Could anyone familiar with the gcc support for llvm-openmp help with this:

When I build everything with gcc, and using debug mode, the debugger refuses to stop at

#pragma omp parallel
#pragma omp for schedule(static)

It seems that for schedule(static) is not mapped to GCC.

Or is there any marco that are introduced inside function


As It is only calling this function when I was running the program.

however, if I use

#pragma omp parallel
#pragma omp for schedule(dynamic)

it is calling



Your question is really about the code which is generated by gcc for a statically scheduled loop, which has nothing to do with the runtime.

If you investigate how gcc compiles a statically scheduled OpenMP loop (look at for instance), you’ll see that there are no calls into the runtime for static loop scheduling.

– Jim

Jim Cownie
CVCG/DPD/TCAR (Technical Computing, Analyzers, and Runtimes)

Tel: +44 117 9071438

Thanks, Jim,
I was wondering why there is a function :

              kmp_sch_static, OMPT_LOOP_PRE, OMPT_LOOP_POST)

which maps gcc call to clang but never used or called.

If you look in kmp_ftn_os.h you can see the GOMP names, along with the interface version in which they were defined.

That entry appears to be required for GOMP 4.0 compatibility.

– Jim

Jim Cownie
CVCG/DPD/TCAR (Technical Computing, Analyzers, and Runtimes)

Tel: +44 117 9071438

If this function is also in the interface of, there might be a use case for this function. You can either look into the codegen source of gcc or ask at the gcc compiler list.