CLAPACK: error when testing CBLAS

泪湿孤枕 提交于 2019-12-11 18:10:01

问题


I am getting an error when i test CBLAS in CLAPACK. When i run the test code

./xblat2d < dblat2.in

I get the error output:

"TransA must be 111, 112 or 113, but is set to -1Parameter 2 to routine cblas_dgemv was incorrect"

Does anyone know what kind of problem this indicates?

Details

I am trying not to use reference CBLAS, and use ATLAS CBLAS instead. So, i compiled wrapper library libcblaswr.a and changed the line in make.inc to

BLASLIB     = ../../libcblaswr.a -L/usr/local/atlas/lib -lcblas -L/usr/local/atlas/lib -latlas

CLAPACK installation suggest doing

BLASLIB     = ../../libcblaswr.a -lcblas -latlas

But linker doesn't find cblas and atlas without me using -L option, so i included it.

Details of my setup:

  • Ubunty Lycid Lynx 10.04
  • CLAPACK-3.2.1
  • ATLAS.3.9.51

回答1:


This appears to be a problem with the CLAPACK test in that it passes the wrong parameters to the BLAS routines. In calling dgemv there is an option for the matrix to operate as itself or as the transpose or as the conjugate transpose, corresponding to 111, 112 or 113 (see line 6 of cblas.h). The code in CLAPACK doesn't set the parameter correctly. I haven't looked deep enough to know if this is an issue with just the test or if the issue runs deeper; but I suspect it's just with the test as I haven't run in to this issue using any CLAPACK code.

I have ignored it because 1) I'm not depending on CLAPACK to test the BLAS routines installed by ATLAS and 2) if there's a deeper issue it will cause an error like this rather than produce invalid results, and I'll track it down then.

And yes, the linker won't find -lcblas and -latlas until you install them somewhere normally searched, this is normal.



来源:https://stackoverflow.com/questions/9865321/clapack-error-when-testing-cblas

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!