Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29285 Discussions

Moving large variables from stack to heap

jeremy_h
New Contributor I
699 Views
Hi friends,

With CVF, we had a routine that declared a large array (say 50mb). Since we did not adjust the CVF program stack size, I think I can assume that the CVF compiler chose to put this on the heap instead of the stack.

With our current project settings, IVF tries to put this on the stack, and we need 64mb of stack for the routine to not crash on entry. Is there a way to trick or force IVF to put large variables on the heap, perhaps with some AUTOMATIC setting, or reentrency or SAVE or something.

Regards,

- Jeremy
0 Kudos
3 Replies
mecej4
Honored Contributor III
699 Views
Read about the

/heap-arrays[:n]

compiler option.
0 Kudos
Steven_L_Intel1
Employee
699 Views
CVF made the array static, not on the heap.
0 Kudos
jeremy_h
New Contributor I
699 Views
Both excellent answers and very helpful.

Thanks - Jeremy
0 Kudos
Reply