[Beowulf] ***UNCHECKED*** Re: Re: [EXTERNAL] Re: Re: Spark, Julia, OpenMPI etc. - all in one place

Lux, Jim (US 7140) james.p.lux at jpl.nasa.gov
Tue Oct 20 07:48:29 PDT 2020



From: John Hearns <hearnsj at gmail.com>
Date: Tuesday, October 20, 2020 at 1:00 AM
To: Jim Lux <james.p.lux at jpl.nasa.gov>
Cc: Prentice Bisbal <pbisbal at pppl.gov>, "Renfro, Michael" <Renfro at tntech.edu>, "beowulf at beowulf.org" <beowulf at beowulf.org>
Subject: Re: [Beowulf] ***UNCHECKED*** Re: Re: [EXTERNAL] Re: Re: Spark, Julia, OpenMPI etc. - all in one place

> Most compilers had extensions from the IV/66 (or 77) – quoted strings, for instance, instead of Hollerith constants, and free form input.  Some allowed array index origins other than 1

I can now date exactly when the rot set in.
Hollerith constants are good enough for anyone. It's a gosh darned computer, not your nearest and dearest whispering in your ear. It still thinks it is talking to a thundering line printer and getting its input from a real Teletype.

Indexing from zero - who ever heard of zero of a thing. Damn quiche eaters.

-----
I suspect indexing from zero is just because the writers of the C compiler found it easier for whatever their target processor was.  It’s part of that “close to the metal” ethos for C and writing OS kernels and such.  Indices are really just arithmetic on pointers, and so forth.  C only has 1 dimensional arrays for the same reason.

For Fortran, having indexing that was non-1 based was convenient if you needed negative indices.  It’s a lot easier to dimension A(-10:10) than to dimension A(21) and have A(I+11) everywhere, instead of A(I). Especially if you decided to change array limits, you didn’t have to go hunting for all those references to NOVER2 or N/2 and change them.  By the time that came around, we weren’t punching cards, but still, editors were pretty primitive when it came to search and replace. Most compilers also did array bound checking (at least as an option), which was a godsend in early development stages.  I’m trying to recall it, but I think one CPU I worked with actually had array bound checking in hardware, which was way cool, because there wasn’t a performance impact for the index testing.





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://beowulf.org/pipermail/beowulf/attachments/20201020/91978126/attachment.html>


More information about the Beowulf mailing list