Hi All,
I have been experiencing difficulties when trying to compile a package of scientific model. It seem like there are some syntax error, and I’ve been searching around the internet for solutions. However, there is no luck until now. Hope you can help me on this.
So the error message goes like this
/home/local/i386/pgi/linux86/6.1/bin/pgf90 -MFree -r8 -Ktrap=fp -pc 64 -silent -c -I/…/nfu.F90
PGF90-S-0034-Syntax error at or near identifier int (/…/getput.inc: 78)
PGF90-S-0034-Syntax error at or near identifier int (/h./getput.inc: 81)
PGF90-S-0034-Syntax error at or near identifier int (/…/getput.inc: 84)
PGF90-S-0034-Syntax error at or near identifier int (/…/getput.inc: 85)
PGF90-S-0034-Syntax error at or near identifier int (/…/getput.inc: 88)
PGF90-S-0034-Syntax error at or near identifier int (/…/getput.inc: 89)
PGF90-S-0034-Syntax error at or near identifier double (/…/getput.inc: 78)
PGF90-S-0034-Syntax error at or near identifier double (/…/getput.inc: 81)
PGF90-S-0034-Syntax error at or near identifier double (/…/getput.inc: 84)
PGF90-S-0034-Syntax error at or near identifier double (/…/getput.inc: 85)
PGF90-S-0034-Syntax error at or near identifier double (/h…/getput.inc: 88)
PGF90-S-0034-Syntax error at or near identifier double (/…/getput.inc: 89)
The content of the lines in getput.inc file:
77 interface nfu_get_var
78 module procedure GET_VAR_D0, GET_VAR_D1, GET_VAR_D2, GET_VAR_D3
79 end interface
80 interface nfu_put_var
81 module procedure PUT_VAR_D0, PUT_VAR_D1, PUT_VAR_D2, PUT_VAR_D3
82 end interface
83 interface nfu_get_rec
84 module procedure GET_REC_D0N, GET_REC_D1N, GET_REC_D2N, GET_REC_D3N
85 module procedure GET_REC_D0I, GET_REC_D1I, GET_REC_D2I, GET_REC_D3I
86 end interface
87 interface nfu_put_rec
88 module procedure PUT_REC_D0N, PUT_REC_D1N, PUT_REC_D2N, PUT_REC_D3N
89 module procedure PUT_REC_D0I, PUT_REC_D1I, PUT_REC_D2I, PUT_REC_D3I
90 end interface
And those procedures have been defined before such as:
45 #define GET_VAR_D0 GET_VAR(NF_TYPE, D0)
and
50 #define PUT_VAR_D0 PUT_VAR(NF_TYPE, D0)
and
55 #define GET_REC_D0N GET_REC(NF_TYPE, D0N)
and etc…
And I think the corresponding parts in the nfu.F90 file are
11 public :: nfu_put_var, nfu_put_rec
12 public :: nfu_get_var, nfu_get_rec
.
.
495 function nfu_get_dim(ncid, dimid, x) result(iret)
496 integer, intent(in) :: ncid,dimid
497 real , intent(out) :: x(:)
498 integer :: iret
499
500 integer :: varid
501 character(len=NF_MAX_NAME) :: name
502
503 NF_TRY(nf_inq_dimname(ncid,dimid,name),iret,7)
504 NF_TRY(nf_inq_varid(ncid,name,varid),iret,7)
505 NF_TRY(nf_get_var_double(ncid,varid,x),iret,7)
506
507 7 return
508 end function
.
.
544 #define F90_TYPE integer
545 #define NF_TYPE int
546 #include “getput.inc”
547
548 #define F90_TYPE real(8)
549 #define NF_TYPE double
550 #include “getput.inc”
It will very appreciated if someone can help me on this…
Chiyu