From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,3618db9cb5caf6aa X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1993-09-24 12:56:17 PST Newsgroups: comp.unix.osf.osf1 Path: gmd.de!xlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!uunet!utcsri!helios.physics.utoronto.ca!sysmark From: sysmark@helios.physics.utoronto.ca (Mark Bartelt) Subject: Re: f77 -convert big_endian broken? Message-ID: Sender: news@helios.physics.utoronto.ca (News Administrator) Reply-To: mark@cita.toronto.edu Organization: University of Toronto Physics/Astronomy/CITA References: <2C929234.20628@news.service.uci.edu> Date: Fri, 24 Sep 1993 18:40:51 GMT [ Fred Velijanian ] | There were several big-endian related bugs with 3.3 and 3.3.1, but | 3.3.2 seems to have fixed all of our problems. I don't know if this | version is on the CDROM distribution, I got ours via a tape from the CSC. [ Janet Jackson ] | My Fortran users also report that 3.3.2, which I, too, got on a tape from | DEC support, fixes it. They were quite prompt with it. Log a call. Well, after installing the 3.3.2 update DEC sent us, things did seem OK, but soon afterward I found that the "-convert big_endian" problem is *almost* fixed, but not quite totally. Specifically, it seems to work OK for integers (both scalars and arrays), for real scalars, and for real arrays with explicit subscript limits. But it fails on real arrays with implicit subscript limits. Unlike the previous problems (which affected output but not input, I believe), this one hits both input and output. Take a look at the following four short programs; the first three work, the fourth doesn't. A workaround for whatever programs break because of this bug is obvious, but it could be a bit a nuisance to implement it in a really gigantic program ... moose> cat ww1.f program w1 real x1,x2 data x1,x2/1.0,2.0/ open(unit=1,file='spam',status='new',form='unformatted') write (1) x1,x2 close(unit=1) call exit end moose> moose> cat ww2.f program w2 real x(2) data x/1.0,2.0/ open(unit=1,file='spam',status='new',form='unformatted') write (1) x(1),x(2) close(unit=1) call exit end moose> moose> cat ww3.f program w3 real x(2) data x/1.0,2.0/ open(unit=1,file='spam',status='new',form='unformatted') write (1) (x(i),i=1,2) close(unit=1) call exit end moose> moose> cat ww4.f program w4 real x(2) data x/1.0,2.0/ open(unit=1,file='spam',status='new',form='unformatted') write (1) x close(unit=1) call exit end moose> moose> for x in 1 2 3 4; do moose>> f77 -convert big_endian -o ww$x ww$x.f moose>> rm -f spam moose>> ww$x moose>> od -x spam moose>> done 0000000 0000 0800 803f 0000 0040 0000 0000 0800 0000020 0000000 0000 0800 803f 0000 0040 0000 0000 0800 0000020 0000000 0000 0800 803f 0000 0040 0000 0000 0800 0000020 0000000 0000 0800 0000 3f80 0000 4000 0000 0800 0000020 Mark Bartelt 416/978-5619 Canadian Institute for mark@cita.toronto.edu Theoretical Astrophysics mark@cita.utoronto.ca "Clothes not busy being worn are busy drying." - Dylan, on laundry day [ singing "It's all right, ma (I'm only bleaching)" ]