Compiling error: dateclock?

Discussion about coupled ecosystem models

Moderators: arango, robertson

Post Reply
Message
Author
drivas
Posts: 33
Joined: Tue Aug 28, 2007 8:31 pm
Location: CICESE

Compiling error: dateclock?

#1 Unread post by drivas »

Hello,

I guess someone in this group has experienced this same problem. I'm compiling the model's last version with gfortran in Centos and I get this error (I include only the last part):

cd /home/ROMS_MODEL/RUN_ROMS/Build; /usr/bin/gfortran -c -frepack-arrays -fopenmp -O3 -ffast-math mod_eclight.f90
dateclock.f90:137.8:

DateNumber=Rclock.Dnumber+CurrentTime ! fractional days
1
Error: Unclassifiable statement at (1)
dateclock.f90:154.8:

DateNumber=Rclock.Dnumber+CurrentTime ! fractional days
1
Error: Unclassifiable statement at (1)
dateclock.f90:171.8:

DateNumber=Rclock.Dnumber+CurrentTime
1
Error: Unclassifiable statement at (1)
dateclock.f90:211.33:

IF (CurrentTime.ge.Rclock.Dnumber) THEN
1
Error: Syntax error in IF-expression at (1)
dateclock.f90:214.25:

jday=INT(Rclock.Dnumber+CurrentTime) ! Truncated Julian Day
1
Error: Syntax error in argument list at (1)
dateclock.f90:241.9:

END IF
1
Error: Expecting END SUBROUTINE statement at (1)
dateclock.f90:816.6:

Rclock.yday =yday
1
Error: Unclassifiable statement at (1)
dateclock.f90:817.6:

Rclock.year =iyear
1
Error: Unclassifiable statement at (1)
dateclock.f90:818.6:

Rclock.month =month
1
Error: Unclassifiable statement at (1)
dateclock.f90:819.6:

Rclock.day =iday
1
Error: Unclassifiable statement at (1)
dateclock.f90:820.6:

Rclock.hour =ihour
1
Error: Unclassifiable statement at (1)
dateclock.f90:821.6:

Rclock.minutes =minute
1
Error: Unclassifiable statement at (1)
dateclock.f90:822.6:

Rclock.seconds =isec
1
Error: Unclassifiable statement at (1)
dateclock.f90:823.6:

Rclock.base =r_time
1
Error: Unclassifiable statement at (1)
dateclock.f90:824.6:

Rclock.Dnumber =DateNumber(1)
1
Error: Unclassifiable statement at (1)
dateclock.f90:825.6:

Rclock.Snumber =DateNumber(2)
1
Error: Unclassifiable statement at (1)
dateclock.f90:826.6:

Rclock.string =string
1
Error: Unclassifiable statement at (1)
dateclock.f90:827.6:

Rclock.calendar=TRIM(calendar)
1
Error: Unclassifiable statement at (1)
dateclock.f90:888.6:

ClockTime=DateNumber(2)-Rclock.Snumber
1
Error: Unclassifiable statement at (1)
make: *** [/home/ROMS_MODEL/RUN_ROMS/Build/dateclock.o] Error 1
make: *** Waiting for unfinished jobs....


Any thought?
Thanks,

DAVID

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: Compiling error: dateclock?

#2 Unread post by kate »

Right you are - it fails with gfortran, compiles with ifort. Reading the errors, I don't understand why it doesn't compile.

ymamoutos
Posts: 71
Joined: Fri Nov 19, 2010 2:33 pm
Location: University of Aegean

Re: Compiling error: dateclock?

#3 Unread post by ymamoutos »

Greetings

FYI I am also experiencing the same
problem after updating to version 841.
I am using gfortran 4.9.2 on Debian.

Giannis

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: Compiling error: dateclock?

#4 Unread post by kate »

The correct syntax for structure components in Fortran is:

Code: Select all

Rclock%Dnumber
not

Code: Select all

Rclock.Dnumber
. Fixing that in dateclock.F allows it to compile, only to fail on:

Code: Select all

diag.f90:355.55:

            WRITE (stdout,30) MOD(iic(ng)-1,10000000000), time_code(ng),&
                                                       1
Error: Integer too big for its kind at (1). This check can be disabled with the option -fno-range-check
make: *** [Build_up/diag.o] Error 1
It compiles with one less zero there.

There are other Rclock.xx things in def_*.F.

User avatar
arango
Site Admin
Posts: 1368
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

Re: Compiling error: dateclock?

#5 Unread post by arango »

Yes, thank you for reporting this one. The weird thing is that I ran and debugged (TotalView) this version several times with the ifort compiler and didn't report any errors or warnings. It seems to be happy with the dot syntax. Of course, the correct syntax in Fortran is to use Rclock %. This happens for coding some of the functions in module dateclock.F in both Fortran and Matlab. The dot syntax is correct in Matlab.

Please update your code. Check the following :arrow: trak ticket for details.

drivas
Posts: 33
Joined: Tue Aug 28, 2007 8:31 pm
Location: CICESE

Re: Compiling error: dateclock?

#6 Unread post by drivas »

Thanks for your comments, guys. I replaced the newest version by the one I downloaded by the end of the last year and it's now working. I'll update it soon.
Regards,

David

Post Reply