      PROGRAM PROB01
C
C     PROBLEM 1
C
C  REFERENCE:  PROBLEMS TO TEST PARALLEL AND VECTOR LANGUAGES
C              CSD-TR 516, COMPUTER SCIENCE, PURDUE UNIVERSITY
C              JOHN R. RICE, MAY 1, 1985
C
C              REVISED BY JOHN R. RICE AND J. JING, OCT. 1, 1990
C
C*KEEP,REFER. ## change rajesh ##
C
C      *************************************************
C      *      Adapted for FORTRAN D benchmarking       *
C      *    by  T. HAUPT  (haupt@sccs.npac.syr.edu)    *
C      *                                               *
C      *    Northeast Parallel Architectures Center    *
C      *   at Syracuse University, Syracuse, NY, USA   *
C      *************************************************
C
C
C       VERSION SEQUENTIAL F90-1.00   (PARASOFT)
C       ==================================================
C
      integer nproc0
      parameter (nproc0=8)
      INTEGER NK
      REAL FSUM
      REAL A,B,H
      DATA A,B / 0.0,1.0 /
      parameter (NK=8)
      real, array(nk) :: fx1,D 
      CHARACTER(LEN=50) LINE
C     ## change rajesh ##

C$    decomposition xx(8)
C$    distribute xx(block)
C$    align fx1(i) with xx(i)


      call start_timer()

      B=40
      A=10
      H = (B-A)/(NK-1)
      FORALL (I=1:NK-1) D(I)= I
      fx1=EXP(A+H*D)
      FSUM=SUM(fx1)
      FSUM = H*((EXP(A)+EXP(B))/2.+FSUM)

      call stop_timer()

      call ksingl(6)
         PRINT 30,A,B,NK
   30    FORMAT ('PROBLEM 1 WITH A,B,NK = ',2F10.3,5X,I8)
         PRINT 40,FSUM
   40    FORMAT ('GIVES FSUM =',F10.6)

      STOP
      END




