Quantcast
Channel: Intel® Fortran Compiler
Viewing all articles
Browse latest Browse all 3270

error#6405 for debug mode, not for release mode

$
0
0

Dear Sir(s),

I have been using Intel® Composer XE for Windows* (formerly Intel® Compiler Suite Professional Edition for Windows*).

My college has used a newer version of your compiler, and we worked on the same code. When I got the code back from him this time, I can compile it successfully with release mode, but failed with the debug mode.

The first error is:

Error    1     error #6405: The same named entity from different modules and/or program units cannot be referenced.   [FINDSTRG]    d:\MIN3P_THCm\min3p_thcm_v396Recheck\src\icesheet\m_ice_sheet.F90    1224    

That’s however not the case, otherwise it will fail when compiled under release version.

The function findstrg is defined in the following subroutine, which has been applied over 400 times in the code without any problem before:

!c ----------------------------------------------------------------------

!c subroutine findstrg

!c -------------------

!c find text string in data file      

!c definition of variables:

!c

!c I --> on input   * arbitrary  - initialized  + entries expected

!c O --> on output  * arbitrary  - unaltered    + altered

!c                                                                    I O

!c passed:   integer*4:

!c           ----------

!c           itmp

!c

!c           logical:

!c           ---------

!c           found_subsection

!c

!c           character:

!c           ----------

!c           subsection

!c

!c common:   -

!c

!c local:    character:

!c           ----------

!c           string

!c ----------------------------------------------------------------------

      subroutine findstrg(subsection,itmp,found_subsection)

     implicit none

      character*72 subsection

      integer itmp

      logical found_subsection     

      character*72 string

!c  rewind input file

      rewind(itmp)

!c  search for test string in input file

      found_subsection = .false.

      do while (.not.found_subsection)

        read(itmp,*,end=999) string

        if (string.eq.subsection) then

          found_subsection = .true.

        end if

      end do

999   return

      end

 

When it is called in the following subroutine more than once, the error occurs:

!%************************************************************

subroutine read_ice_sheet_block_ice_sheet  &

  (this, &

   idat, &

   istemp, &

   icetimeline, &

   iserror)

implicit none

external findstrg

!% Maximum pressure update in each timestep

subsection = 'maximum ice loading boundary pressure update'

call findstrg(subsection,idat,found)

if (found) then

  read(idat,*,err=10) max_update_pw

  b_check_update_pw = .true.

else

  b_check_update_pw = .false.

end if

 

!% Maximum pressure update in each timestep

subsection = 'maximum ice loading internal pressure update'

call findstrg(subsection,idat,found)

if (found) then

  read(idat,*,err=10) max_update_pice

  b_check_update_pice = .true.

else

  b_check_update_pice = .false.

end if

end

I tried also using interface to replace the 'external findstrg' before the subroutine including the code 'call findstrg' as suggested in the previous forum discussions, it failed with the same error.

Would you please help?

Thanks,

David


Viewing all articles
Browse latest Browse all 3270

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>