“Their problem is that every time they added more cattle, they had to increase the size of the arrays.
I quickly discovered that they’d hit a system limit – suck air through teeth, shake head sadly, sigh, Say “system limit – oh dear, oh dear” – garage mechanic’s gambit. Maximum segment size under VME is 2Mb (and hence maximum REAL array size is 524,288). They were looking for about 560,000 (you might wonder whether there was ever this many cattle but they never die in this data set).
How to deal with that?
Well the array declarations went something like:
COMMON /XCOMM/ X(560000)
Observing that in Fortran (unlike Algol and its derivatives) a subscripted variable looks just like a function call I essayed something like:
COMMON /XCOMM0/ X0(280000)
COMMON /XCOMM1/ X1(280000)
and
FUNCTION X(I)
IF (I.LE.280000) RETURN X0(I)
RETURN X1(I-280000)
END
And recompiled. Obviously statements of the form X(I)= … were faulted, but there weren’t very many of them – far fewer than Y=X(I) etc which passed. So I wrote a matching SUBROUTINE ASSIGNX(I,VALUE) and edited out the problem areas.
After a day or so, with all the big arrays modified, I presented my findings to the Milk Marketing Board. I thought it was quite good. They didn’t. They bought a VAX (I think) and ran it there so we lost that part of the business.
The VAX took longer, but that didn’t matter. It didn’t have anything else to do. It was probably the right decision. That said, the Milk Marketing Board was abolished a couple of years later so we lost ALL the business.”