subroutine rscsb1 (array, nrwblk, phi, * minblk, remblk, nparts, blaws) c double precision array(nrwblk,2*nrwblk,1), phi(1), * blaws(nrwblk,nrwblk,1) integer nrwblk, minblk, remblk, nparts c ***----------------------------------------------------------*** c * The following notation is used in the comments: * c * * c * V_k, W_k <=> array(1,1,k), array(1,nrwblk+1,k) * c * phi_k <=> phi(k*nrwblk+1) * c * * c * Since phi is overwritten with the solution, * c * * c * y_a <=> y_0 <=> phi_0 (<=> beta in rscsb3.f) * c * y_k <=> phi_k, k = 1, nbloks-1 * c * y_b <=> y_nbloks <=> phi(nbloks*nrwblk+1) * c * * c * In addition, the affix ''/' designates that the * c * solution vector was/is obtained at the second/first * c * level of the back-solve. * c ***----------------------------------------------------------*** integer kpart, kblok, base, top c ***----------------------------------------------------------*** c * Each loop 20 iteration is independent and could * c * execute concurrently with the others. * c ***----------------------------------------------------------*** C$DOACROSS SHARE (array, nrwblk, phi, C$& minblk, remblk, nparts, blaws), C$& LOCAL (kpart, kblok, base, top) do 20 kpart = 1, nparts c ***----------------------------------------------------------*** c * Back-solve starts at the first block-row of each * c * partition and proceeds downward sequentially to * c * the second-last block-row. * c ***----------------------------------------------------------*** call partx(minblk,remblk,kpart,base,top) do 10 kblok = top, base-1 c ***----------------------------------------------------------*** c * y_kblok' = phi_kblok - V_kblok y_kblok-1' * c ***----------------------------------------------------------*** call DGEMV('N',nrwblk,nrwblk, * -1.d0,array(1,1,kblok),nrwblk, * phi((kblok-1)*nrwblk+1),1,1.d0, * phi(kblok*nrwblk+1),1) c ***----------------------------------------------------------*** c * The change of variable due to first-level rescaling * c * is now undone: y_kblok-1' <- y_kblok-1' - y_kblok' * c ***----------------------------------------------------------*** call DAXPY(nrwblk,-1.d0,phi(kblok*nrwblk+1),1, * phi((kblok-1)*nrwblk+1),1) 10 continue 20 continue return end