Tool/software: TI C/C++ Compiler
I have a very simple openmp application which needs to call a very simple recursive function ... unfortunately it only works for 2K recursion although I have allocated a large stack size (256KB) see the code below and example project attached.
Any clue is much appreciated ....
#include <ti/runtime/openmp/omp.h>
#include <stdio.h>
#define REC_LIMIT (2*1024) // works
#define REC_LIMIT (25*1024) // not working
double bad_recursion(double x){
if (x > REC_LIMIT){
return 1;
} else {
return 1+bad_recursion(1+x);
}
}
int main (int argc, char *argv[]) {
int nthreads, tid;
double retval = bad_recursion(1);
printf("retval = %f \n", retval);
return 0;
}

