cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc 
c Gregor von Laszewski * North East Parallel Architectures Center
c                      * Center for Computational Science, Syracuse University
c                      * 111 College Place * Syracuse, NY 13244-4100
c                      * (315) 443-4883 * gregor@npac.syr.edu 
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
      subroutine StdProblem(a,lda,m,n,b)
      real a(lda,*),b(*)
      integer m, n, lda
      integer iseed(4) 


      iseed(1) = 617
      iseed(2) = 1553
      iseed(3) = 2191
      iseed(4) = 3771

      call matgen(a,lda,m,n,iseed)
      do  i = 1,m
         b(i) = 0.0
         do j = 1,n
            b(i) = b(i) + a(i,j) 
         end do
      end do
      return
      end


      subroutine MatGen(a,lda,m,n,iseed)
      real a(lda,*)
      integer iseed(*), m, n, lda
      external slarnd

      do j = 1,n
         do  i = 1,m
            a(i,j) = slarnd(2,iseed) 
         end do
      end do
      return
      end


      subroutine MatrixGenerateSAXPY (a,lda,m,n,iseed, Processors,
     $     PanelSize,proc)
      real a(lda,*), slarnd
      integer iseed(*), m, n, lda,proc,Processors,PanelSize

      integer column, temp,range
      real h

      range = Processors * PanelSize
      column =1
      do j = 1,n
         temp = mod (j+range-1, range)
         temp = (temp ) /PanelSize
         if (temp .eq. proc) then
            do  i = 1,m
               a(i,column) = slarnd(2,iseed) 
            end do
            column = column + 1
        else
           do  i = 1,m
              h = slarnd(2,iseed) 
           end do
        end if
      end do
      return
      end

