Unable to use LAPACK - potrs functions

Hi, 

We have a successful build of Pytorch on Windows with APL. The zpotrs, cpotrs, dpotrs, spotrs and zunqmr, cunmqr, dormqr, sormqr functions are unfortunately unreachable, therefore unusable. They require some major code changes.

So this type of declarations did not work for these.

extern "C" void zpotrs_(char *uplo, int *n, int *nrhs, std::complex<double> *a, int *lda, std::complex<double> *b, int *ldb, int *info);

We had to change the above code to below. 

extern "C" int LAPACKE_zpotrs(int matrix_layout, char uplo, int n, int nrhs, const float *a, int lda, float *b, int ldb);

static inline void zpotrs_(char *uplo, int *n, int *nrhs, std::complex<double> *a, int *lda, std::complex<double> *b, int *ldb, int *info) {
  *info = LAPACKE_zpotrs(LAPACK_COL_MAJOR, *uplo, *n, *nrhs, a, *lda, b, *ldb);

We also had these types of runtime outputs with the before code : 

   ** On entry to DPOTRS parameter number  1 had an illegal value

Could you assist us in making these functions usable like any others?

Parents
  • Hi,

        Sorry to hear you are having an issue with APL. We are interested to understand more about this issue, please can you provide me with further information?

    Can you tell me which compiler you are using to compiler your code and which version of APL you are using? Also, are you using the static library or the DLL and are you using either the MD or the MT variant?

    In the case where you report using  'extern "C" void zpotrs_' declarations failing, can you tell me if this is a) failing to compile; b) failing to link; c) giving an error when running ?

    And in the second case where you report using "static inline void zpotrs_" it suggests you are successful, is that correct ? Or are the errors regarding "parameter number  1 had an illegal value" related to this case ?

    Also, can you show the declaration and value of uplo ?

    Thanks

Reply
  • Hi,

        Sorry to hear you are having an issue with APL. We are interested to understand more about this issue, please can you provide me with further information?

    Can you tell me which compiler you are using to compiler your code and which version of APL you are using? Also, are you using the static library or the DLL and are you using either the MD or the MT variant?

    In the case where you report using  'extern "C" void zpotrs_' declarations failing, can you tell me if this is a) failing to compile; b) failing to link; c) giving an error when running ?

    And in the second case where you report using "static inline void zpotrs_" it suggests you are successful, is that correct ? Or are the errors regarding "parameter number  1 had an illegal value" related to this case ?

    Also, can you show the declaration and value of uplo ?

    Thanks

Children