1 Reply Latest reply on Sep 11, 2014 10:09 AM by kknox

    windows hidden string length?

    byteme

      For the newest versions of the ACML/BLAS routines.  Using Visual C/C++, is it still necessary to pass the hidden string length arguments when calling the fortran interface directly?  When I tried this a few years ago, I had to add hidden string lengths to prevent the program from crashing on Windows.

       

      I learned that Intel Fortran has a C binding option (ATTRIBUTES) which makes hidden string lengths no longer necessary. Is ACML BLAS/LAPACK compiled in this way?

        • Re: windows hidden string length?
          kknox

          Hi byteme~

           

          No, the acml.h header file is the same between 5 & 6.  You specifically ask about the Fortran interface, and it still requires the string length to be appended to the normal signature:

          extern void SGEMM(char *transa, char *transb, int *m, int *n, int *k, float *alpha, float *a, int *lda, float *b, int *ldb, float *beta, float *c, int *ldc, int transa_len, int transb_len);

           

          I assume that you know about the C interface?  acml.h has 2 API's for each supported BLAS routine, one C style and one Fortran style.  The C style API does not require knowledge of the Fortran calling convention:

          extern void sgemm(char transa, char transb, int m, int n, int k, float alpha, float *a, int lda, float *b, int ldb, float beta, float *c, int ldc);

           

          Kent