cusparseCreateCsr can not be analyzed when I use cuda as Backend
ripplesding opened this issue · 2 comments
ripplesding commented
#include "amgcl/amg.hpp"
#include "amgcl/solver/cg.hpp"
#include "amgcl/adapter/crs_tuple.hpp"
#include "amgcl/backend/cuda.hpp"
#include "amgcl/coarsening/smoothed_aggregation.hpp"
#include "amgcl/relaxation/spai0.hpp"
#include "amgcl/solver/cg.hpp"
#include "amgcl/make_solver.hpp"
typedef amgcl::backend::cuda<double> Backend;
typedef amgcl::backend::crs<double, int> SparseMatrixAMG;
typedef amgcl::make_solver<
amgcl::amg<
Backend,
amgcl::coarsening::smoothed_aggregation,
amgcl::relaxation::spai0
>,
amgcl::solver::cg<Backend>
> Solver;
// when I run Solver solve, there is a error shows “cusparseCreateCsr can not be analyzed ”
std::vector<int> ptr, col;
std::vector<double> val, rhs;
int n = poisson(1000, ptr, col, val, rhs); // fill data
Solver solve(std::tie(n, ptr, col, val));
ddemidov commented
Can you try solving the same problem with the builtin backend?
ripplesding commented
Yes, its OK with builtin. And after adding cusparse.lib to my VS project, it runs well with cuda now. Thank you~