Thread View: comp.unix.cray
4 messages
4 total messages
Started by Joe Habermann
Tue, 17 Nov 1992 16:28
Cray to IEEE, IEEE to Cray
Author: Joe Habermann
Date: Tue, 17 Nov 1992 16:28
Date: Tue, 17 Nov 1992 16:28
11 lines
915 bytes
915 bytes
Is there a tool for converting a file containing unformatted 64-bit Cray floating point numbers into 32-bit IEEE floats and vice versa? I see that Unicos has a few routines for doing this (IEG2CRAY and CRAY2IEG) but I want the code so that I can compile it for various machines. Thanks, Joe Habermann haberman@msi.umn.edu
Re: Cray to IEEE, IEEE to Cray
Author: Marc Andreessen
Date: Tue, 17 Nov 1992 18:42
Date: Tue, 17 Nov 1992 18:42
21 lines
1286 bytes
1286 bytes
In article <haberman.722017708@msi.umn.edu> haberman@s23.msi.umn.edu (Joe Habermann) writes: Is there a tool for converting a file containing unformatted 64-bit Cray floating point numbers into 32-bit IEEE floats and vice versa? I see that Unicos has a few routines for doing this (IEG2CRAY and CRAY2IEG) but I want the code so that I can compile it for various machines. The NCSA HDF (file format) and DTM (network protocol) libraries have routines that do this. FTP to ftp.ncsa.uiuc.edu in /HDF and /Collab/DTM for more information. Marc -- Marc Andreessen Software Development Group National Center for Supercomputing Applications marca@ncsa.uiuc.edu
Re: Cray to IEEE, IEEE to Cray
Author: David Lombard
Date: Tue, 17 Nov 1992 23:32
Date: Tue, 17 Nov 1992 23:32
21 lines
1501 bytes
1501 bytes
In article <haberman.722017708@msi.umn.edu> haberman@s23.msi.umn.edu (Joe Habermann) writes:
>Is there a tool for converting a file containing unformatted 64-bit
>Cray floating point numbers into 32-bit IEEE floats and vice versa?
>
>I see that Unicos has a few routines for doing this (IEG2CRAY and
>CRAY2IEG) but I want the code so that I can compile it for various
>machines.
The intent is that the Cray handles the conversions to/from other
numerical/character formats. If you're programming in Fortran, you
can do the conversions on-the-fly using normal READ and WRITE statements,
see (man assign).
Regards,
DNL
MY_COMMENTS = MY_OPINIONS = NOBODY_ELSES;
David N. Lombard The first thing we do, The MacNeal-Schwendler Corp
dnl@macsch.com Let's kill all the lawyers. 815 Colorado Blvd
(213) 259-4911 II Henry VI, IV.ii Los Angeles, CA 90041
Re: Cray to IEEE, IEEE to Cray
Author: Baard Grimsmo
Date: Wed, 18 Nov 1992 08:06
Date: Wed, 18 Nov 1992 08:06
74 lines
3706 bytes
3706 bytes
In article <1992Nov17.233222.26999@draco.macsch.com> dnl@convex.is.macsch.com (David Lombard) writes:
>In article <haberman.722017708@msi.umn.edu> haberman@s23.msi.umn.edu (Joe Habermann) writes:
>>Is there a tool for converting a file containing unformatted 64-bit
>>Cray floating point numbers into 32-bit IEEE floats and vice versa?
>>
>>I see that Unicos has a few routines for doing this (IEG2CRAY and
>>CRAY2IEG) but I want the code so that I can compile it for various
>>machines.
>
>The intent is that the Cray handles the conversions to/from other
>numerical/character formats. If you're programming in Fortran, you
>can do the conversions on-the-fly using normal READ and WRITE statements,
>see (man assign).
>
>Regards,
>DNL
You could also consult "man asgcmd"
Here is the text I have written in my print-file:
c +++ When runned on the Cray, the asgcmd command allows the user to
c +++ assign necessary file characteristics to the given output file.
c +++
c +++ The asgcmd command can be invoked from a shell using a function or
c +++ an alias. asgcmd looks at the environment variable SHELL to determine
c +++ which format environment syntax to use. A function for sh(1), ksh(1)
c +++ or bash would be:
c +++
c +++ % function asg { eval `/usr/bin/asgcmd $*` }
c +++
c +++ An alias for csh(1) would be:
c +++
c +++ % alias asg 'eval `/usr/bin/asgcmd \!*`'
c +++
c +++ hese can be placed in your .cshrc or .profile for command line use.
c +++ Bourne/Korn shell scripts using the asg definition will have to
c +++ include the definition.
c +++
c +++ Example:
c +++ % cat prog.f
c +++ program prog
c +++ open(9,file='result/out.dat',form='unformatted')
c +++ n=1
c +++ to=2.
c +++ write(9) n,to
c +++ end
c +++ % cf77 -o prog prog.f
c +++ % asg -F f77.nonvax -N ieee result/out.dat
c +++ % prog
c +++ % rcp reult/out.dat unixworkstation:out.dat
c +++
c +++ The out.dat file can now be processed normally on an unix
c +++ workstation by an unformatted read.
c +++
c +++ NOTE: The descriptions of the output file must be identical for
c +++ the program and the asgcmd command.
c +++
c +++ Example:
c +++ open(9,file='result/out.dat',form='unformatted')
c +++ % asg -F f77.nonvax -N ieee /usr/users/me/result/out.dat << wrong
c +++ % asg -F f77.nonvax -N ieee ./result/out.dat << wrong
c +++ % asg -F f77.nonvax -N ieee result/out.dat << correct
c +++
c +++ The shell variable of the example:
c +++ _ASG_FCHAR=result/ut.dat##-C 0105000000000000 -F 0904000000000000+ %
c +++ This variable is lost after logging out.
c +++
--
Bard Grimsmo |Mail: SINTEF/Varmeteknikk |Home: Schives Gate 7
Dr.Ing | 7034 Trondheim, Norway | N-7030 Trondheim
Research Engineer|Phone: +47 7 592505 | Norway
SINTEF Division |Fax: +47 7 944513 |Home phone: +47 7 523801
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads