Testing the performance of `matmul` under default compiler settings

I just ran your code using Intel OneAPI, no problem at all.
It took less than 1 second.

For intel Fortran, you probably need to make sure you did,

-heap-arrays

Here maybe another relevant thread,

gfortran should run just fine without adding a flag I think. Although you can add some flags such as
-mcmodel=medium or -frecursive or other flags to heap arrays,

2 Likes