- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear all,
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
g++ -DNDEBUG -O3 -o test_mkl_sparse csr_boost_intel.o boost_matrix_utilities.o -L/home/utab/intel/composerxe-2011.3.174/mkl/lib/intel64 -L /home/utab/thesis/intel_mkl \\
-lboost_filesystem -lboost_system -Wl,--start-group -lmkl_intel_ilp64 -lmkl_gnu_thread -lmkl_core -Wl,--end-group -fopenmp -lpthread
And here is my naive matrix-vector multiplication code:
#include
#include
#include
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
g++ -DNDEBUG -O3 -o test_mkl_sparse csr_boost_intel.o boost_matrix_utilities.o -L/home/utab/intel/composerxe-2011.3.174/mkl/lib/intel64 -L /home/utab/thesis/intel_mkl \\
-lboost_filesystem -lboost_system -Wl,--start-group -lmkl_intel_ilp64 -lmkl_gnu_thread -lmkl_core -Wl,--end-group -fopenmp -lpthread
And here is my naive matrix-vector multiplication code:
#include
#include
#include
Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The answer is
double y[3]
so output array should also be allocated...
double y[3]
so output array should also be allocated...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
-L$(MKLROOT)/lib/intel64 -Wl,--start-group -lmkl_intel_ilp64 -lmkl_sequential -lmkl_core -Wl,--end-group -lpthread
by changing to sequential dynamic linking on gnu c++ compiler using ilp64 and I did not select any cluster libraries since sequential mpi options are not accesible. Compiles and links fine.
I use the "mkl_types.h" to use the MKL_INT to define my arrays in C++, if this is what you mean by 64 bit integer conformance.
Your last question is not clear to me, what do you mean by stack settings, can your please rephrase that?
One more question since last night.
I am trying to multiply a 36234X36234 matrix by a dense vector with the same code. It thas732322 nnz. I am running into a strange problem
#include
#include
#include
-L$(MKLROOT)/lib/intel64 -Wl,--start-group -lmkl_intel_ilp64 -lmkl_sequential -lmkl_core -Wl,--end-group -lpthread
by changing to sequential dynamic linking on gnu c++ compiler using ilp64 and I did not select any cluster libraries since sequential mpi options are not accesible. Compiles and links fine.
I use the "mkl_types.h" to use the MKL_INT to define my arrays in C++, if this is what you mean by 64 bit integer conformance.
Your last question is not clear to me, what do you mean by stack settings, can your please rephrase that?
One more question since last night.
I am trying to multiply a 36234X36234 matrix by a dense vector with the same code. It thas732322 nnz. I am running into a strange problem
#include
#include
#include
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
I thought you had to set the include path explicitly to the ilp64 directory to get mkl includes to work with ilp64.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Tim,
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.
Best,
Umut
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.
Best,
Umut
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Wedding Hairstyles
Wedding Hairstyles
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page