This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/TMDSEVM6678: Is there any limit on recursive function call for TMDSEVM6678?

Part Number: TMDSEVM6678


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;
}

recursion_limit.zip