Computing p with DPL
Notes:
- essentially sequential form
- automatic detection of parallelism
- automatic work sharing
- all variables shared by default
- number of processors specified outside of the code
f90 -apo -O3 -mips4 -mplist
- the mplist switch will show the intermediate representation
INTEGER, PARAMETER:: N = 1000000
REAL (KIND=8):: LS,PI, W = 1.0/N
PI = SUM( (/ (4.0*W/(1.0+((I+0.5)*W)**2),I=1,N) /) )