home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / unix / cray / 328 < prev    next >
Encoding:
Text File  |  1992-12-17  |  1.9 KB  |  40 lines

  1. Newsgroups: comp.unix.cray
  2. Path: sparky!uunet!usc!sol.ctr.columbia.edu!ira.uka.de!Sirius.dfn.de!news.DKRZ-Hamburg.DE!smog.DKRZ-Hamburg.DE!k206027
  3. From: k206027@smog.DKRZ-Hamburg.DE (Bakayaroo Banzai)
  4. Subject: Re: Storage of Fortran character strings on Cray
  5. Message-ID: <1992Dec17.115927.17609@news.DKRZ-Hamburg.DE>
  6. Sender: news@news.DKRZ-Hamburg.DE
  7. Organization: Deutsches Klimarechenzentrum GmbH, Hamburg
  8. References: <MRL.92Dec16094950@sun4.uai.com>
  9. Date: Thu, 17 Dec 92 11:59:27 GMT
  10. Lines: 28
  11.  
  12. In article <MRL.92Dec16094950@sun4.uai.com> mrl@uai.com (Mark R. Ludwig) writes:
  13. >I'd appreciate information or pointers to information about how
  14. >Fortran character strings are stored on Cray machines.  I have the
  15. >impression that sometimes they are word-aligned, but I don't know how
  16. >they then honor the X3.9-1978 standard which requires adjacency of
  17. >elements of a character array.  Perhaps only the first element of the
  18. >array is mandatorily aligned, and rest are also aligned only if the
  19. >length of each element is an integer multiple of 8?
  20. >
  21. >Hopefully related enough to not need a separate post, can someone tell
  22. >me what the addressability is of data on Cray machines?  What does the
  23. >machine have to do to extract an arbitrary character from a string?
  24. >
  25. I'm not a Fortran expert so I can't answer the first part of your
  26. question. 
  27.  
  28. The smallest addressable chunk of data on a Cray machine is one word
  29. (8 Bytes). You can use system subroutines to do a pattern 
  30. search within a retrieved word. You must first compile a regular
  31. expression to produce a pointer to the area to be searched and then use
  32. the system calls regcmp and regex to match it. This can be written as
  33. a C subprogram which should be callable from Fortran. If you don't know
  34. precisely what you're trying to extract you would need to apply some
  35. shift and bitwise operations to the word you retrieved in order to
  36. separate out the desired character.
  37.  
  38. Matt Marchese
  39. matt@cray.com
  40.