sparse matrix multiplication and segmentation fault?
I am trying to interface some boost ublas csr matrices to mkl sparse matrix routines, I installed and compiled the library without problems and my code is also compiling and linking fine. However, I am getting a segmentation fault during the operation,
I used g++ as the compiler. Here is the link output of the makefile
As far as I know, it's not satisfactory to have implied -lgomp (by setting -fopenmp) when you are using an mkl_xxx_thread library, which requires -liomp5 in place of -lgomp. Maybe the mkl_gnu_thread took care of that. In order to use libmkl_intel_ilp64, you need to assure that all int pointers sent to MKL refer to 64-bit ints (long long, or 64-bit long) and assure that the MKL include directories are the ilp64 ones. In addition, you told us nothing about whether whether you have checked stack settings.
first of all I am not doing things in parallel, actually I can use the library in sequential mode. I used the linker advisor from the website and it gave me -fopenmp option most probably and that is the reason why it is there. But now I updated my linker options to
As you must be aware, it's often necessary to increase the stack limit in your shell, the exact command depending on the shell ('ulimit -s unlimited' or 'limit stacksize ....'). unlimited doesn't mean what it says, it simply means the largest permitted. I don't think you can tell whether a segfault is due to stack, except by trying an increase, or running under debugger. I thought you had to set the include path explicitly to the ilp64 directory to get mkl includes to work with ilp64.
Indeed, the stack size was a problem for my previous post, thank you for mentioning that... Now that work works with the stack size set to maximum permitted. I guess this also explains the reason of the segfault.
hey umut, When the program is executed I tried programming in some test messages
and the program appears to execute all the loops but it returns the
segmentation fault at the end. Of course, this is all just speculation.
Any help would be awesome.