[cam-users] CAM30 Hint for CVF/IVF users, possibly others as well.

Peter Paul Smolka smolka at uni-muenster.de
Wed Jul 21 23:53:07 MDT 2004


Dear Cam users,

compiling CAM30 (e.g. not cam2x) with CVF 6.6B, closely related to
IVF, two variables in a use stmt have been used twice in that stmt.

This generated initially a warning (conflicting types) and later
an error (see excerpt).

When removing the second appearance of the variables istwet and istice
e.g. the two at the very end, keeping only the first,
the error-msg disappeared.

The involved modules from CLM and the "use"d modules are:

( ... )

DF \cam30\cam1n\models\LND\CLM2\src\Main\clmtype.f90             (...)
DF \cam30\cam1n\models\LND\CLM2\src\Main\CLM_Varcon.f90          (...)
DF \cam30\cam1n\models\LND\CLM2\src\Biogeophys\Hydrology2Mod.F90 (...)

( ... )

                                Source Listing                  21-Jul-2004 22:21:33  Compaq Visual Fortran 6.6-2518    Page 1
                                                                21-Jul-2004 22:20:32  Hydrology2Mod.F90

              1 !#include <misc.h>
              2 !#include <preproc.h>
              3
              4 module Hydrology2Mod
              5
              6 !-----------------------------------------------------------------------
              7 !BOP
              8 !
              9 ! !MODULE: Hydrology2Mod
             10 !
             11 ! !DESCRIPTION:
             12 ! Calculation of soil/snow hydrology.

             ( ... )

             36   subroutine Hydrology2(lbc, ubc, num_nolakec, filter_nolakec, &
             37                         num_soilc, filter_soilc, num_snowc, filter_snowc, &
             38                         num_nosnowc, filter_nosnowc)

             ( ... )

             55 ! !USES:
             56     use shr_kind_mod, only: r8 => shr_kind_r8
             57     use clmtype

                                Source Listing                  21-Jul-2004 22:21:33  Compaq Visual Fortran 6.6-2518    Page 2
                                                                21-Jul-2004 22:20:32  Hydrology2Mod.F90

             58     use clm_varcon      , only : denh2o, denice, istice, istwet, istsoil, spval, istwet, istice
                .................................................1.......2
(1) Warning: Conflicting attributes or multiple declaration of name.   [ISTICE]

(2) Warning: Conflicting attributes or multiple declaration of name.   [ISTWET]

             ( ... )

            359
            360 !dir$ concurrent
            361 !cdir nodep
            362     do fc = 1,num_nolakec
            363        c = filter_nolakec(fc)
            364        l = clandunit(c)
            365        g = cgridcell(c)
            366        if (ityplun(l)==istwet .or. ityplun(l)==istice) then
                .......................1.......................2
(1) Error: The same named entity from different modules and/or program units cannot be referenced.   [ISTWET]

(2) Error: The same named entity from different modules and/or program units cannot be referenced.   [ISTICE]

            367           qflx_drain(c) = 0._r8
            ( ... )

Other compiler might react differently, e.g. assign the same attributes
to duplicatly mentioned variables.

This hint applies only to CAM30, not to CAM2.x.

Best regards, Peter


**********************************************************************
Dr. Peter P. Smolka
University Muenster
Geological Institute
Corrensstr. 24
D-48149 Muenster

Tel.: +49/251/833-3989   +49/2533/4401
Fax:  +49/251/833-3989   +49/2533/4401
E-Mail: smolka at uni-muenster.de
E-Mail: PSmolka at T-Online.de
**********************************************************************


More information about the cam-users mailing list