Boost logo

Ublas :

Subject: Re: [ublas] [bindings] New traits system
From: Thomas Klimpel (Thomas.Klimpel_at_[hidden])
Date: 2010-01-11 07:30:41

Hello Rutger,

Since you seem to be quite active currently, I guess it should be easy for you to fix the problems Jesse is observing with MKL:

Jesse wrote:
> After the call:
> work[0] = 865
> iwork[0] = -858993460,
> info=0
> So basically, the opt_size_iwork comes out in the invoke as
> -858993460, which cascades later.

The behavior of MKL is quite consistent with almost all other lapack driver subroutines, in that the size of workspace arrays that don't have an explicit size argument (LWORK, LRWORK or LIWORK) for the subroutine call doesn't get computed by the optimal workspace query.

So the fix would be that would only query for sizes of workspace arrays that have an explicit size argument for the subroutine call, and use min_workspace for the others. I'm not even sure whether there is any lapack driver subroutine that has an LRWORK or LIWORK argument for the subroutine call, so it might well be that using min_workspace for LRWORK and LIWORK is always the right thing to do.