Hi,
I realise this is not the best place for getting help with HiPLARb, however any help is better than no help.
So, I am getting an error when I try to use the magma library part of HiPLARb for svd().
R: constants.cpp:412: const char *lapack_vec_const(magma_vec_t): Assertion `magma_const >= MagmaNoVec' failed.
If I call hiplarb_mode_plasma() and then run the svd() function there is no issue and the code completes correctly.
Any ideas why this may be?
Thanks,
Josh
MAGMA problem in HiPLARb
Re: MAGMA problem in HiPLARb
It looks like they are assuming constants used in MAGMA 1.4 and earlier. The constants MagmaLower, MagmaUpper, etc. were changed from chars to enums in 1.5. The quickest fix is to change instances of *trans, *uplo, *job, *diag, etc. to, respectively:
Here are instances that I could find using grep.
Attached is an UNTESTED patch that should fix this. I don't have all the software dependencies installed to compile HiPLARb, nor know how to use it. Apply using patch, e.g.,
src/HiPLARb> patch -p1 < ../HiPLARb.patch
patching file src/magma_matprod.c
patching file src/magma_wrapper.c
Let us know how it goes. If that works, ideally it should be submitted to HiPLARb.
Other packages may need similar updates.
A cleaner fix would be to use magma_uplo_t, magma_trans_t, etc. types instead of char*, and MagmaLower, MagmaUpper, etc. constants instead of "L", "U", etc. These are documented here:
http://icl.cs.utk.edu/projectsfiles/mag ... tants.html
-mark
Code: Select all
magma_trans_const( *trans )
magma_uplo_const( *uplo )
magma_job_const( *job )
magma_diag_const( *diag )
etc.
Code: Select all
src/HiPLARb> grep -R 'magma.*\* *(trans|job|uplo|side|diag)' .
./src/magma_matprod.c: //magmablas_dgemm(*transa, *transb, nrx, ncy, ncx,
./src/magma_matprod.c: magmablas_zgemm(*transa, *transb, nrx, ncy, ncx,
./src/magma_matprod.c: magma_dsyrk(*uplo, *trans, nc, nr, one, d_A, nr, zero, d_C, nc);
./src/magma_matprod.c: //magmablas_dgemm(*transa, *transb, ncx, ncy, nrx,
./src/magma_matprod.c: magmablas_zgemm(*transa, *transb, ncx, ncy, nrx,
./src/magma_matprod.c: magma_dsyrk(*uplo, *trans, nr, nc, one, d_A, nr, zero, d_C, nr);
./src/magma_matprod.c: //magmablas_dgemm(*transa, *transb, nrx, nry, ncx,
./src/magma_matprod.c: magmablas_zgemm(*transa, *transb, nrx, nry, ncx,
./src/magma_wrapper.c: magmablas_dtrsm(*side, *uplo, *transa, *diag, *n, *nb, one, dA, *ldt, dB, *ldb);
./src/magma_wrapper.c: magma_dgeev_m(*jobVL, *jobVR, n, xvals, n, wR, wI, left, n, right, n, &tmp, lwork, &info);
./src/magma_wrapper.c: magma_dgeev(*jobVL, *jobVR, n, xvals, n, wR, wI,
./src/magma_wrapper.c: magma_dgeev_m(*jobVL, *jobVR, n, xvals, n, wR, wI,
./src/magma_wrapper.c: magma_dgeev(*jobVL, *jobVR, n, xvals, n, wR, wI,
./src/magma_wrapper.c: magma_zgeev(*jobVL, *jobVR, n, (cuDoubleComplex *)xvals, n,
./src/magma_wrapper.c: magma_zgeev(*jobVL, *jobVR, n, (cuDoubleComplex *)xvals, n,
src/HiPLARb> patch -p1 < ../HiPLARb.patch
patching file src/magma_matprod.c
patching file src/magma_wrapper.c
Let us know how it goes. If that works, ideally it should be submitted to HiPLARb.
Other packages may need similar updates.
A cleaner fix would be to use magma_uplo_t, magma_trans_t, etc. types instead of char*, and MagmaLower, MagmaUpper, etc. constants instead of "L", "U", etc. These are documented here:
http://icl.cs.utk.edu/projectsfiles/mag ... tants.html
-mark
- Attachments
-
- HiPLARb.patch.txt
- Patch for HiPLARb version 0.1.4
- (7.72 KiB) Downloaded 155 times
-
jcbowden12
- Posts: 14
- Joined: Tue Mar 06, 2012 2:36 am
Re: MAGMA problem in HiPLARb
Dear Mark,
Thanks for your reply, and the patch.
It does seem a problem with using a newer version of magma as we have tried an LD_PRELOAD of the magma 1.4.1 version and the problem went away.
I'll tell you how the patch works out though.
Regards,
Josh.
Thanks for your reply, and the patch.
It does seem a problem with using a newer version of magma as we have tried an LD_PRELOAD of the magma 1.4.1 version and the problem went away.
I'll tell you how the patch works out though.
Regards,
Josh.
Re: MAGMA problem in HiPLARb
Is there a location which charts the changes in interface which have happened with different versions of Magma?
Thanks
John
Thanks
John
-
jcbowden12
- Posts: 14
- Joined: Tue Mar 06, 2012 2:36 am
Re: MAGMA problem in HiPLARb
Hi again,
The as revived HiPLARb 0.1.4 code was all based on earlier MAGMA interface. I have gone through the package source code and changed the magma calls to use the magma_XYZ_const() constant conversion functions and all seems to work well with version 1.7.0 of MAGMA. HiPLARb seems to run into issues with MAGMA 2.0, however i'm leaving that problem for the moment.
Cheers,
Josh
The as revived HiPLARb 0.1.4 code was all based on earlier MAGMA interface. I have gone through the package source code and changed the magma calls to use the magma_XYZ_const() constant conversion functions and all seems to work well with version 1.7.0 of MAGMA. HiPLARb seems to run into issues with MAGMA 2.0, however i'm leaving that problem for the moment.
Cheers,
Josh