🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.cray
Article #276

Re: Storage of Fortran character strings on Cray

#276
From: Bakayaroo Banzai
Date: Thu, 17 Dec 1992 11:59
28 lines
1985 bytes
In article <MRL.92Dec16094950@sun4.uai.com> mrl@uai.com (Mark R. Ludwig) writes:
>I'd appreciate information or pointers to information about how
>Fortran character strings are stored on Cray machines.  I have the
>impression that sometimes they are word-aligned, but I don't know how
>they then honor the X3.9-1978 standard which requires adjacency of
>elements of a character array.  Perhaps only the first element of the
>array is mandatorily aligned, and rest are also aligned only if the
>length of each element is an integer multiple of 8?
>
>Hopefully related enough to not need a separate post, can someone tell
>me what the addressability is of data on Cray machines?  What does the
>machine have to do to extract an arbitrary character from a string?
>
I'm not a Fortran expert so I can't answer the first part of your
question. 

The smallest addressable chunk of data on a Cray machine is one word
(8 Bytes). You can use system subroutines to do a pattern 
search within a retrieved word. You must first compile a regular
expression to produce a pointer to the area to be searched and then use
the system calls regcmp and regex to match it. This can be written as
a C subprogram which should be callable from Fortran. If you don't know
precisely what you're trying to extract you would need to apply some
shift and bitwise operations to the word you retrieved in order to
separate out the desired character.

Matt Marchese
matt@cray.com
Technical Details
Message-ID: <1992Dec17.115927.17609@news.DKRZ-Hamburg.DE>
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!sol.ctr.columbia.edu!ira.uka.de!Sirius.dfn.de!news.DKRZ-Hamburg.DE!smog.DKRZ-Hamburg.DE!k206027
References: <MRL.92Dec16094950@sun4.uai.com>

Show Full Headers
Complete Article Headers
Newsgroups: comp.unix.cray
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!sol.ctr.columbia.edu!ira.uka.de!Sirius.dfn.de!news.DKRZ-Hamburg.DE!smog.DKRZ-Hamburg.DE!k206027
From: k206027@smog.DKRZ-Hamburg.DE (Bakayaroo Banzai)
Subject: Re: Storage of Fortran character strings on Cray
Message-ID: <1992Dec17.115927.17609@news.DKRZ-Hamburg.DE>
Sender: news@news.DKRZ-Hamburg.DE
Organization: Deutsches Klimarechenzentrum GmbH, Hamburg
References: <MRL.92Dec16094950@sun4.uai.com>
Date: Thu, 17 Dec 92 11:59:27 GMT
Lines: 28