Parallel Sections - Fortran

program mm2
c     Program for multiplication of of D= A*B and A*C

      parameter (NRA =1000)
      parameter (NCA =1000)
      parameter (NCB =1000)
      parameter (NCC =1000)

      integer 	cols,avecol,i,j,k
      real*8	a(NRA,NCA), b(NCA,NCB), c(NCA,NCC) 
      real*8    d(NRA,NCB), e(NRA,NCC)


C     Initialize A and B 
      do 30 i=1, NRA
      do 30 j=1, NCA
        a(i,j) = 1.
 30   continue

      do 40 i=1, NCA
      do 40 j=1, NCB
	b(i,j) = 1.
 40   continue

      do 50 i=1, NCA
      do 50 j=1, NCC
        c(i,j) = 2.
 50   continue


C     Do matrix multiply  D=A*B

      do 60 k=1, NCB 
      do 60 i=1, NRA
      d(i,k) = 0.0
      do 60 j=1, NCA
           d(i,k) = d(i,k) + a(i,j) * b(j,k)
  60  continue

C     Do matrix multiply  E=A*C
      do 70 k=1, NCC
      do 70 i=1, NRA
      e(i,k) = 0.0
      do 70 j=1, NCA
           e(i,k) = e(i,k) + a(i,j) * c(j,k)
  70  continue


C     Print results 
       print*, 'Done '	
       write(*,*)'d(1,1)=',d(1,1)
       write(*,*)'d(NRA,NCB)=',d(NRA,NCB)
       write(*,*)'e(1,1)=',e(1,1)
       write(*,*)'e(NRA,NCC)=',e(NRA,NCC)

      end