<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Warning in cblas macro when MKL_DIRECT_CALL defined in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Warning-in-cblas-macro-when-MKL-DIRECT-CALL-defined/m-p/1504296#M34806</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your patience.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The issue raised by you is being looked at by the development team. We will update you once the issue is fixed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards,&lt;BR /&gt;Varsha&lt;/P&gt;</description>
    <pubDate>Thu, 27 Jul 2023 06:50:40 GMT</pubDate>
    <dc:creator>VarshaS_Intel</dc:creator>
    <dc:date>2023-07-27T06:50:40Z</dc:date>
    <item>
      <title>Warning in cblas macro when MKL_DIRECT_CALL defined</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Warning-in-cblas-macro-when-MKL-DIRECT-CALL-defined/m-p/1500682#M34724</link>
      <description>&lt;P&gt;This is a minimal reproduction of my issue, which in real life occurs when including both &lt;A href="https://github.com/davisking/dlib" target="_blank" rel="noopener"&gt;dlib&lt;/A&gt; v19.22 and &lt;A href="https://eigen.tuxfamily.org/index.php?title=Main_Page" target="_blank" rel="noopener"&gt;eigen&lt;/A&gt; 3.4.0 headers and defining EIGEN_USE_MKL_ALL&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;// main.cpp
#define MKL_DIRECT_CALL
#include "mkl.h"

inline void my_function(const CBLAS_ORDER Order, const CBLAS_SIDE Side,
                        const CBLAS_UPLO Uplo, const CBLAS_TRANSPOSE TransA,
                        const CBLAS_DIAG Diag, const int M, const int N,
                        const float alpha, const float *A, const int lda,
                        float *B, const int ldb) {
    cblas_strsm(Order, Side, Uplo, TransA, Diag, M, N, alpha, A, lda, B, ldb);
}

int main() {
    return 0;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Compiler: gcc 11.3.0&lt;/P&gt;&lt;P&gt;Command: /usr/bin/g++ -I/path/to/intel/oneapi/mkl/2023.1.0/include -std=c++17 -o ./main.cpp.o -c ./main.cpp&lt;/P&gt;&lt;P&gt;What I expect to see: No warnings&lt;/P&gt;&lt;P&gt;What I see instead: "warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]":&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="none"&gt;In file included from intel/oneapi/mkl/2023.1.0/include/mkl.h:47,
                 from main.cpp:2:
main.cpp: In function ‘void my_function(CBLAS_ORDER, CBLAS_SIDE, CBLAS_UPLO, CBLAS_TRANSPOSE, CBLAS_DIAG, int, int, float, const float*, int, float*, int)’:
intel/oneapi/mkl/2023.1.0/include/mkl_direct_call.h:470:25: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  470 |     char *fside[]    = {"L", "R"};\
      |                         ^~~
intel/oneapi/mkl/2023.1.0/include/mkl_direct_call.h:524:83: note: in expansion of macro ‘MKL_DC_CBLAS_STRSM_CONVERT’
  524 | #define cblas_strsm(layout, side, uplo, trans, diag, m, n, alpha, a, lda, b, ldb) MKL_DC_CBLAS_STRSM_CONVERT(layout, side, uplo, trans, diag, m, n, alpha, a, lda, b, ldb, mkl_dc_strsm, strsm_direct)
      |                                                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:9:5: note: in expansion of macro ‘cblas_strsm’
   18 |                 cblas_strsm(Order, Side, Uplo, TransA, Diag, M, N, alpha, A, lda, B, ldb);
      |                 ^~~~~~~~~~~
intel/oneapi/mkl/2023.1.0/include/mkl_direct_call.h:470:30: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  470 |     char *fside[]    = {"L", "R"};\
      |                              ^~~
intel/oneapi/mkl/2023.1.0/include/mkl_direct_call.h:524:83: note: in expansion of macro ‘MKL_DC_CBLAS_STRSM_CONVERT’
  524 | #define cblas_strsm(layout, side, uplo, trans, diag, m, n, alpha, a, lda, b, ldb) MKL_DC_CBLAS_STRSM_CONVERT(layout, side, uplo, trans, diag, m, n, alpha, a, lda, b, ldb, mkl_dc_strsm, strsm_direct)
      |                                                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:9:5: note: in expansion of macro ‘cblas_strsm’
   18 |                 cblas_strsm(Order, Side, Uplo, TransA, Diag, M, N, alpha, A, lda, B, ldb);
      |                 ^~~~~~~~~~~
intel/oneapi/mkl/2023.1.0/include/mkl_direct_call.h:471:25: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  471 |     char *fuplo[]    = {"U", "L"};\
      |                         ^~~
intel/oneapi/mkl/2023.1.0/include/mkl_direct_call.h:524:83: note: in expansion of macro ‘MKL_DC_CBLAS_STRSM_CONVERT’
  524 | #define cblas_strsm(layout, side, uplo, trans, diag, m, n, alpha, a, lda, b, ldb) MKL_DC_CBLAS_STRSM_CONVERT(layout, side, uplo, trans, diag, m, n, alpha, a, lda, b, ldb, mkl_dc_strsm, strsm_direct)
      |                                                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:9:5: note: in expansion of macro ‘cblas_strsm’
   18 |                 cblas_strsm(Order, Side, Uplo, TransA, Diag, M, N, alpha, A, lda, B, ldb);
      |                 ^~~~~~~~~~~
intel/oneapi/mkl/2023.1.0/include/mkl_direct_call.h:471:30: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  471 |     char *fuplo[]    = {"U", "L"};\
      |                              ^~~
intel/oneapi/mkl/2023.1.0/include/mkl_direct_call.h:524:83: note: in expansion of macro ‘MKL_DC_CBLAS_STRSM_CONVERT’
  524 | #define cblas_strsm(layout, side, uplo, trans, diag, m, n, alpha, a, lda, b, ldb) MKL_DC_CBLAS_STRSM_CONVERT(layout, side, uplo, trans, diag, m, n, alpha, a, lda, b, ldb, mkl_dc_strsm, strsm_direct)
      |                                                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:9:5: note: in expansion of macro ‘cblas_strsm’
   18 |                 cblas_strsm(Order, Side, Uplo, TransA, Diag, M, N, alpha, A, lda, B, ldb);
      |                 ^~~~~~~~~~~
intel/oneapi/mkl/2023.1.0/include/mkl_direct_call.h:472:25: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  472 |     char *ftrans[]   = {"N", "T", "C"};\
      |                         ^~~
intel/oneapi/mkl/2023.1.0/include/mkl_direct_call.h:524:83: note: in expansion of macro ‘MKL_DC_CBLAS_STRSM_CONVERT’
  524 | #define cblas_strsm(layout, side, uplo, trans, diag, m, n, alpha, a, lda, b, ldb) MKL_DC_CBLAS_STRSM_CONVERT(layout, side, uplo, trans, diag, m, n, alpha, a, lda, b, ldb, mkl_dc_strsm, strsm_direct)
      |                                                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:9:5: note: in expansion of macro ‘cblas_strsm’
   18 |                 cblas_strsm(Order, Side, Uplo, TransA, Diag, M, N, alpha, A, lda, B, ldb);
      |                 ^~~~~~~~~~~
intel/oneapi/mkl/2023.1.0/include/mkl_direct_call.h:472:30: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  472 |     char *ftrans[]   = {"N", "T", "C"};\
      |                              ^~~
intel/oneapi/mkl/2023.1.0/include/mkl_direct_call.h:524:83: note: in expansion of macro ‘MKL_DC_CBLAS_STRSM_CONVERT’
  524 | #define cblas_strsm(layout, side, uplo, trans, diag, m, n, alpha, a, lda, b, ldb) MKL_DC_CBLAS_STRSM_CONVERT(layout, side, uplo, trans, diag, m, n, alpha, a, lda, b, ldb, mkl_dc_strsm, strsm_direct)
      |                                                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:9:5: note: in expansion of macro ‘cblas_strsm’
   18 |                 cblas_strsm(Order, Side, Uplo, TransA, Diag, M, N, alpha, A, lda, B, ldb);
      |                 ^~~~~~~~~~~
intel/oneapi/mkl/2023.1.0/include/mkl_direct_call.h:472:35: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  472 |     char *ftrans[]   = {"N", "T", "C"};\
      |                                   ^~~
intel/oneapi/mkl/2023.1.0/include/mkl_direct_call.h:524:83: note: in expansion of macro ‘MKL_DC_CBLAS_STRSM_CONVERT’
  524 | #define cblas_strsm(layout, side, uplo, trans, diag, m, n, alpha, a, lda, b, ldb) MKL_DC_CBLAS_STRSM_CONVERT(layout, side, uplo, trans, diag, m, n, alpha, a, lda, b, ldb, mkl_dc_strsm, strsm_direct)
      |                                                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:9:5: note: in expansion of macro ‘cblas_strsm’
   18 |                 cblas_strsm(Order, Side, Uplo, TransA, Diag, M, N, alpha, A, lda, B, ldb);
      |                 ^~~~~~~~~~~
intel/oneapi/mkl/2023.1.0/include/mkl_direct_call.h:473:25: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  473 |     char *fdiag[]    = {"N", "U"};\
      |                         ^~~
intel/oneapi/mkl/2023.1.0/include/mkl_direct_call.h:524:83: note: in expansion of macro ‘MKL_DC_CBLAS_STRSM_CONVERT’
  524 | #define cblas_strsm(layout, side, uplo, trans, diag, m, n, alpha, a, lda, b, ldb) MKL_DC_CBLAS_STRSM_CONVERT(layout, side, uplo, trans, diag, m, n, alpha, a, lda, b, ldb, mkl_dc_strsm, strsm_direct)
      |                                                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:9:5: note: in expansion of macro ‘cblas_strsm’
   18 |                 cblas_strsm(Order, Side, Uplo, TransA, Diag, M, N, alpha, A, lda, B, ldb);
      |                 ^~~~~~~~~~~
intel/oneapi/mkl/2023.1.0/include/mkl_direct_call.h:473:30: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  473 |     char *fdiag[]    = {"N", "U"};\
      |                              ^~~
intel/oneapi/mkl/2023.1.0/include/mkl_direct_call.h:524:83: note: in expansion of macro ‘MKL_DC_CBLAS_STRSM_CONVERT’
  524 | #define cblas_strsm(layout, side, uplo, trans, diag, m, n, alpha, a, lda, b, ldb) MKL_DC_CBLAS_STRSM_CONVERT(layout, side, uplo, trans, diag, m, n, alpha, a, lda, b, ldb, mkl_dc_strsm, strsm_direct)
      |                                                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:9:5: note: in expansion of macro ‘cblas_strsm’
   18 |                 cblas_strsm(Order, Side, Uplo, TransA, Diag, M, N, alpha, A, lda, B, ldb);
      |                 ^~~~~~~~~~~&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Would you be able to add `const` to these `char*` declarations to fix the warning? The `*_direct` functions that these variables are passed to already have `const char*` parameters.&lt;/P&gt;&lt;P&gt;I have attached a patch that fixes the issue for me for 2023.1&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2023 09:31:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Warning-in-cblas-macro-when-MKL-DIRECT-CALL-defined/m-p/1500682#M34724</guid>
      <dc:creator>travbid</dc:creator>
      <dc:date>2023-06-30T09:31:20Z</dc:date>
    </item>
    <item>
      <title>Re:Warning in cblas macro when MKL_DIRECT_CALL defined</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Warning-in-cblas-macro-when-MKL-DIRECT-CALL-defined/m-p/1501941#M34768</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks for posting in Intel Communities.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;We are able to see the similar behavior at our end. We working on your issue, and we will get back to you soon.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Varsha&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 05 Jul 2023 11:11:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Warning-in-cblas-macro-when-MKL-DIRECT-CALL-defined/m-p/1501941#M34768</guid>
      <dc:creator>VarshaS_Intel</dc:creator>
      <dc:date>2023-07-05T11:11:10Z</dc:date>
    </item>
    <item>
      <title>Re: Warning in cblas macro when MKL_DIRECT_CALL defined</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Warning-in-cblas-macro-when-MKL-DIRECT-CALL-defined/m-p/1504296#M34806</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your patience.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The issue raised by you is being looked at by the development team. We will update you once the issue is fixed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards,&lt;BR /&gt;Varsha&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2023 06:50:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Warning-in-cblas-macro-when-MKL-DIRECT-CALL-defined/m-p/1504296#M34806</guid>
      <dc:creator>VarshaS_Intel</dc:creator>
      <dc:date>2023-07-27T06:50:40Z</dc:date>
    </item>
    <item>
      <title>Re:Warning in cblas macro when MKL_DIRECT_CALL defined</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Warning-in-cblas-macro-when-MKL-DIRECT-CALL-defined/m-p/1511690#M34915</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thank you for your patience. &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;The issue raised by you has been targeted to be fixed in&amp;nbsp;&lt;STRONG&gt;oneMKL 2024.0&lt;/STRONG&gt; version which will be released in the coming months. If the issue still persists with the new release, then you can start a new discussion for the community to investigate.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Please check the below link for all the updates regarding the Intel oneMKL, please find the link for release notes:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.intel.com/content/www/us/en/developer/articles/release-notes/onemkl-release-notes.html" target="_blank"&gt;https://www.intel.com/content/www/us/en/developer/articles/release-notes/onemkl-release-notes.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Have a Good Day!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Varsha&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 07 Aug 2023 13:24:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Warning-in-cblas-macro-when-MKL-DIRECT-CALL-defined/m-p/1511690#M34915</guid>
      <dc:creator>VarshaS_Intel</dc:creator>
      <dc:date>2023-08-07T13:24:42Z</dc:date>
    </item>
  </channel>
</rss>

