double X[MR][MC], F1k[MR+1][MC]; // 80KB + 80.8KB
double MatQuad[MR+MC][MR+MC]; // 320KB
double P[MC][MC][MC]; // 8MB
int precede[MR+MC]; // 800B
I suspect you have way too much data on the stack. There's a limited amount of stack space. The exact size is platform- and compiler-dependent; if you're in the hundreds of KB range you're flirting with disaster. Large arrays like these would be better off either as static data or on the heap. Try adding a static
qualifier to each of these, or allocating them with malloc()
.