-assume noold_ldout_format for GNU

nachiket k nachiket316@gmail.com
Wed May 30 12:56:00 GMT 2018


Hi,
without -fdefault-real-8
we get following errors

cpgb.f:446:72:



      &                IB1I,L1I,F1I,G1I,IRET)

                                                                        1

Error: Type mismatch in argument ‘f1’ at (1); passed REAL(8) to REAL(4)

cpgb.f:482:72:



      &       KB,IBB,LR,FR,GR,d,KGDTI,MI,IBBI,LBI,FBI,GBI,IRET)

                                                                        1

Error: Type mismatch in argument ‘ngdt1’ at (1); passed REAL(4) to
INTEGER(4)

cpgb.f:600:72:



      &                    IBBI,LBI,FBI,GBI,IRET)

                                                                        1

Error: Type mismatch in argument ‘f1’ at (1); passed REAL(8) to REAL(4)

cpgb.f:655:8:



         GFLD1%FLD => F1I

        1

Error: Different types in pointer assignment at (1); attempted assignment
of REAL(4) to REAL(8)

cpgb.f:662:10:



           GFLD1%FLD => G1I

          1

Error: Different types in pointer assignment at (1); attempted assignment
of REAL(4) to REAL(8)

cpgb.f:692:31:



       IF (ASSOCIATED(GFLD1%FLD,G1I)) then

                               1

Error: ‘target’ argument of ‘associated’ intrinsic at (1) must be the same
type and kind as ‘pointer’


This is the path to the source code of file I am trying to install

www.nco.ncep.noaa.gov/pmb/codes/nwprod/grib_util.v1.0.5/sorc/copygb2.fd/copygb2.f

This is the parent directory
www.nco.ncep.noaa.gov/pmb/codes/nwprod/grib_util.v1.0.5/sorc/copygb2.fd/

As there is dependency on many other libraries I am not sure how to create
a reduced code for this issue.

(PS without using -fdefault-real-8 even the dependency library g2 is not
getting installed which has -r8 -i4 also had to uses

-fno-range-check)
without -fno-range-check
I get

gfortran -c -O3 -g  -fdefault-real-8 -J../include/g2_v3.1.0_d addfield.f

addfield.f:122:14:



       allones=Z'FFFFFFFF'

              1

Error: Arithmetic overflow converting INTEGER(16) to INTEGER(4) at (1).
This check can be disabled with the option ‘-fno-range-check’

make: *** [../libg2_v3.1.0_d.a(addfield.o)] Error 1

Source of g2 library is

http://www.nco.ncep.noaa.gov/pmb/codes/nwprod/lib/g2/v3.1.0/

Sorry for inconvenience

Thanks and Regards,
Nachiket



On Wed, May 30, 2018 at 5:52 PM, Dominique d'Humières <dominiq@lps.ens.fr>
wrote:

> > gfortran -c -I../lib/g2_d/ -O -C -fdefault-real-8 -J../copygb2.fd/final/1
> > cpgb.f
> >
> > cpgb.f:482:72:
> >
> >       &       KB,IBB,LR,FR,GR,d,KGDTI,MI,IBBI,LBI,FBI,GBI,IRET)
> >
> > Error: Type mismatch in argument ‘ngdt1’ at (1); passed REAL(8) to
> > INTEGER(4)
> (1) Don’t use -f*-real-8.
> (2) Apparently ‘ngdt1’ is a REAL on the caller side and an INTEGER on the
> collee one.
>
> Without a (reduced) code it is extremely difficult to help you.
>
> Dominique
>
>



More information about the Fortran mailing list