Thanks Mat,
now it works well, also if performance are more or less the same (the code is memory bound). What I don’t understand instead, when I use cublasSaxpy in a real big code, I get:
NVFORTRAN-S-0155-Could not resolve generic procedure cublassaxpy
From here:
I read could be a parameter mismatch, but parameters are right in my code. Any other possible causes of such error? Thanks:
subroutine project1_a_omp(xbar,bbar,b,xx,bb,n,m,w,ifwt,ifvec) use cublas .... !$OMP TARGET DATA MAP(TOFROM:alpha) do k = 2,m alpha_d = alpha(k) call cublasSaxpy(n, alpha_d, xx(:,k), 1, xbar, 1) call cublasSaxpy(n, alpha_d, bb(:,k), 1, bbar, 1) call cublasSaxpy(n, -alpha_d, bb(:,k), 1, b, 1) enddo ....
!$omp end target data