Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Comunicados
Important Update: Community Platform Migration​. Learn more​>
29649 Discussões

fortran matmul function overflows

tihomir
Principiante
1.705 Visualizações
I get stack overflow with the matmul function with a simple code of this type:

a=matmul(b,c)

where a, b and c are pretty large allocatable arrays. Unfortunately I can not know in advance the size of these matrices to request bigger stack at compilation time.

Is there a way to avoid this problem and still use the matmul function or an equivalent of some sort?

Why is the result placed on the stack and it is not stored directly in a?

Thanks a lot for any suggestions.
0 Kudos
1 Responder
Steven_L_Intel1
Funcionário
1.705 Visualizações
It would be interesting to see a small but complete example that shows the problem, as well as the compiler version you are using. But if a temp is being created, there is no way I can think of to avoid having it be on the stack.

Steve
Responder