PROGRAM MAIN IMPLICIT NONE ! declaration d'interface de fonction interface subroutine check_table(k, a, b, c) integer, intent (in) :: k double precision, intent (in), dimension(:,:) :: a,b,c end subroutine check_table end interface integer, parameter :: NL = 2, NC=2 double precision, dimension (NL, NC) :: m1,m2,m3,m4 integer :: i,j,k integer :: N = 5000000 print *, '--- timing test : N=', N, ' NL=', NL, ' NC=',NC do k=1,N m1 = 0 m2 = 0 do i=1,NL do j=1,NC m1(i,j) = k*300+10.*i+j m2(i,j) = k*550+20.*i+2.*j; enddo enddo m3 = m1+m2; m4 = m1*m2; call check_table(k, m2, m3, m4) ! if (k .eq. 1) then ! print *, 'm1=', m1 ! print *, 'm2=', m2 ! print *, 'm3=', m3 ! print *, 'm4=', m4 ! endif enddo print *, '------- end of matrixf.f90 ------------' end subroutine check_table(k, a, b, c) integer, intent (in) :: k double precision, intent (in), dimension(:,:) :: a,b,c if ((k.eq.1) .or. (k.eq.50)) then print *, 'check_table(',k, '...) size(a,1)= ', size(a,1), & ' size(a,2)= ', size(a,2) endif end subroutine check_table