-assume noold_ldout_format for GNU
Dominique d'Humières
dominiq@lps.ens.fr
Thu May 31 13:34:00 GMT 2018
As a general comment, the quality of the help you’ll get is directly related to the quality of the information you provide!-(
> Le 31 mai 2018 à 09:56, nachiket k <nachiket316@gmail.com> a écrit :
>
> Hi,
>
> I removed all the flags
>
> I recompiled g2
>
> There is this line in the code
> integer(4) :: ire00,allones
>
> allones=Z'FFFFFFFF'
>
> So here overflow error occurs integer(16) to integer(4)
>
> I tried allones=Z'FF'
> and
> integer(16) :: allones
> allones=Z’FFFFFFFF'
You may want to look at https://groups.google.com/forum/#!topic/comp.lang.fortran/u6V7QBvvF6o.
>
> Doing any of these compiles the code
> -Wall gives following warning
>
> In pngpack.f,jpcpack.f
> real(8) to real(4)
> rmin4 = rmin
> this is because of their declaration as
> real(4) :: rmin4
> real(8) :: rmin
>
> and
>
> intmath.f:212.17:
>
> ilog2_1=ilog2_1+4
> 1
> Warning: Possible change of value in conversion from INTEGER(4) to INTEGER(1) at (1)
>
> As all of these are warning compilation is completed
I don’t have the files.
>
> but in copygb2 I still face issue
>
> copygb2.f:1072.35:
>
> CALL INTGRIB2(0,IP,IPOPT,d,nopt,opt,KGDSB,
> 1
> Warning: Type mismatch in argument 'ngdt1' at (1); passed REAL(4) to INTEGER(4)
My guess is that ‘d’ is not explicitly typed as an integer. I don’t have the files generating the modules!-(
You may try to compile the file with -fimplicit-none and look at the errors you get.
> copygb2.f:776.20:
>
> CALL CPGB1(LG1,LX1,M1,
> 1
> Error: Dummy argument 'kgdti' of procedure 'cpgb1' at (1) has an attribute that requires an explicit interface for this procedure
> make: *** [copygb2.o] Error 1
>
> Is a lot of source code change needed here ? of is there any flag that can take care of this issue ?
An interface is required with some post F90 constructs such as
INTEGER,POINTER :: TMPPTR(:)
and friends.
Writing the interface might be challenging. An alternative is to move the subroutine after a
CONTAINS
in the "root" caller.
Dominique
More information about the Fortran
mailing list