Not sure how you have everything setup, but when I compile/link with atlas on windows I link against the ATLAS libs in this order:
liblapack
libf77blas
libcblas
libatlas
also this comes from the ATLAS documentation folder in the file named
LibReadme.txt
********************************* LINKING *************************************
When linking, remember that order is important. So, if you want uniprocessor
libs, your link line would contain IN THIS ORDER:
-LLIBDIR -llapack -lcblas -lf77blas -latlas
And if you want to utilize an SMP version, it would be:
-LLIBDIR -llapack -lptcblas -lptf77blas -latlas
I hope this helps and you get the problem figured out. Also I compiled the code you posted fine with my setup.
Jesse
hi,
i looked at previous posts on this topic. did not help, a suggestion
would be appreciated:
installed atlas version 3.6.0-20.6
/usr/lib/atlas3-test runs just fine.
header cblas.h and clapack.h are in /usr/include/ which is by default in
my include path.
Configuration:
-I/usr/local/include/boost_1_34_1
-I/usr/local/include/boost-bindings
-L/usr/lib/atlas
-llapack
-lblas
i'm trying to run the program:
#include <boost/numeric/bindings/atlas/clapack.hpp>
#include <boost/numeric/bindings/traits/ublas_matrix.hpp>
#include <boost/numeric/bindings/traits/std_vector.hpp>
// #include <atlas/cblas.h>
namespace ublas = boost::numeric::ublas;
namespace atlas = boost::numeric::bindings::atlas;
int main() {
std::size_t n = 5;
ublas::matrix<double> a(n, n);
// fill matrix A
std::vector<int> ipiv (n); // pivot vector
atlas::lu_factor (a, ipiv); // alias for getrf()
atlas::lu_invert (a, ipiv); // alias for getri()
return 0;
};
i get the error
Building target: testing_numeric_bindings
Invoking: GCC C++ Linker
g++ -L/usr/lib/atlas -o"testing_numeric_bindings" ./main.o -llapack
-lblas
./main.o: In function
`boost::numeric::bindings::atlas::detail::getrf(CBLAS_ORDER, int, int,
double*, int, int*)':
/usr/local/include/boost-bindings/boost/numeric/bindings/atlas/clapack_overloads.hpp:87:
undefined reference to `clapack_dgetrf'
./main.o: In function
`boost::numeric::bindings::atlas::detail::getri(CBLAS_ORDER, int,
double*, int, int const*)':
/usr/local/include/boost-bindings/boost/numeric/bindings/atlas/clapack_overloads.hpp:163:
undefined reference to `clapack_dgetri'
collect2: ld returned 1 exit status
make: *** [testing_numeric_bindings] Error 1
make: Target `all' not remade because of errors.
Build complete for project testing_numeric_bindings
_______________________________________________
ublas mailing list
ublas@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/ublas