I have isolated the problem in those three lines, in a new program containing the main ,defines and those 3 lines. commenting the function wont lead to segfault.
thanks for ur answer:)
omp_sched_t *kind;
int *modifier;
omp_get_schedule(kind,modifier);
So, basically you're feeding omp_get_schedule junk and wondering why it doesn't work? Neither kind nor modifier contain valid memory addresses, so when they're dereferenced in omp_get_schedule bad things happen.