netcdf-fortran icon indicating copy to clipboard operation
netcdf-fortran copied to clipboard

PGFTN-S-0034-Syntax error at or near / (test_write.F: 167)

Open waldyd opened this issue 8 years ago • 10 comments

Hello,

While building netcdf-fortran-4.4.2, the following was prompted:

make[2]: Entering directory '/tmp/netcdf-fortran-4.4.2/nf_test' pgfortran -I../fortran -I../fortran -g -c -o f03lib_f_interfaces.o f03lib_f_interfaces.f90 pgf77 -DHAVE_CONFIG_H -I. -I.. -I../libsrc -I../fortran -I../fortran -g -c -o test_get.o test_get.F pgf77 -DHAVE_CONFIG_H -I. -I.. -I../libsrc -I../fortran -I../fortran -g -c -o test_put.o test_put.F pgf77 -DHAVE_CONFIG_H -I. -I.. -I../libsrc -I../fortran -I../fortran -g -c -o nf_error.o nf_error.F pgf77 -DHAVE_CONFIG_H -I. -I.. -I../libsrc -I../fortran -I../fortran -g -c -o nf_test.o nf_test.F pgf77 -DHAVE_CONFIG_H -I. -I.. -I../libsrc -I../fortran -I../fortran -g -c -o test_read.o test_read.F pgf77 -DHAVE_CONFIG_H -I. -I.. -I../libsrc -I../fortran -I../fortran -g -c -o test_write.o test_write.F PGFTN-S-0034-Syntax error at or near / (test_write.F: 167) PGFTN-S-0034-Syntax error at or near / (test_write.F: 197) 0 inform, 0 warnings, 2 severes, 0 fatal for test_nf_redef Makefile:1292: recipe for target 'test_write.o' failed make[2]: *** [test_write.o] Error 2 make[2]: Leaving directory '/tmp/netcdf-fortran-4.4.2/nf_test' Makefile:1825: recipe for target 'check-am' failed make[1]: *** [check-am] Error 2 make[1]: Leaving directory '/tmp/netcdf-fortran-4.4.2/nf_test' Makefile:544: recipe for target 'check-recursive' failed make: *** [check-recursive] Error 1

Any ideas about how to solve this issue?

Best regards,

Néstor Waldyd

waldyd avatar Oct 01 '15 23:10 waldyd

@waldyd - can you send your config.log (generated when you ran configure) to [email protected]? Please reference this github issue in your email so that I remember what the issue is :).

WardF avatar Oct 02 '15 16:10 WardF

I'm getting the same thing. Lines are:

        err = nf_def_var(ncid, 'abc', NF_INT, 0, (/0/), vid)

and

        err = nf_get_var1_double(ncid, vid, (/0/), var)

I think it is objecting to the (/0/) syntax. It compiles fine with pgf90. I have F77=pgf77, F90=pgf90, and FC=pgfortran.

opoplawski avatar Oct 26 '15 22:10 opoplawski

Simple workaround is to set F77 to pgf90. But I think netcdf-fortran should be made to just ignore the F77/F90 variables. Haven't figured that one out yet though.

opoplawski avatar Oct 27 '15 21:10 opoplawski

One problem you have is that .F files are treated as F77 files. You should be using .F90/.F95/.F03/.F08 as appropriate.

opoplawski avatar Oct 28 '15 16:10 opoplawski

Is this addressed by https://github.com/Unidata/netcdf-fortran/pull/33 ? If so, I'll close out this issue. As soon as I can have the netcdf-c 4.4.0 release available, I intend to have fortran and cxx4 releases in as-close-to-parallel as I can manage. Same day, certainly, unless something goes wrong.

WardF avatar Oct 28 '15 18:10 WardF

No, that's a separate issue.

opoplawski avatar Oct 28 '15 20:10 opoplawski

This issue remains in netcdf-fortran 4.4.5. I got the exact same error while building version 4.4.5 with PGI 18.4. Is the workaround from @opoplawski the best way to build netcdf-fortran for now?

ZQyou avatar Mar 01 '19 15:03 ZQyou

Thanks, this clearly slipped through the cracks. I'll get this addressed for the upcoming release.

WardF avatar Mar 01 '19 17:03 WardF

The issue remains in 4.5.2. The F77=F90 workaround still functions.

drf5n avatar Feb 26 '20 18:02 drf5n

The problem is the use of an f90 feature in f77 code. The answer is to introduce a new car, and initialize it properly for f77.

I will see if I can sort this out...

edwardhartnett avatar Feb 26 '20 20:02 edwardhartnett