Commit d3951c80 authored by Carolin Penke's avatar Carolin Penke
Browse files

OpenMP working

parent 03370064
......@@ -1067,10 +1067,17 @@
! B2]
if ( lre > lrs .and. l_cols > lcs ) then
call obj%timer%start("blas")
call PRECISION_GEMM('N', 'N', lre-lrs+1, n_cols, l_cols-lcs+1, &
ONE, a_mat(lrs,lcs), ubound(a_mat,dim=1), &
umcCPU(lcs,n_cols+1), ubound(umcCPU,dim=1), &
ZERO, vmrCPU(lrs,n_cols+1), ubound(vmrCPU,dim=1))
if (isSkewsymmetric) then
call PRECISION_GEMM('N', 'N', lre-lrs+1, n_cols, l_cols-lcs+1, &
-ONE, a_mat(lrs,lcs), ubound(a_mat,dim=1), &
umcCPU(lcs,n_cols+1), ubound(umcCPU,dim=1), &
ZERO, vmrCPU(lrs,n_cols+1), ubound(vmrCPU,dim=1))
else
call PRECISION_GEMM('N', 'N', lre-lrs+1, n_cols, l_cols-lcs+1, &
ONE, a_mat(lrs,lcs), ubound(a_mat,dim=1), &
umcCPU(lcs,n_cols+1), ubound(umcCPU,dim=1), &
ZERO, vmrCPU(lrs,n_cols+1), ubound(vmrCPU,dim=1))
endif
call obj%timer%stop("blas")
endif
......
......@@ -627,22 +627,36 @@
! Transform diagonal block
if (wantDebug) call obj%timer%start("blas")
#if REALCASE == 1
call PRECISION_SYMV('L', nc, tau, ab(1,ns), 2*nb-1, hv, 1, ZERO, hd, 1)
if (isSkewsymmetric) then
! call PRECISION_SSMV('L', nc, tau, ab(1,ns), 2*nb-1, hv, 1, ZERO, hd, 1)
call dssmv('L', nc, tau, ab(1,ns), 2*nb-1, hv, 1, ZERO, hd, 1)
else
call PRECISION_SYMV('L', nc, tau, ab(1,ns), 2*nb-1, hv, 1, ZERO, hd, 1)
endif
#endif
#if COMPLEXCASE == 1
call PRECISION_HEMV('L', nc, tau, ab(1,ns), 2*nb-1, hv, 1, ZERO, hd, 1)
#endif
if (wantDebug) call obj%timer%stop("blas")
#if REALCASE == 1
x = dot_product(hv(1:nc),hd(1:nc))*tau
if (.NOT. isSkewsymmetric) then
x = dot_product(hv(1:nc),hd(1:nc))*tau
endif
#endif
#if COMPLEXCASE == 1
x = dot_product(hv(1:nc),hd(1:nc))*conjg(tau)
#endif
hd(1:nc) = hd(1:nc) - 0.5_rk*x*hv(1:nc)
if (.NOT. isSkewsymmetric) then
hd(1:nc) = hd(1:nc) - 0.5_rk*x*hv(1:nc)
endif
if (wantDebug) call obj%timer%start("blas")
#if REALCASE == 1
call PRECISION_SYR2('L', nc, -ONE, hd, 1, hv, 1, ab(1,ns), 2*nb-1)
if (isSkewsymmetric) then
! call PRECISION_SSR2('L', nc, -ONE, hd, 1, hv, 1, ab(1,ns), 2*nb-1)
call dssr2('L', nc, -ONE, hd, 1, hv, 1, ab(1,ns), 2*nb-1)
else
call PRECISION_SYR2('L', nc, -ONE, hd, 1, hv, 1, ab(1,ns), 2*nb-1)
endif
#endif
#if COMPLEXCASE == 1
call PRECISION_HER2('L', nc, -ONE, hd, 1, hv, 1, ab(1,ns), 2*nb-1)
......
......@@ -214,7 +214,8 @@ program test
call e_complex%set("timings",1, error)
call e_complex%set("debug",1)
call e_complex%set("gpu", 1)
call e_complex%set("gpu", 0)
call e_complex%set("omp_threads", 8, error)
assert_elpa_ok(e_complex%setup())
call e_complex%set("solver", elpa_solver_2stage, error)
......@@ -246,7 +247,8 @@ program test
call e_skewsymmetric%set("timings",1, error)
call e_skewsymmetric%set("debug",1)
call e_skewsymmetric%set("gpu", 1)
call e_skewsymmetric%set("gpu", 0)
call e_skewsymmetric%set("omp_threads",8, error)
call e_skewsymmetric%set("is_skewsymmetric",1)
assert_elpa_ok(e_skewsymmetric%setup())
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment