Writing wrappers for LAPACK and BLAS routines

It appears to be constant at least for the duration of the subroutine, based on the code @fracton posted above in #19.

I noticed this issue a few weeks ago while I was taking a closer look at inline expressions in rklib via Compiler Explorer,

        call me%f(t,       x,f1)
        call me%f(t+a2*h,  x+h*(b21*f1),f2)
        call me%f(t+a3*h,  x+h*(b31*f1 + b32*f2),f3)
        call me%f(t+a4*h,  x+h*(b41*f1 + b42*f2 + b43*f3),f4)
        call me%f(t+h,     x+h*(b51*f1 + b52*f2 + b53*f3 + b54*f4),f5)
        call me%f(t+a6*h,  x+h*(b61*f1 + b62*f2 + b63*f3 + b64*f4 + b65*f5),f6)

and noticed that gfortran would create a bunch of calls to malloc and free (i.e. heap), whereas ifort had no mallocs (stack).

1 Like