Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
waldyd opened this issue Oct 1, 2015 · 10 comments
Closed

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

waldyd opened this issue Oct 1, 2015 · 10 comments

Comments

@waldyd
Copy link

waldyd commented Oct 1, 2015

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

@WardF
Copy link
Member

WardF commented Oct 2, 2015

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

@opoplawski
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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

@WardF
Copy link
Member

WardF commented Oct 28, 2015

Is this addressed by #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.

@opoplawski
Copy link
Contributor

No, that's a separate issue.

@WardF WardF closed this as completed Feb 14, 2018
@ZQyou
Copy link

ZQyou commented Mar 1, 2019

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?

@WardF WardF reopened this Mar 1, 2019
@WardF
Copy link
Member

WardF commented Mar 1, 2019

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

@WardF WardF added this to the 4.5.0 milestone Mar 1, 2019
@WardF WardF modified the milestones: 4.5.0, 4.5.3 Nov 25, 2019
@drf5n
Copy link

drf5n commented Feb 26, 2020

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

@edwardhartnett
Copy link
Contributor

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...

@WardF WardF modified the milestones: 4.5.3, 4.5.4 Sep 9, 2021
@WardF WardF modified the milestones: 4.5.4, 4.6.0 Nov 30, 2021
@WardF WardF modified the milestones: 4.6.0, 4.6.1 Mar 27, 2023
@WardF WardF closed this as completed Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants