- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi:
I try to use mkl_dss to solve a complex symmetric linear algebra. And the c++ code is:
#include<iostream>
#include<iterator>
#include<complex>
#include<vector>
#include<mkl_dss.h>
int main()
{
_MKL_DSS_HANDLE_t handle;
int opt{MKL_DSS_DEFAULTS};
dss_create(handle,opt);
std::vector<int>rowIndex{1,5,9,13,17,21,25,27,29,30},columns{1,3,7,8,2,3,8,9,3,7,8,9,4,6,7,8,5,6,8,9,6,7,8,9,7,8,8,9,9};
int sym{MKL_DSS_SYMMETRIC_COMPLEX},nRows{rowIndex.size()-1},nCols{nRows},nNonZeros{columns.size()};
dss_define_structure(handle,sym,rowIndex.data(),nRows,nCols,columns.data(),nNonZeros);
dss_reorder(handle,opt,0);
int type{MKL_DSS_INDEFINITE};
std::vector<std::complex<double>>values{14,{-1,-0.05},{-1,-0.05},{-3,-0.15},14,{-1,-0.05},{-3,-0.15},{-1,-0.05},16,{-2,-0.1},{-4,-0.2},{-2,-0.1},14,{-1,-0.05},{-1,-0.05},{-3,-0.15},14,{-1,-0.05},{-3,-0.15},{-1,-0.05},16,{-2,-0.1},{-4,-0.2},{-2,-0.1},16,{-4,-0.2},71,{-4,-0.2},16};
dss_factor_complex(handle,type,values.data());
int nRhs{10};
std::vector<std::complex<double>>rhs(nRows*nRhs,{1,0.05}),solValues(rhs.size());
std::cout<<dss_solve_complex(handle,opt,rhs.data(),nRhs,solValues.data())<<std::endl;
std::copy(solValues.cbegin(),solValues.cend(),std::ostream_iterator<std::complex<double>>{std::cout," "});
dss_delete(handle,opt);
std::cout<<std::endl;
}
the weird stuff is if I just set nRhs less than 6, then it works fine and the answer is correct. However, if I set nRhs greater than 7 then, it will print:
0
segmentation fault
it seems that there is something wrong with dss_solve_complex, it can not deal with multiple right hand side correctly.
I use g++-4.9 and the compile command is g++-4.9 -std=c++11 source.cpp -lmkl_rt, os: linux64
I already check that, if I use the pardiso interface then it works fine.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Chaowen,
What is MKL version you are using and how many core of your machine? The bug looks familiar. we will check the internal bug record.
Best Regards,
Ying
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
The issue looks similar to DPD200530039, the fix will be in MKL 11.2 gold and MKL 11.1.4. ( targeted to be released in the two months)
Best Regards,
Ying
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I install form l_psxe_online_p_2.1.3.020.sh. I know that I can use icc -V or icpc -V to check the version of icc or icpc. But I do not know how to check the version of mkl. Could you tell me how to do that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
One can usually tell the version of MKL from the path of the directory where the MKL files are installed. Or, you can compile and run the following program:
#include <mkl.h> #include <stdio.h> int main(){ char version[200]; mkl_get_version_string(version,200); puts(version); }
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK, my MKL version is 11.1.3 and there are 8 cores on my machine
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have you tried the latest MKL version 11.2 that was released recently as Ying mentioned above that the fix?
Vipin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, the latest MKL version 11.2 solve the problem

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page