Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29542 Diskussionen

Error: Symbol ‘iyr’ at (1) has no IMPLICIT type

negar
Neuer Beitragender I
6.380Aufrufe

Hello,

I am working on a model which I have sent in this link

https://drive.google.com/file/d/19oZHI-hwwrmdrW3_rSnBFR7YMkUgjEx6/view?usp=sharing

, and I had the following error when I made it:

physiology.f:1065:11:

         iyr = iyear - 1860 + 1
           1
Error: Symbol ‘iyr’ at (1) has no IMPLICIT type
makefile:106: recipe for target 'physiology.o' failed
make: *** [physiology.o] Error 1

Could somebody help me?

I would really appreciate it

0 Kudos
6 Antworten
Arjen_Markus
Geehrter Beitragender II
6.375Aufrufe

Apparently, the variable iyr has not been declared and the code contains a statement "IMPLICIT NONE" or the compiler options instruct the compiler to complain about any variables that are not explicitly declared. The solution is to properly declare it:

integer :: iyr

for instance in the declaration part of the routine that contains the variable.

negar
Neuer Beitragender I
6.332Aufrufe

I have added integer iyr to the source code like below, and it ran.

      integer iyear    ! current year

       integer iyr
c
      real co2init,    ! input atmospheric co2 concentration
     >     co2conc     ! output " for year iyear  
c
c calculate co2 concentration for this year
c
     if (iyear.lt.1860) then
c
        co2conc = co2init
c
     else
c
c 1992 IPCC estimates
c
c       iyr = iyear - 1860 + 1
c       co2conc = (297.12 - 0.26716 * iyr +
c    >                      0.0015368 * iyr**2 +
c    >                      3.451e-5 * iyr**3) * 1.e-6
c
c
c M. El Maayar: 1996 IPCC estimates
c
        iyr = iyear - 1860 + 1
        co2conc = (303.514 - 0.57881 * iyr +
     >                      0.00622 * iyr**2 +
     >                      1.3e-5 * iyr**3) * 1.e-6
c
c
     end if
c
      return
      end
c

Thank you for your help

Steve_Lionel
Geehrter Beitragender III
6.344Aufrufe

I'll also note that this error message came from gfortran and not Intel Fortran.

 
JohnNichols
Geehrter Beitragender I
6.283Aufrufe

@Steve_Lionel  noted:

I'll also note that this error message came from gfortran and not Intel Fortran.

----------------------------------------------------------------------

But where is someone going to learn the benefits of intel fortran if they do not talk to the people here

Also you had a one line statement that had the sidebars -- only @Steve_Lionel - there must be a reason

Steve_Lionel
Geehrter Beitragender III
6.279Aufrufe

The scrollbars are interesting. I'm going to guess they're a side-effect of my using the Microsoft "Editor" plugin to the Edge browser. It provides editorial recommendations for "clearer" text - mostly by suggesting punctuation changes or removal of unnecessary words. Looking at the HTML element of my reply there, I see lots of CSS related to the plugin. Maybe the forum thinks it needs the scrollbars to view all the "content", when most of it isn't displayed.

mecej4
Geehrter Beitragender III
6.270Aufrufe

Or, the CSS and other markup stuff makes it so hard to calculate the size of the "payload" that gets actually displayed,  the height of the frame cannot be calculated with confidence, so let's put in a scroll bar in there.

Antworten