- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
@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.
링크가 복사됨
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
@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.
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
@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.
