<?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:Memory needed for dense matrix factorization with ?getrf doubles...? in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Memory-needed-for-dense-matrix-factorization-with-getrf-doubles/m-p/1295860#M31666</link>
    <description>&lt;P&gt;The issue is closing and we will no longer respond to this thread.&amp;nbsp;If you require additional assistance from Intel, please start a new thread.&amp;nbsp;Any further interaction in this thread will be considered community only.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 05 Jul 2021 04:59:53 GMT</pubDate>
    <dc:creator>Gennady_F_Intel</dc:creator>
    <dc:date>2021-07-05T04:59:53Z</dc:date>
    <item>
      <title>Memory needed for dense matrix factorization with ?getrf doubles...?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Memory-needed-for-dense-matrix-factorization-with-getrf-doubles/m-p/1288411#M31479</link>
      <description>&lt;P&gt;We have been using the Intel MKL for many years to solve fully populated matrices.&lt;BR /&gt;Compared to older calculations (some years ago), we have noticed that within the last versions of the MKL the required working memory doubles during the LU factorization process, i.e., a copy of the matrix to be solved is probably created internally, which, however, is actually not absolutely necessary for the factorization.&lt;BR /&gt;Accordingly, only problems with half the number of unknowns can be solved on a given system.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Does anyone know a solution or an option how this behavior can be turned off?&lt;/P&gt;
&lt;P&gt;Thank you for your support, Ralf&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jun 2021 10:21:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Memory-needed-for-dense-matrix-factorization-with-getrf-doubles/m-p/1288411#M31479</guid>
      <dc:creator>BURGI</dc:creator>
      <dc:date>2021-06-09T10:21:19Z</dc:date>
    </item>
    <item>
      <title>Re: Memory needed for dense matrix factorization with ?getrf doubles...?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Memory-needed-for-dense-matrix-factorization-with-getrf-doubles/m-p/1288749#M31487</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you please share a minimal reproducer along with OS details, MKL version?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Rajesh.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 05:42:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Memory-needed-for-dense-matrix-factorization-with-getrf-doubles/m-p/1288749#M31487</guid>
      <dc:creator>MRajesh_intel</dc:creator>
      <dc:date>2021-06-14T05:42:06Z</dc:date>
    </item>
    <item>
      <title>Re: Memory needed for dense matrix factorization with ?getrf doubles...?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Memory-needed-for-dense-matrix-factorization-with-getrf-doubles/m-p/1289957#M31510</link>
      <description>&lt;P&gt;I am currently using Intel MKL versions 2020.0.0 and oneAPI version 2021.2.0 on Windows 10 Professional with MS VisualStudio 2010 and 2019.&lt;BR /&gt;I wrote a small test program that loads a previously stored matrix (complex float, order 26528, approx. 5.3 GB) in an aligned memory area provided with &lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;mkl_alloc&lt;/FONT&gt;&lt;/STRONG&gt; and factorize this matrix using the function &lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;LAPACKE_cgetrf&lt;/FONT&gt;&lt;/STRONG&gt;.&lt;BR /&gt;Immediately after calling the function, the used main memory increases by another 5.3 GB and is released after the factorization is completed.&lt;BR /&gt;Older calculations, which were carried out with the Intel MKL 11.2.0 (07/2014) under LINUX, did not need this additional main memory according to the old protocols. &lt;BR /&gt;Proof of this is also the fact that the matrices used at that time required about 200 GB of main memory and that the factorization and solution was possible on a workstation with a total of 256 GB without swapping.&lt;BR /&gt;I am now trying to get access to a LINUX system to check how it behaves with a current MKL now.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 10:59:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Memory-needed-for-dense-matrix-factorization-with-getrf-doubles/m-p/1289957#M31510</guid>
      <dc:creator>BURGI</dc:creator>
      <dc:date>2021-06-15T10:59:59Z</dc:date>
    </item>
    <item>
      <title>Re:Memory needed for dense matrix factorization with ?getrf doubles...?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Memory-needed-for-dense-matrix-factorization-with-getrf-doubles/m-p/1290362#M31529</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&lt;I&gt;I wrote a small test program that loads a previously stored matrix&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Can you please share the program, so that we can check it on our side.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Rajesh.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 16 Jun 2021 12:51:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Memory-needed-for-dense-matrix-factorization-with-getrf-doubles/m-p/1290362#M31529</guid>
      <dc:creator>MRajesh_intel</dc:creator>
      <dc:date>2021-06-16T12:51:02Z</dc:date>
    </item>
    <item>
      <title>Betreff: Re:Memory needed for dense matrix factorization with ?getrf doubles...?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Memory-needed-for-dense-matrix-factorization-with-getrf-doubles/m-p/1290371#M31530</link>
      <description>&lt;P&gt;Hi Rajesh,&lt;/P&gt;
&lt;P&gt;I am using the following C++ code:&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;// SolveTest.cpp
//

#include &amp;lt;stdint.h&amp;gt;
#include &amp;lt;stdlib.h&amp;gt;
#include &amp;lt;float.h&amp;gt;
#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;math.h&amp;gt;
#include &amp;lt;complex&amp;gt;
#include &amp;lt;Windows.h&amp;gt;

using namespace std; // for &amp;lt;complex&amp;gt;

#define MKL_ILP64
#include "mkl.h"

#define ALIGN_VALUE	64

int main(int argc, char* argv[])
{
	FILE* pFile = NULL;
	DWORD dwOrder, dwError, dwTicks;
	size_t sTotal, sRightSide, sPivot;
	char* pszFileName;
	complex&amp;lt;float&amp;gt;* pMatrix, *pRightSide;
	MKL_INT Order, Info;
	MKL_INT* pPivot;
	MKLVersion ver;

	printf("SolveTest\n");
	if (argc &amp;lt; 2) {
		printf("- no filename defined\n");
		return(1);
	}
	pszFileName = argv[1];
	printf("- loading matrix file %s", pszFileName);
	dwError = fopen_s(&amp;amp;pFile, pszFileName, "rb");
	if (dwError != ERROR_SUCCESS) {
		printf("- error opening file, code %u\n", dwError);
		return(1);
	}
	printf(" - done\n");
	fread(&amp;amp;dwOrder, sizeof(DWORD), 1, pFile);		// order of the matrix
	fread(&amp;amp;sTotal, sizeof(size_t), 1, pFile);		// total size of matrix data
	printf("- complex matrix of order %u found\n", dwOrder);
	sRightSide = dwOrder * sizeof(complex&amp;lt;float&amp;gt;);
	printf("- allocating memory for main matrix (%llu MB)", sTotal / (1024*1024));
	pMatrix = (complex&amp;lt;float&amp;gt; *) mkl_malloc(sTotal, ALIGN_VALUE);
	if (!pMatrix) {
		dwError = GetLastError();
		fclose(pFile);
		printf("\n- no memory for main matrix, code %u\n", dwError);
		return(1);
	}
	printf(" - done\n");
	printf("- reading data");
	if (fread(pMatrix, sTotal, 1, pFile) != 1) {
		dwError = GetLastError();
		fclose(pFile);
		printf("\n- error reading data, code %u\n", dwError);
		return(1);
	}
	printf(" - done\n");
	fclose(pFile);
	printf("- allocating memory for rightside (%llu KB)", sRightSide / 1024);
	pRightSide = (complex&amp;lt;float&amp;gt; *) mkl_malloc(sRightSide, ALIGN_VALUE);
	if (!pRightSide) {
		dwError = GetLastError();
		mkl_free(pMatrix);
		printf("\n- no memory for rightside, code %u\n", dwError);
		return(1);
	}
	printf(" - done\n");
	sPivot = sizeof(MKL_INT) * dwOrder;
	printf("- allocating memory for pivot vector (%llu KB)", sPivot / 1024);
	pPivot = (MKL_INT *) mkl_malloc(sPivot, ALIGN_VALUE);
	if (!pPivot) {
		dwError = GetLastError();
		mkl_free(pMatrix);
		printf("\n- no memory for pivot vector, code %u\n", dwError);
		return(1);
	}
	printf(" - done\n");

// factorization part
	mkl_get_version(&amp;amp;ver);
	printf("\nusing MKL %u.%u.%u (%s)", ver.MajorVersion, ver.MinorVersion, ver.UpdateVersion, ver.Processor);
	printf("\n- starting factorization\n");
	dwTicks = GetTickCount();
	Order = dwOrder;
	Info = LAPACKE_cgetrf(LAPACK_ROW_MAJOR, Order, Order, (MKL_Complex8*) pMatrix, Order, pPivot); // at this point the additional memory usage begins
	dwTicks = GetTickCount() - dwTicks;
	printf("- factorization ended (%u ms)\n", dwTicks);

	mkl_free(pPivot);
	mkl_free(pRightSide);
	mkl_free(pMatrix);
	return(0);
}
&lt;/LI-CODE&gt;
&lt;P&gt;Kind regards,&lt;/P&gt;
&lt;P&gt;Ralf&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jun 2021 13:10:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Memory-needed-for-dense-matrix-factorization-with-getrf-doubles/m-p/1290371#M31530</guid>
      <dc:creator>BURGI</dc:creator>
      <dc:date>2021-06-16T13:10:58Z</dc:date>
    </item>
    <item>
      <title>Re:Memory needed for dense matrix factorization with ?getrf doubles...?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Memory-needed-for-dense-matrix-factorization-with-getrf-doubles/m-p/1290984#M31543</link>
      <description>&lt;P&gt;Ralf,&lt;/P&gt;&lt;P&gt;I am not exactly sure regarding version 11,2 you mentioned:  our LAPACKE_cgetrf implementation is based on Netlib's ones, which makes an additional temporary memory allocation. You may check it follow the link: &lt;/P&gt;&lt;P&gt;&lt;A href="http://www.netlib.org/lapack/explore-html/de/d2c/a01553_a289dd8ce852ba4df4ccdcde60ee6086d.html" target="_blank"&gt;http://www.netlib.org/lapack/explore-html/de/d2c/a01553_a289dd8ce852ba4df4ccdcde60ee6086d.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;Gennady&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 18 Jun 2021 07:07:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Memory-needed-for-dense-matrix-factorization-with-getrf-doubles/m-p/1290984#M31543</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2021-06-18T07:07:55Z</dc:date>
    </item>
    <item>
      <title>Betreff: Re:Memory needed for dense matrix factorization with ?getrf doubles...?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Memory-needed-for-dense-matrix-factorization-with-getrf-doubles/m-p/1290997#M31545</link>
      <description>&lt;P&gt;Hello Gennady,&lt;/P&gt;
&lt;P&gt;thank you for the link, this gave me the explanation of the problem.&lt;/P&gt;
&lt;P&gt;The matrices for our "old" calculations were set up in &lt;FONT color="#333399"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;LAPACK_COL_MAJOR&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt; format, this was then later changed to &lt;FONT color="#333399"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;LAPACK_ROW_MAJOR&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt; for ease of reading and using other solution methods.&lt;/P&gt;
&lt;P&gt;The code of &lt;FONT color="#333399"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;lapacke_cgetrf_work.c&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt; now clearly shows that in this case additional memory is used during the factorization process for the required transformations using &lt;FONT color="#333399"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;LAPACKE_cge_trans&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;. The problem is therefore not due to the MKL version used.&lt;BR /&gt;Even if this additional memory is actually not mandatory for such a simple transformation, perhaps a short note in the documentation about this topic for &lt;FONT color="#333399"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;*getrf&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt; would be helpful for other users.&lt;/P&gt;
&lt;P&gt;I will test this within the next days by changing back my matrix structure to the COL_MAJOR format for test purposes.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;With kind regards&lt;BR /&gt;Ralf&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jun 2021 07:57:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Memory-needed-for-dense-matrix-factorization-with-getrf-doubles/m-p/1290997#M31545</guid>
      <dc:creator>BURGI</dc:creator>
      <dc:date>2021-06-18T07:57:27Z</dc:date>
    </item>
    <item>
      <title>Re:Memory needed for dense matrix factorization with ?getrf doubles...?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Memory-needed-for-dense-matrix-factorization-with-getrf-doubles/m-p/1295860#M31666</link>
      <description>&lt;P&gt;The issue is closing and we will no longer respond to this thread.&amp;nbsp;If you require additional assistance from Intel, please start a new thread.&amp;nbsp;Any further interaction in this thread will be considered community only.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 05 Jul 2021 04:59:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Memory-needed-for-dense-matrix-factorization-with-getrf-doubles/m-p/1295860#M31666</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2021-07-05T04:59:53Z</dc:date>
    </item>
  </channel>
</rss>

