Skip to content

non-standard fortran in utilities_mod.f90 stops you using -std=f2008 out-of-the box #1141

Description

@hkershaw-brown

e.g. compile lorenz_96 with -std=f2008

[hkershaw:work](fixsystem) > ./quickbuild.sh 
......... Makefile is ready.
gfortran -O2 -std=f2008 -ffree-line-length-none -I/opt/local/include  -c	/Users/hkershaw/DART/pull_requests/fixsystem/pull_1121/assimilation_code/modules/utilities/types_mod.f90
gfortran -DDART_VERSION="'v11.24.0-15-gf13e33525'"  -O2 -std=f2008 -ffree-line-length-none -I/opt/local/include  -c	/Users/hkershaw/DART/pull_requests/fixsystem/pull_1121/build_templates/version_mod.F90
gfortran -O2 -std=f2008 -ffree-line-length-none -I/opt/local/include  -c	/Users/hkershaw/DART/pull_requests/fixsystem/pull_1121/assimilation_code/modules/utilities/utilities_mod.f90
/Users/hkershaw/DART/pull_requests/fixsystem/pull_1121/assimilation_code/modules/utilities/utilities_mod.f90:990:20:

  990 |             convert=conversion, position=pos, action=act, status=stat, iostat=rc)
      |                    1
Error: GNU Extension: CONVERT tag at (1)
/Users/hkershaw/DART/pull_requests/fixsystem/pull_1121/assimilation_code/modules/utilities/utilities_mod.f90:993:20:

  993 |             convert=conversion, position=pos, action=act, status=stat, iostat=rc)
      |                    1
Error: GNU Extension: CONVERT tag at (1)
make: *** [utilities_mod.o] Error 1

You can edit the Makefile to override utilities_mod.o with -std=gnu, but this is a bit of a pain, e.g. can't just run quickdbuild.sh, have to run quickdbuild.sh filter; edit Makefile, edit mkmf.template; make.

107 utilities_mod.o: /Users/hkershaw/DART/pull_requests/fixsystem/pull_1121/assimilation_code/modules/utilities/utilities_mod.f90 types_mod.o version_mod.o
108         $(MPIFC) $(FFLAGS) -std=gnu $(OTHERFLAGS) -c    /Users/hkershaw/DART/pull_requests/fixsystem/pull_1121/assimilation_code/modules/utilities/utilities_mod.f90

Metadata

Metadata

Assignees

No one assigned

    Labels

    fortran standardscompiler issues and (non) standard-compliant code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions