I’m new to Fortran and trying to compile this code using pgf90.
The code is partially written in F77 and the rest is in F90, which compiled happily using gfortran, but pgfortran wasn’t very happy, and I did a bit of clean up, made pgfortran mostly happy except this one.
!C *****************************************************
!C * GAMMA FUNCTION *
!C * IN DOUBLE PRECISION *
!C * COPYRIGHT : M.MORI JUNE 30 1989 V.1 *
!C *****************************************************
IMPLICIT REAL*8 (A-H,O-Z)
DIMENSION C(0:19)
DATA IN / 19 /
!C ---- FOR SINGLE PRECISION ----
!C DATA IN / 10 /
DATA C / 1.0 D0,
1 -0.42278 43350 98467 1 D0,
2 -0.23309 37364 21786 7 D0,
3 0.19109 11013 87691 5 D0,
4 -0.24552 49000 54000 2 D-1,
5 -0.17645 24455 01443 2 D-1,
6 0.80232 73022 26734 7 D-2,
7 -0.80432 97756 04247 0 D-3,
8 -0.36083 78162 548 D-3,
9 0.14559 61421 399 D-3,
1 -0.17545 85975 17 D-4,
1 -0.25889 95022 4 D-5,
2 0.13385 01546 6 D-5,
3 -0.20547 43152 D-6,
4 -0.15952 68 D-9,
5 0.62756 218 D-8,
6 -0.12736 143 D-8,
7 0.92339 7 D-10,
8 0.12002 8 D-10,
9 -0.42202 D-11 /
$ pgf90 -Mextend hb_high_v5.4.5_np2mm+.F90
PGF90-S-0034-Syntax error at or near identifier d0 (hb_high_v5.4.5_np2mm+.F90: 2387)
PGF90-S-0034-Syntax error at or near - (hb_high_v5.4.5_np2mm+.F90: 2388)
PGF90-S-0034-Syntax error at or near - (hb_high_v5.4.5_np2mm+.F90: 2389)
PGF90-S-0034-Syntax error at or near real constant -6.5804832E+33 (hb_high_v5.4.5_np2mm+.F90: 2390)
PGF90-S-0034-Syntax error at or near - (hb_high_v5.4.5_np2mm+.F90: 2391)
PGF90-S-0034-Syntax error at or near - (hb_high_v5.4.5_np2mm+.F90: 2392)
PGF90-S-0034-Syntax error at or near real constant -6.5804832E+33 (hb_high_v5.4.5_np2mm+.F90: 2393)
PGF90-S-0034-Syntax error at or near - (hb_high_v5.4.5_np2mm+.F90: 2394)
PGF90-S-0034-Syntax error at or near - (hb_high_v5.4.5_np2mm+.F90: 2395)
PGF90-S-0034-Syntax error at or near real constant -6.5804832E+33 (hb_high_v5.4.5_np2mm+.F90: 2396)
PGF90-S-0034-Syntax error at or near - (hb_high_v5.4.5_np2mm+.F90: 2397)
PGF90-S-0034-Syntax error at or near - (hb_high_v5.4.5_np2mm+.F90: 2398)
PGF90-S-0034-Syntax error at or near real constant -6.5804832E+33 (hb_high_v5.4.5_np2mm+.F90: 2399)
PGF90-S-0034-Syntax error at or near - (hb_high_v5.4.5_np2mm+.F90: 2400)
PGF90-S-0034-Syntax error at or near - (hb_high_v5.4.5_np2mm+.F90: 2401)
PGF90-S-0034-Syntax error at or near real constant -6.5804832E+33 (hb_high_v5.4.5_np2mm+.F90: 2402)
PGF90-S-0034-Syntax error at or near - (hb_high_v5.4.5_np2mm+.F90: 2403)
PGF90-S-0034-Syntax error at or near real constant -6.5804832E+33 (hb_high_v5.4.5_np2mm+.F90: 2404)
PGF90-S-0034-Syntax error at or near real constant -6.5804832E+33 (hb_high_v5.4.5_np2mm+.F90: 2405)
PGF90-S-0034-Syntax error at or near - (hb_high_v5.4.5_np2mm+.F90: 2406)
0 inform, 0 warnings, 20 severes, 0 fatal for dgamm
I can see that C is an array of size 20, where C(0)=1.0, and each value in the DATA statement assigned to C(1), C(2) etc.
But what C(1) is supposed to be? What are the heading numbers in the DATA statement doing? ie., 1, 2,3, 4, 5, 6, 7, 8, 9, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9? I guess they are just there with no effect, but as a visual aid to indicate the index, and as a result
C(1)=-0.4227843350984671 (D0 means no decimal place movement)
Now, any idea how I can compile this code? I tried to add & at the end of each line, and it made some difference, not entirely.
DATA C / 1.0 D0, &
1 -0.42278 43350 98467 1 D0, &
2 -0.23309 37364 21786 7 D0, &
3 0.19109 11013 87691 5 D0, &
4 -0.24552 49000 54000 2 D-1, &
5 -0.17645 24455 01443 2 D-1, &
6 0.80232 73022 26734 7 D-2, &
7 -0.80432 97756 04247 0 D-3, &
8 -0.36083 78162 548 D-3, &
9 0.14559 61421 399 D-3, &
1 -0.17545 85975 17 D-4, &
1 -0.25889 95022 4 D-5, &
2 0.13385 01546 6 D-5, &
3 -0.20547 43152 D-6, &
4 -0.15952 68 D-9, &
5 0.62756 218 D-8, &
6 -0.12736 143 D-8, &
7 0.92339 7 D-10, &
8 0.12002 8 D-10, &
9 -0.42202 D-11 /
$ pgf90 -Mextend hb_high_v5.4.5_np2mm+.F90
PGF90-S-0034-Syntax error at or near identifier d0 (hb_high_v5.4.5_np2mm+.F90: 2387)
0 inform, 0 warnings, 1 severes, 0 fatal for dgamm
Thanks in advance!