<?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 Quote:Gianluca G. wrote: in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-gesv-memory-usage/m-p/1009198#M19152</link>
    <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Gianluca G. wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;sorry for the misunderstanding, I thought you were Intel employee.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;No problem; new users often don't realize that this forum is visible to anyone, and that anyone who is interested may obtain an account and then post new messages and replies.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;The question of representing a matrix as vector, was because when I tested the function I got the right result in that way, maybe I did something wrong, I will try without making a copy.&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;As I said above, I am only an occasional user of C#. However, since MKL is mostly Fortran 77, plus smaller parts in Fortran 95 and C, I felt that it should be possible to pass a contiguous array from C# just as it is possible in C and Fortran. A bit of experimentation shows that it works, so you should be able to get rid of the duplicate array and the work of copying back and forth.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;As a test case, I took the dgeev.cs example contained in the second zip file at&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://software.intel.com/en-us/articles/using-intel-mkl-in-your-c-program&amp;nbsp;" target="_blank"&gt;https://software.intel.com/en-us/articles/using-intel-mkl-in-your-c-program&amp;nbsp;&lt;/A&gt;, and changed the type of the array A from double [] to double [,]. Correspondingly, I changed the declared argument type of the function argument A in the prototype declarations. The modified program worked fine. I think that you could try the same way of keeping the compiler happy by telling it "white lies". In other words, Lapack routines only need the address of the base of the array, since they obtain the needed additional information about the shape and size of the array from other arguments (ldA, n).&lt;/P&gt;

&lt;P&gt;Beware that this may be a risky and unapproved practice, and a C# expert may be able to provide a better/safer way.&lt;/P&gt;</description>
    <pubDate>Sat, 10 Oct 2015 21:31:00 GMT</pubDate>
    <dc:creator>mecej4</dc:creator>
    <dc:date>2015-10-10T21:31:00Z</dc:date>
    <item>
      <title>MKL gesv memory usage</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-gesv-memory-usage/m-p/1009187#M19141</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Testing LAPACK_zgesv,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I saw that it allocates a large amount of memory, in particular this can crash my rogram when for example a matrix 5000x5000 is passed.&lt;BR /&gt;
	Is there any alternative solution or option in order to limitate this overuse of memory?&lt;/P&gt;

&lt;P&gt;I'm using MKL 11.3.01 in C# if it can be helpfull.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;

&lt;P&gt;Gianluca&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2015 10:36:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-gesv-memory-usage/m-p/1009187#M19141</guid>
      <dc:creator>Gianluca_G_</dc:creator>
      <dc:date>2015-10-08T10:36:25Z</dc:date>
    </item>
    <item>
      <title>yes, in your case &gt; 40 GB of</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-gesv-memory-usage/m-p/1009188#M19142</link>
      <description>&lt;P&gt;yes, in your case &amp;gt; 40 GB of RAM would require for such cases. May be using only 1RHS may help? but the effect will be very negligible...&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2015 11:02:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-gesv-memory-usage/m-p/1009188#M19142</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2015-10-08T11:02:11Z</dc:date>
    </item>
    <item>
      <title>What do you mean 1RHS?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-gesv-memory-usage/m-p/1009189#M19143</link>
      <description>&lt;P&gt;What do you mean 1RHS?&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;

&lt;P&gt;Gianluca&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2015 11:38:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-gesv-memory-usage/m-p/1009189#M19143</guid>
      <dc:creator>Gianluca_G_</dc:creator>
      <dc:date>2015-10-08T11:38:33Z</dc:date>
    </item>
    <item>
      <title>I think I'm already using (1</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-gesv-memory-usage/m-p/1009190#M19144</link>
      <description>&lt;P&gt;I think I'm already using&amp;nbsp;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;(1 rhs) matrix.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2015 11:55:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-gesv-memory-usage/m-p/1009190#M19144</guid>
      <dc:creator>Gianluca_G_</dc:creator>
      <dc:date>2015-10-08T11:55:39Z</dc:date>
    </item>
    <item>
      <title> </title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-gesv-memory-usage/m-p/1009191#M19145</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;is it possible to avoid the iterative post refinement in order to reduce memory usage?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Oct 2015 08:44:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-gesv-memory-usage/m-p/1009191#M19145</guid>
      <dc:creator>Gianluca_G_</dc:creator>
      <dc:date>2015-10-09T08:44:21Z</dc:date>
    </item>
    <item>
      <title>A double precision complex</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-gesv-memory-usage/m-p/1009192#M19146</link>
      <description>&lt;P&gt;A double precision complex matrix of size 5000 X 5000 occupies just 400 MB, if allocated as a straight two-dimensional array. A single RHS vector of size 5000 occupies 80 kB. If you call any of the siblings of GESV other than DSGESV or ZCGESV, there is no iterative refinement done.&lt;/P&gt;

&lt;P&gt;There is no routine with the name&amp;nbsp;&lt;SPAN style="font-size: 12px; line-height: 10.2857px;"&gt;LAPACK_zgesv. There is ZGESV, and there is Lapacke_zgesv. Which one did you call? How did you allocate your matrices?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px; line-height: 10.2857px;"&gt;Thus, there are a number of discrepancies in the posts of this thread, and they need to be resolved.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Oct 2015 13:20:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-gesv-memory-usage/m-p/1009192#M19146</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2015-10-09T13:20:35Z</dc:date>
    </item>
    <item>
      <title>sorry, I use LAPACKE_zgesv().</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-gesv-memory-usage/m-p/1009193#M19147</link>
      <description>&lt;P&gt;sorry, I use&amp;nbsp;LAPACKE_zgesv().&lt;/P&gt;

&lt;P&gt;below the example, it works but it use a lot of memory.&amp;nbsp;&lt;/P&gt;

&lt;PRE class="brush:csharp;"&gt;[DllImport("mkl_rt.dll", ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)]
        internal static extern int LAPACKE_zgesv(
            int matrix_layout,
            int n,
            int nrhs,
            [In, Out] Complex[] input_matrix,
            int lda,
            [In, Out] int[] ipiv,
            [In, Out] Complex[] b,
            int ldb
        );

        public static Complex[,] MKLResolve(Complex[,] MSL, Complex[,] VTN)
        {
            Complex[] A = MKLMatrix(MSL);
            Complex[] b = MKLVector(VTN);

            int n = MSL.GetLength(0);
            int nrhs = 1;
            int lda = n;
            int ldb = 1;
            int info = 1;

            int[] ipiv = new int&lt;N&gt;;

            info = MKLWrapper.LAPACKE_zgesv(LAPACK_ROW_MAJOR, n, nrhs, A, lda, ipiv, b, ldb);
            if (info == 0)
            {
                Complex[,] res = MatrixGeneric.Create&amp;lt;Complex&amp;gt;(n, true);
                for (int i = 0; i &amp;lt; b.Length; i++)
                {
                    res[i + 1, 1] = b&lt;I&gt;;
                }
                return res;
            }
            else
            {
                return null;
            }
        }&lt;/I&gt;&lt;/N&gt;&lt;/PRE&gt;

&lt;P&gt;Thks&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Oct 2015 13:31:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-gesv-memory-usage/m-p/1009193#M19147</guid>
      <dc:creator>Gianluca_G_</dc:creator>
      <dc:date>2015-10-09T13:31:01Z</dc:date>
    </item>
    <item>
      <title>Line-15 of #7 makes a copy of</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-gesv-memory-usage/m-p/1009194#M19148</link>
      <description>&lt;P&gt;Line-15 of #7 makes a copy of the matrix, thereby doubling the memory footprint of the program. Such copying is fine when the matrices are small or when the program is being debugged, but is it really necessary to do this with a 5000 X 5000 matrix?&lt;/P&gt;

&lt;P&gt;If you are saving a copy simply to be able to obtain solutions with other RHS vectors, instead of calling GESV you can call GETRF to do the factorization once and then call GETRS as many times as needed to obtain solutions.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Oct 2015 16:32:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-gesv-memory-usage/m-p/1009194#M19148</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2015-10-09T16:32:02Z</dc:date>
    </item>
    <item>
      <title>The copy is because your</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-gesv-memory-usage/m-p/1009195#M19149</link>
      <description>&lt;P&gt;The copy is because your function accept a vector in input! the matrix is rappresented as vector.&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;So, I have a matrix Complex[,] and convert it in a Vector Complex[], otherwise I can't use the function, is there other possibilities, remeber that I'm working in C#.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Oct 2015 16:39:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-gesv-memory-usage/m-p/1009195#M19149</guid>
      <dc:creator>Gianluca_G_</dc:creator>
      <dc:date>2015-10-09T16:39:05Z</dc:date>
    </item>
    <item>
      <title>Quote:Gianluca G. wrote:</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-gesv-memory-usage/m-p/1009196#M19150</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Gianluca G. wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;The copy is because &lt;STRONG&gt;your &lt;/STRONG&gt;function accept a vector in input! the matrix is represented as vector.&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Please note that Intel employees usually signal their status by having "(Intel)" as part of their name. I am a forum member with the same status as you. It is not clear which MKL function you refer to as "your function". The C-interface function, the Fortran interface function, or a C# interface function. If the last, I don't know anything about it, whether it came from Intel or somewhere else.&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;So, I have a matrix Complex[,] and convert it in a Vector Complex[], otherwise I can't use the function, is there other possibilities, remember that I'm working in C#.&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;If you look in the MKL-C reference manual, you will see that the type of the A and B matrix arguments is &lt;SPAN class="kwd" style="font-family: 'Courier New', Courier, monospace; color: rgb(51, 51, 51); font-size: 13.3333px; line-height: 20px;"&gt;lapack_complex_double&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="kwd" style="font-family: 'Courier New', Courier, monospace; color: rgb(51, 51, 51); font-size: 13.3333px; line-height: 20px;"&gt;*&lt;/SPAN&gt;. Therefore, what is passed is just the base address of the array. Whether that array is one or two-dimensional is immaterial. In fact, the LDA and LDB arguments are provided just to map double subscripts to offsets relative to the base of the array. If you now use a number of wrapper routines to conform to the stricter type rules of C# (as compared to C or Fortran), you may well box yourself into a corner where you are forced to make a copy of a huge matrix, costing you both memory and CPU time. I am only an occasional user of C#, and I do not know anything about the wrappers that you use, so I cannot provide specific advice. I have a hunch that it may be possible to typecast a reference to a two-dimensional array into a reference to a one-dimensional array, just as you can in C. Were it not so, C# would not be suitable for the kind of work that you have undertaken.&lt;/P&gt;</description>
      <pubDate>Sat, 10 Oct 2015 15:10:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-gesv-memory-usage/m-p/1009196#M19150</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2015-10-10T15:10:00Z</dc:date>
    </item>
    <item>
      <title> </title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-gesv-memory-usage/m-p/1009197#M19151</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;sorry for the misunderstanding, I thought you were Intel employee.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;The question of representing a matrix as vector, was because when I tested the function I got the right result in that way, maybe I did something wrong, I will try without making a copy.&lt;/P&gt;

&lt;P&gt;Thank you very much&lt;/P&gt;</description>
      <pubDate>Sat, 10 Oct 2015 19:48:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-gesv-memory-usage/m-p/1009197#M19151</guid>
      <dc:creator>Gianluca_G_</dc:creator>
      <dc:date>2015-10-10T19:48:33Z</dc:date>
    </item>
    <item>
      <title>Quote:Gianluca G. wrote:</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-gesv-memory-usage/m-p/1009198#M19152</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Gianluca G. wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;sorry for the misunderstanding, I thought you were Intel employee.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;No problem; new users often don't realize that this forum is visible to anyone, and that anyone who is interested may obtain an account and then post new messages and replies.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;The question of representing a matrix as vector, was because when I tested the function I got the right result in that way, maybe I did something wrong, I will try without making a copy.&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;As I said above, I am only an occasional user of C#. However, since MKL is mostly Fortran 77, plus smaller parts in Fortran 95 and C, I felt that it should be possible to pass a contiguous array from C# just as it is possible in C and Fortran. A bit of experimentation shows that it works, so you should be able to get rid of the duplicate array and the work of copying back and forth.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;As a test case, I took the dgeev.cs example contained in the second zip file at&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://software.intel.com/en-us/articles/using-intel-mkl-in-your-c-program&amp;nbsp;" target="_blank"&gt;https://software.intel.com/en-us/articles/using-intel-mkl-in-your-c-program&amp;nbsp;&lt;/A&gt;, and changed the type of the array A from double [] to double [,]. Correspondingly, I changed the declared argument type of the function argument A in the prototype declarations. The modified program worked fine. I think that you could try the same way of keeping the compiler happy by telling it "white lies". In other words, Lapack routines only need the address of the base of the array, since they obtain the needed additional information about the shape and size of the array from other arguments (ldA, n).&lt;/P&gt;

&lt;P&gt;Beware that this may be a risky and unapproved practice, and a C# expert may be able to provide a better/safer way.&lt;/P&gt;</description>
      <pubDate>Sat, 10 Oct 2015 21:31:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-gesv-memory-usage/m-p/1009198#M19152</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2015-10-10T21:31:00Z</dc:date>
    </item>
    <item>
      <title> </title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-gesv-memory-usage/m-p/1009199#M19153</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Hi mecej4,&lt;/P&gt;

&lt;P&gt;I confirm that you were right, I tried again my tests with matrixs as input and this &amp;nbsp;works. So I was wrong with my previous ones tests.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Now the memory usage is half!&lt;/P&gt;

&lt;P&gt;just one more question. In a post before, you mentioned that there are two functions: ZGESV, and Lapacke_zgesv which one is better to use, in terms of memory?&lt;/P&gt;

&lt;P&gt;Thank you very much&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Gianluca&lt;/P&gt;</description>
      <pubDate>Mon, 12 Oct 2015 07:35:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-gesv-memory-usage/m-p/1009199#M19153</guid>
      <dc:creator>Gianluca_G_</dc:creator>
      <dc:date>2015-10-12T07:35:36Z</dc:date>
    </item>
    <item>
      <title>Quote:Gianluca G. wrote:</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-gesv-memory-usage/m-p/1009200#M19154</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Gianluca G. wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;In a post before, you mentioned that there are two functions: ZGESV, and Lapacke_zgesv which one is better to use, in terms of memory?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Lapacke_zgesv is just a wrapper around ZGESV. The actual work-horse is ZGESV (and other routines that it may call). In general, going through wrapper routines will entail a slightly higher memory consumption. In most cases, this overhead is negligible. On the other hand, there can be a significant CPU time overhead cost if a wrapper routine has to reorganize and restore a two-dimensional matrix from row-major storage to column-major storage.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;My recommendation is that you use whichever interface is convenient and easy to use, and not worry about slight changes in memory or CPU time consumption.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;For the history of LapackE please see &lt;/SPAN&gt;&lt;A href="https://software.intel.com/en-us/forums/intel-math-kernel-library/topic/300188.&amp;nbsp;" target="_blank"&gt;https://software.intel.com/en-us/forums/intel-math-kernel-library/topic/300188.&amp;nbsp;&lt;/A&gt;;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;For more information on LapackE and to obtain the source code, see&amp;nbsp;&lt;/SPAN&gt;&lt;A href="http://netlib.org/lapack/lapacke.html&amp;nbsp;" target="_blank"&gt;http://netlib.org/lapack/lapacke.html&amp;nbsp;&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Oct 2015 10:53:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-gesv-memory-usage/m-p/1009200#M19154</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2015-10-12T10:53:52Z</dc:date>
    </item>
    <item>
      <title>Thank you</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-gesv-memory-usage/m-p/1009201#M19155</link>
      <description>&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Mon, 12 Oct 2015 12:14:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-gesv-memory-usage/m-p/1009201#M19155</guid>
      <dc:creator>Gianluca_G_</dc:creator>
      <dc:date>2015-10-12T12:14:54Z</dc:date>
    </item>
  </channel>
</rss>

