- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I would like to implement the QR factorization for big matrix size.
When I use sgeqrf and larft functions alone (just compiled with icc), there is no problem.
If I want to use some Cublas function like sgemm, I have to compile with nvcc.
The problem is, when I compile, I have this error :
error : argument of type "int *" is incompatible with parameter of type "const long long *", at line of calling geqrf and larft functions, whereas these functions require int* ...
I've replaced the geqrf function from Mkl by the geqrf function of Cula.
It works, but the problem persist with the larft function ...
Here is my makefile :
CC=nvcc
CFLAG=-O3
LIBS=-lcuda -lcudart -lcula -lcublas -m64 -DMKL_ILP64
INCLUDE_CULA=/usr/local/cula//include
LIB_CULA=/usr/local/cula//lib64
INCLUDE_MKL=/opt/intel/mkl/include
build 64:
$(CC) $(CFLAG) -DReal=float qrBlocT2.cu $(LIBS) -I$(INCLUDE_CULA) -L$(LIB_CULA) -I$(INCLUDE_MKL) --linker-options /opt/intel/mkl/lib/intel64/libmkl_intel_lp64.a,/opt/intel/mkl/lib/intel64/libmkl_sequential.a,/opt/intel/mkl/lib/intel64/libmkl_core.a,-lpthread -o qrBlocTGPU
Has someone have any ideas ?
Thank you.
I would like to implement the QR factorization for big matrix size.
When I use sgeqrf and larft functions alone (just compiled with icc), there is no problem.
If I want to use some Cublas function like sgemm, I have to compile with nvcc.
The problem is, when I compile, I have this error :
error : argument of type "int *" is incompatible with parameter of type "const long long *", at line of calling geqrf and larft functions, whereas these functions require int* ...
I've replaced the geqrf function from Mkl by the geqrf function of Cula.
It works, but the problem persist with the larft function ...
Here is my makefile :
CC=nvcc
CFLAG=-O3
LIBS=-lcuda -lcudart -lcula -lcublas -m64 -DMKL_ILP64
INCLUDE_CULA=/usr/local/cula//include
LIB_CULA=/usr/local/cula//lib64
INCLUDE_MKL=/opt/intel/mkl/include
build 64:
$(CC) $(CFLAG) -DReal=float qrBlocT2.cu $(LIBS) -I$(INCLUDE_CULA) -L$(LIB_CULA) -I$(INCLUDE_MKL) --linker-options /opt/intel/mkl/lib/intel64/libmkl_intel_lp64.a,/opt/intel/mkl/lib/intel64/libmkl_sequential.a,/opt/intel/mkl/lib/intel64/libmkl_core.a,-lpthread -o qrBlocTGPU
Has someone have any ideas ?
Thank you.
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
It seems you should NOT specify-DMKL_ILP64 macros within your compiler options.
MKL_ILP64 macros indicates that you want to use ILP64 mode (that means MKL_INT type used in all MKL interfaces would be "long long int" instead of "int"). Please try just to remove it.
P.S. If you want the program works with -DMKL_ILP64 you must do as follows:
1)Link with libmkl_intel_ilp64.a instead libmkl_intel_lp64.a
2) Make sure all your integer parameters passed to MKL are of "long long int" type where it'srequired by the interface.
Regards,
Konstantin
It seems you should NOT specify-DMKL_ILP64 macros within your compiler options.
MKL_ILP64 macros indicates that you want to use ILP64 mode (that means MKL_INT type used in all MKL interfaces would be "long long int" instead of "int"). Please try just to remove it.
P.S. If you want the program works with -DMKL_ILP64 you must do as follows:
1)Link with libmkl_intel_ilp64.a instead libmkl_intel_lp64.a
2) Make sure all your integer parameters passed to MKL are of "long long int" type where it'srequired by the interface.
Regards,
Konstantin
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
It seems you should NOT specify-DMKL_ILP64 macros within your compiler options.
MKL_ILP64 macros indicates that you want to use ILP64 mode (that means MKL_INT type used in all MKL interfaces would be "long long int" instead of "int"). Please try just to remove it.
P.S. If you want the program works with -DMKL_ILP64 you must do as follows:
1)Link with libmkl_intel_ilp64.a instead libmkl_intel_lp64.a
2) Make sure all your integer parameters passed to MKL are of "long long int" type where it'srequired by the interface.
Regards,
Konstantin
It seems you should NOT specify-DMKL_ILP64 macros within your compiler options.
MKL_ILP64 macros indicates that you want to use ILP64 mode (that means MKL_INT type used in all MKL interfaces would be "long long int" instead of "int"). Please try just to remove it.
P.S. If you want the program works with -DMKL_ILP64 you must do as follows:
1)Link with libmkl_intel_ilp64.a instead libmkl_intel_lp64.a
2) Make sure all your integer parameters passed to MKL are of "long long int" type where it'srequired by the interface.
Regards,
Konstantin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Using CULA is very straightforward. I have used CULA with MKL with minimal changes. The only difference between CULA and MKL is that you need to pass the values to CULA, instead of pointer. I have not used geqrf, but there shouldn't be big differences. For example, the code below works OK for me:
MKL version
CULA version
D.
MKL version
[bash]dgetrf(&nCells, &nCells, MKLinvP, &nCells, ipiv, &info); [/bash]
CULA version
[bash]culaDgetrf(nCells, nCells, MKLinvP, nCells, ipiv); [/bash]
D.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Konstantin, the code works now !
I've just removed -DMKL_ILP64.
Thank you Dan. I know that Cula is staightforward. I use the geqrf function from CULA, but CULA haven't an equivalent for larft function from Mkl ... ( construction of T for the YTY' representation )
Thank you!
I've just removed -DMKL_ILP64.
Thank you Dan. I know that Cula is staightforward. I use the geqrf function from CULA, but CULA haven't an equivalent for larft function from Mkl ... ( construction of T for the YTY' representation )
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've another problem.
When I use only Mkl's functions, the larft function take 3508 ms.
In my code with Mkl', Cula' and Cublas' functions, (compil with the Makefile I've shown, with nvcc), the larft function (Mkl) take 7845 ms !!!
Do you have any idea ? How it's possible ?
Thanks.
When I use only Mkl's functions, the larft function take 3508 ms.
In my code with Mkl', Cula' and Cublas' functions, (compil with the Makefile I've shown, with nvcc), the larft function (Mkl) take 7845 ms !!!
Do you have any idea ? How it's possible ?
Thanks.

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