Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

const errors in mkl_lapack.h header

Mark_G_2
Beginner
718 Views

1) In all variants of zlacrm, zlarcm, clacrm, clarcm, the output C should not be const:

void zlacrm_( const MKL_INT* m, const MKL_INT* n, const MKL_Complex16* a,
              const MKL_INT* lda, const double* b, const MKL_INT* ldb,
              const MKL_Complex16* c, const MKL_INT* ldc, double* rwork );

The LAPACK documentation was also wrong. Bug report sent to them, too.

lapack/SRC> grep 'param.* C' *larcm.f *lacrm.f
clarcm.f:*> \param[in] C
zlarcm.f:*> \param[in] C
clacrm.f:*> \param[in] C
zlacrm.f:*> \param[in] C

should be:
lapack/SRC> grep 'param.* C' *larcm.f *lacrm.f
clarcm.f:*> \param[out] C
zlarcm.f:*> \param[out] C
clacrm.f:*> \param[out] C
zlacrm.f:*> \param[out] C


2) In all variants of [sdcz]larft, the input V should be const:

void zlarft_( const char* direct, const char* storev, const MKL_INT* n,
              const MKL_INT* k, const MKL_Complex16* v, const MKL_INT* ldv,
              const MKL_Complex16* tau, MKL_Complex16* t, const MKL_INT* ldt );

lapack/SRC> grep 'param.* V' *larft.f
clarft.f:*> \param[in] V
dlarft.f:*> \param[in] V
slarft.f:*> \param[in] V
zlarft.f:*> \param[in] V

- Mark Gates, Innovative Computing Laboratory, UTK

0 Kudos
5 Replies
Dmitry_B_Intel
Employee
718 Views

Hi Mark,

This shall be fixed indeed.

Many thanks to you for the report.

Dima

0 Kudos
Gennady_F_Intel
Moderator
718 Views

Thanks Mark. I agree with the first items ( ?lacrm and ?larcm). We will fix that. With regard to ?larft - V is input/output parameter. 

0 Kudos
Mark_G_2
Beginner
718 Views

Regarding larft, this was changed in LAPACK 3.4.1 from [in,out] to [in], which I didn't realize until just now.

grep '^\* +V\b|param.*\bV\b' lapack-3.*/SRC/dlarft.f
lapack-3.0/SRC/dlarft.f:*  V       (input/output) DOUBLE PRECISION array, dimension
lapack-3.1.1/SRC/dlarft.f:*  V       (input/output) DOUBLE PRECISION array, dimension
lapack-3.2/SRC/dlarft.f:*  V       (input/output) DOUBLE PRECISION array, dimension
lapack-3.3.0/SRC/dlarft.f:*  V       (input/output) DOUBLE PRECISION array, dimension
lapack-3.3.1/SRC/dlarft.f:*  V       (input/output) DOUBLE PRECISION array, dimension
lapack-3.4.0/SRC/dlarft.f:*> \param[in,out] V
lapack-3.4.1/SRC/dlarft.f:*> \param[in] V
lapack-3.4.2/SRC/dlarft.f:*> \param[in] V
lapack-3.5.0/SRC/dlarft.f:*> \param[in] V
lapack-3.6.0/SRC/dlarft.f:*> \param[in] V

I've read through the current code and do not see any instances where V is modified.

- Mark Gates, Innovative Computing Laboratory, UTK

 

0 Kudos
Konstantin_A_Intel
718 Views

Hi Mark,

Your finding #2 was already fixed in latest MKL releases, e.g. MKL 11.3.3

As for ?larcm problem, we'll fix it ASAP.

Thank you,

Konstantin

0 Kudos
Gennady_F_Intel
Moderator
718 Views

Mark, the problem has been fixed into MKL 11.3 update 4 and into the latest MKL v. 2017. Thanks again for the problem.

0 Kudos
Reply