The call is:
where md is 21.
The documentaed call is:
call spevd(ap, w [,uplo] [,z] [,info])
and additionally states later:
Specific details for the routine spevd interface are the following:
ap Holds the array A of size (n*(n+1)/2).
w Holds the vector with the number of elements n.
z Holds the matrix Z of size (n, n).
uplo Must be 'U' or 'L'. The default value is 'U'.
jobz Restored based on the presence of the argument z as follows:
jobz = 'V', if z is present,
jobz = 'N', if z is omitted.
If you provide a complete, self-contained example that exhibits the problem, I can look at it. On the other hand, code fragments with unknown argument values are not enough to get started with probing for causes of aborts.
OK, in building a complete example, I discoved that the AP argument must be passed with the exact dimension, i.e. AP(md*(md+1)/2) in my case. This is understandable, and I should have realized it sooner.
The info argument returns the number of argument of original Fortran 77 interface. So the argument -7 corresponds here to LDZ argument that is skipped in the Fortran 95 interface.
And really, at least does not apply to Fortran 95 arrays. All F95 arrays must have exact dimensions. MKL documentation claims:
Input arguments such as array dimensions are not required in Fortran95 and are skipped from the calling sequence. Array dimensions are reconstructed from the user data that must exactly follow the required array shape.