Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

Problem with share statements in modules on SGI

The Mipspro compiler I am using on SGI does not like multiple writeups
of the type: use shr_kind_mod that is found in several modules both in
CAM 2 and CAM3 eg in history.F90

In order to get the module to compile the statement must be written once
at the top of the module. It is easily enough corrected, but affects a
number of subroutines, especially in the finite volume version.

Compiler MIPSpro 7.4.2m OS TRIX 6.5


Øyvind Seland
 

eaton

CSEG and Liaisons
I believe that this is a compiler bug. To be specific consider the cam3.0
version of history.F90. The parameter r8 is declared twice (ignoring the
ifdef SCAM code) through use association of shr_kind_mod. Once in module
history, and again in subroutine wrapup. This is legal because these are
distinct scoping units.

That said, I think as a matter of programming style that it would be
preferable to have a single declaration of the parameter r8 at the module
level.
 
Top