I am compiling my code with g++8.5 on redhat8 and I notice that when I set OMP_SCHEDULE=static, then inside my application omp_get_schedule() returns a "monotonic" schedule instead of a "static" schedule. Why could this be happening? If I set OMP_SCHEDULE to something else such as "dynamic" then my application recognizes it as "dynamic". Here is the code in question. Any ideas? Thanks
omp_sched_t kind;
int chunk_size;
omp_get_schedule(&kind, &chunk_size);
switch(kind)
{
case omp_sched_static:
{
schedule_msg = schedule_msg + "schedule=static, chunk_size="+std::to_string(chunk_size);
break;
}
case omp_sched_dynamic:
{
schedule_msg = schedule_msg + "schedule=dynamic, chunk_size="+std::to_string(chunk_size);
break;
}
case omp_sched_guided:
{
schedule_msg = schedule_msg + "schedule=guided, chunk_size="+std::to_string(chunk_size);
break;
}
case omp_sched_auto:
{
schedule_msg = schedule_msg + "schedule=auto, chunk_size="+std::to_string(chunk_size);
break;
}
default:
{
schedule_msg = schedule_msg + "schedule=monotonic, chunk_size="+std::to_string(chunk_size);
break;
}
}