I am having a problem with FORALL if I compile with /debug but not /OPT. The code is basically: subroutine matmul_tran (A,B,C, chk, l,m,n, t, use_vector) ! integer4 l,m,n, i,j real8 A(m,l), B(m,n), C(l,n), chk(l,n) real4 t(2,6), err_max logical use_vector ! real8 Vec_Sum, ts(2), te(2) external Vec_Sum, err_max ! C = 0 call time_step (ts) do i = 1,l do j = 1,n C(i,j) = dot_product (A(:,i), B(:,j)) end do end do call time_step (te) ; t(:,1) = te - ts write (,) t(:,1), 't1) transpose dot_product ', err_max (c, chk, l,n) ! ! 2) use of for_all ! C = 0 call time_step (ts) forall (i=1:l, j=1:n) C(i,j) = dot_product (A(:,i), B(:,j)) end forall call time_step (te) ; t(:,2) = te - ts write (,) t(:,2), 't2) transpose FOR ALL ', err_max (c, chk, l,n) ! end
The error is 'Invalid floating point operation' and it is being reported at the FORALL statement in SDBG. I am using Ver 6.30.0 I could email the full program.
John