i m trying to solve L*u=u using blas level2 function dtrsv() for matrix(L) order 100 and vector(u) 100. i linked libraries with "-lblas" at compile time. but, it says undefined reference to dtrsv(). Also how do i calculate Gflops/sec for this.(i m timing the call to dtrsv() )
-
Have you installed any BLAS libraries, as you want to link one by `-lblas` – kangshiyin Oct 27 '13 at 18:26
-
Try `dtrsv_` (Note the trailing underscore.) If that is present then you have the Fortran API but not the C API. – finnw Oct 27 '13 at 18:27
-
i m using dtrsv_ the i m not getting correct values in vector u and i also linked -lblas at compile time.. – user2530405 Oct 27 '13 at 23:03
-
`undefined reference` means either the function you called is not the name you used, or the library you tried to link is not there. So let me ask you again. Have you installed any BLAS libs, or does the library file `libblas.so` or `libblas.a` exist in your system? – kangshiyin Oct 27 '13 at 23:38
-
@Eric:BLAS libraries are installed and code runs fine. i m getting 0's in vector after completion of dtrsv() except for a couple of initial entries like u[0],[1]..and i my ddot() works fine and values in vector come out just fine..i used ddot() just for dot product by sending a row at a time to ddot and other operations for lu=u explicitly performed. – user2530405 Oct 28 '13 at 16:29
-
If your program now compiles & links and you have a problem with invalid results, please post this as a new question (with some source code, especially the part where you declare the matrix, and the dtrsv_ call.) – finnw Nov 07 '13 at 14:12
1 Answers
undefined reference
means either the function you called is not the name you used, or the library you tried to link is not there.
Please check if you have a BLAS library installed in your system, and the correct function name of that library.
If you can run dtrsv()
but cannot get the correct output, you could check if your input data is valid. Please check the reference manual for more details. Here's a version from Intel MKL library.
Description
The ?trsv routines solve one of the systems of equations:
A*x = b, or A'*x = b, or conjg(A')*x = b,
where:
b and x are n-element vectors,
A is an n-by-n unit, or non-unit, upper or lower triangular matrix.
The routine does not test for singularity or near-singularity.
Such tests must be performed before calling this routine.

- 9,681
- 1
- 17
- 29