Community
cancel
Showing results for 
Search instead for 
Did you mean: 
flygaoonly
Beginner
154 Views

Sparse Hermitian matrix and vector multiplication

In MKL, are there functions or subroutines that can performcomplex sparse Hermitian matrix and vector multiplication? I only saw the one for sparse symmetrical matrix.
0 Kudos
12 Replies
Sergey_K_Intel1
Employee
154 Views

MKL has got sparse matrix-vector multiply several routines for Hermitian matrices and one of them is

call mkl_zcsrmv(transa, m, k, alpha, matdescra, val, indx, pntrb, pntre, x, beta, y)

In the case of Hermitian matrix, the first element of the parameter

matdescra

CHARACTER. Array of six elements, specifies properties of the matrix used for operation.

must be H or h.

All the best
Sergey

flygaoonly
Beginner
154 Views

I got it. Thank you very much.
flygaoonly
Beginner
154 Views

Another thing. If I want to compile my program (bdg.f90 which uses mkl_ccoomv) on a Linux system, can I use the following command:

ifort bdg.f90 -L /opt/intel/mkl/10.0.1.014/lib/em64t -I /opt/intel/mkl/10.0.1.014/include -lmkl_intel -lmkl_intel_thread -lmkl_core -liomp5 -lpthread

If not, what command should I use? Thank you.
flygaoonly
Beginner
154 Views

After reading the User's Guide, I use the following command to compile my program bdg.f90, in which I called mkl_ccoomv.

ifort bdg.f90 -L/opt/intel/mkl/10.0.1.014/lib/em64t -I/opt/intel/mkl/10.0.1.014/include -Wl,--start-group /opt/intel/mkl/10.0.1.014/lib/em64t/libmkl_em64t.a /opt/intel/mkl/10.0.1.014/lib/em64t/libmkl_blas95.a /opt/intel/mkl/10.0.1.014/lib/em64t/libmkl_intel_lp64.a /opt/intel/mkl/10.0.1.014/lib/em64t/libmkl_intel_thread.a /opt/intel/mkl/10.0.1.014/lib/em64t/libmkl_core.a -Wl,--end-group -lmkl -lguide -lpthread

But I still got the following error:

undefined reference to 'mkl_ccoomv'

What's wrong with it, can you give me some advice? Thanks.
barragan_villanueva_
Valued Contributor I
154 Views

Hi,

Please use Intel MKL Link Line Advisor
E.g., for MKL 10.0 it should be:

-lmkl_blas95_lp64 $(MKLROOT)/lib/em64t/libmkl_solver_lp64.a -Wl,--start-group $(MKLROOT)/lib/em64t/libmkl_intel_lp64.a $(MKLROOT)/lib/em64t/libmkl_intel_thread.a $(MKLROOT)/lib/em64t/libmkl_core.a -Wl,--end-group -openmp -lpthread
flygaoonly
Beginner
154 Views

Thank you for your advice. However, as you suggested, I use the following command:

ifort bdg.f90 -lmkl_blas95_lp64 /opt/intel/mkl/10.0.1.014/lib/em64t/libmkl_solver_lp64.a -Wl,--start-group /opt/intel/mkl/10.0.1.014/lib/em64t/libmkl_intel_lp64.a /opt/intel/mkl/10.0.1.014/lib/em64t/libmkl_intel_thread.a /opt/intel/mkl/10.0.1.014/lib/em64t/libmkl_core.a -Wl,--end-group -openmp -lpthread

There is an error:

ld: cannot find -lmkl_blas95_lp64

The same thing happans if I use

ifort bdg.f90 -I/opt/intel/include/em64t/lp64 -lmkl_blas95_lp64 /opt/intel/mkl/10.0.1.014/lib/em64t/libmkl_solver_lp64.a -Wl,--start-group /opt/intel/mkl/10.0.1.014/lib/em64t/libmkl_intel_lp64.a /opt/intel/mkl/10.0.1.014/lib/em64t/libmkl_intel_thread.a /opt/intel/mkl/10.0.1.014/lib/em64t/libmkl_core.a -Wl,--end-group -openmp -lpthread

So what's the problem?
barragan_villanueva_
Valued Contributor I
154 Views

Sorry,

libmkl_blas95_lp64.a was introduced in MKL 10.2 only but you use MKL 10.0. MKL Link Advisor is to be fixed.
So please try to link your program without it.
flygaoonly
Beginner
154 Views

Without it, I then use

ifort bdg.f90 /opt/intel/mkl/10.0.1.014/lib/em64t/libmkl_solver_lp64.a -Wl,--start-group /opt/intel/mkl/10.0.1.014/lib/em64t/libmkl_intel_lp64.a /opt/intel/mkl/10.0.1.014/lib/em64t/libmkl_intel_thread.a /opt/intel/mkl/10.0.1.014/lib/em64t/libmkl_core.a -Wl,--end-group -openmp -lpthread

but still got "undefined reference to mkl_ccoomv".
barragan_villanueva_
Valued Contributor I
154 Views

Hi,
This function was introduced in MKL 10.1 and therefore is missing in MKL 10.0
flygaoonly
Beginner
154 Views

So in this case, is there any other sparse matrix vector multiplication subroutine I can use?
Customer__Intel4
Beginner
154 Views

Hi
In case of using this function with hermitian or symmetric matrix, do we store only the upper / lower triangle or the whole matrix ?
Thanks
154 Views

Quoting tarek.e
Hi
In case of using this function with hermitian or symmetric matrix, do we store only the upper / lower triangle or the whole matrix ?
Thanks


Yes, sure.

Reply