Re: Year 68 Virus


Subject: Re: Year 68 Virus
From: Jim Rosinski (rosinski@bearmtn-e0.cgd.ucar.edu)
Date: Fri Sep 11 1998 - 15:13:47 MDT


CCM Users;

Thanks to Kevin Werner for bringing to our attention the "year 68" problem
he encountered with CCM on a SUN platform, and to those who responded with
more details.

This problem will manifest itself in any situation where integers are
represented in no more than 32 bits. Unfortunately, this is the case for all
platforms on which the CCM is supported except for Cray PVP. An easy fix
might be to use 64 bit integers everywhere, thereby eliminating the need to
change any code. While this is possible on many machines (normally via a -i8
compiler flag), there are a couple of potentially serious consequences
related to library compatibility. Netcdf is likely not to work, and MPI is
virtually guaranteed not to work.

Thus the "best" solution probably lies in either revising the algorithm, or
modifying the calendar code to do 64-bit integer arithmetic. Right now we
are leaning toward the latter as the optimal fix. For those who need a fix
right away, I would recommend modifying calendr.F to make local integer*8
copies of all input integer arguments. Some if not all integers in this
routine which are already local (including the constant 86400) may also
require integer*8 declarations. If you're running on a machine which does
not support 64-bit integers, this solution will not work.

In any case, we will provide a fix to address this problem in the not too
distant future.

Hope this helps.

Regards,

Jim Rosinski
CCM Core Group



This archive was generated by hypermail 2b27 : Thu Jun 01 2000 - 09:06:54 MDT