Quantcast
Channel: Intel® Software - Intel® Visual Fortran Compiler for Windows*
Viewing all articles
Browse latest Browse all 5691

recursive subroutines and stack size

$
0
0

I am experimenting with recursive subroutines.  If I compile and run a simple program, where a recursive subroutine calls itself many times, it crashes with a stack overflow.  I have figured out that to fix this, I have to set the Stack Reserve Size to a large value.  Is there a way to disable the stack usage?  I have tried using /heap-arrays0 option, but it did not help.

If I can't disable the stack and I want to use recursive subroutines, do you think I should just set the Stack Reserve Size to a maximum of 1 GB to prevent any stack overflows?

 


Viewing all articles
Browse latest Browse all 5691

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>