- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I am trying to compile the C programme which uses the MKL subroutine.
For example, mkl_scsrdia
and mkl_scsrcoo,
but when I am trying to compile it,
I am getting error like this.
It seems that I am not linking some path
or flags during the compilation.
icc one.c -L$MKLPATH -I$MKLINCLUDE -lmkl -liomp5 -lpthread
one.c -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -lsplas -lm -lmkl -lguide
nothing wordks, got error like this
one.c(9): catastrophic error: cannot open source file "mkl_spblas.h"
#include <mkl_spblas.h>
^
compilation aborted for one.c (code 4)
Could some one pelase tell me how to fix this problem.
Kind regards,
Mathias
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is your environment correctly set up to use Intel C and MKL? Assuming that you are running in Linux, first try the simple command icc -mkl one.c.
If that works, but you wish to use other options for multi-threading, 8-bytet integers, etc., you will need to change to more elaborate options. Please consult the helpful MKL Link Line Advisor tool at https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The include path -I$MKLINCLUDE is responsible for finding the .h files associated with MKL. If MKL is installed with your icc, sourceing the compilervars.
You should also use a sane order of options in your compile command. As mecej4 said, the link advisor would give you important hints.
![](/skins/images/91F5C79BC69312EC7F389BB9532EE3D4/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page