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

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

negar
New Contributor I
2,009 Views

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 Replies
Arjen_Markus
Honored Contributor I
2,004 Views

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.

0 Kudos
negar
New Contributor I
1,961 Views

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

0 Kudos
Steve_Lionel
Honored Contributor III
1,973 Views

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

 
0 Kudos
JohnNichols
Valued Contributor III
1,912 Views

@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

0 Kudos
Steve_Lionel
Honored Contributor III
1,908 Views

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.

0 Kudos
mecej4
Honored Contributor III
1,899 Views

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.

0 Kudos
Reply