I get stack overflow with the matmul function with a simple code of this type:
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.