mercredi 1 avril 2015

(Gfortan) logical variables compilation error : IF clause at (1) requires a scalar LOGICAL expression

First of all sorry for my english, I'm french, then i'm a beginner in Fortran.


I am installing the MEGAN model v2.10 with Gfortran compiler and i have some trouble.


I don't understand why this error appear. All over the internet I could see that it was the correct syntax. I suspect that the problem comes from gfortran but this compiler is not well documented.



make
f95 -c -O -fopenmp -e -fsecond-underscore -ffree-form -ffree-line-length-none -fconvert=big-endian -I/ESM2/MEGAN/MEGANv2.10gfort/lib/ioapi/fixed_src readmcip.f
readmcip.f:264.19:

lfirst = .true.
1
Warning: Extension: Conversion from LOGICAL(4) to INTEGER(4) at (1)
readmcip.f:266.19:

lfirst = .false.
1
Warning: Extension: Conversion from LOGICAL(4) to INTEGER(4) at (1)
readmcip.f:268.12:

if (lfirst) then
1
Error: IF clause at (1) requires a scalar LOGICAL expression


My code (lfirst does not appear before) :



if((sdate+2000000).eq.jdate.and.(stime*100).eq.jtime) then
lfirst = .true.
else
lfirst = .false.
endif
if (lfirst) then........
.....


I thank you in advance for your help


Aucun commentaire:

Enregistrer un commentaire