Commit 126279e8 authored by Andreas Marek's avatar Andreas Marek
Browse files

elpa_mult_at_b for onnode configuration

parent ef9f3791
...@@ -247,24 +247,34 @@ program test_transpose_multiply ...@@ -247,24 +247,34 @@ program test_transpose_multiply
tmp1(:,:) = 0.0_rk tmp1(:,:) = 0.0_rk
! tmp1 = a**T ! tmp1 = a**T
#ifdef WITH_MPI
call pdtran(na, na, 1.0_rk, a, 1, 1, sc_desc, 0.0_rk, tmp1, 1, 1, sc_desc) call pdtran(na, na, 1.0_rk, a, 1, 1, sc_desc, 0.0_rk, tmp1, 1, 1, sc_desc)
#else
tmp1 = transpose(a)
#endif
! tmp2 = tmp1 * b ! tmp2 = tmp1 * b
#ifdef WITH_MPI
call pdgemm("N","N", na, na, na, 1.0_rk, tmp1, 1, 1, sc_desc, b, 1, 1, & call pdgemm("N","N", na, na, na, 1.0_rk, tmp1, 1, 1, sc_desc, b, 1, 1, &
sc_desc, 0.0_rk, tmp2, 1, 1, sc_desc) sc_desc, 0.0_rk, tmp2, 1, 1, sc_desc)
#else
call dgemm("N","N", na, na, na, 1.0_rk, tmp1, na, b, na, 0.0_rk, tmp2, na)
#endif
! compare tmp2 with c ! compare tmp2 with c
tmp2(:,:) = tmp2(:,:) - c(:,:) tmp2(:,:) = tmp2(:,:) - c(:,:)
norm = pdlange("M",na, na, tmp2, 1, 1, sc_desc, tmp1) norm = pdlange("M",na, na, tmp2, 1, 1, sc_desc, tmp1)
call mpi_allreduce(norm,normmax,1,MPI_REAL8,MPI_MAX,MPI_COMM_WORLD,mpierr)
#ifdef WITH_MPI
call mpi_allreduce(norm,normmax,1,MPI_REAL8,MPI_MAX,MPI_COMM_WORLD,mpierr)
#else
normmax = norm
#endif
if (myid .eq. 0) then if (myid .eq. 0) then
print *," Maximum error of result: ", normmax print *," Maximum error of result: ", normmax
endif endif
if (normmax .gt. 5e-12) then if (normmax .gt. 5e-12) then
status = 1 status = 1
endif endif
......
Markdown is supported
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