- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried a simple fortran code for openmp in visual studio, while the stack overflow error comes up, from the net information, I tried two ways:
1. changed the heap arrays to 0 as the picture below to set memory on heap.
2. increase the reserve size of stack.
as the result, the second method work while the first failed, could anyone explain why? as if I'm concerning that using the dynamic heap setting will be better while it failed.
# even I set the optimization to other level or custom it also failed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Haku You are using static arrays, heap-arrays only affect automatic and temporary arrays. Generally, we recommend to use allocatable arrays instead of relying on -heap-arrays. Since it seems you are trying to measure performance, please also do the initialization of those 3 arrays in a parallel region.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Haku You are using static arrays, heap-arrays only affect automatic and temporary arrays. Generally, we recommend to use allocatable arrays instead of relying on -heap-arrays. Since it seems you are trying to measure performance, please also do the initialization of those 3 arrays in a parallel region.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@TobiasKThank you very much for kind suggestion, now I understand to use allocatable arrays are better than static arrays. And also thanks for your suggestions for parallelization part.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page