Xref: utzoo alt.sys.sun:2611 comp.lang.fortran:4656 Path: utzoo!utgpu!cs.utexas.edu!uwm.edu!ogicse!unmvax!ariel.unm.edu!ghostwheel.unm.edu!john From: john@ghostwheel.unm.edu (John Prentice) Newsgroups: alt.sys.sun,comp.lang.fortran Subject: Re: How Broken is Sun Fortran (Summary) Message-ID: <1991Feb04.013735.8220@ariel.unm.edu> Date: 4 Feb 91 01:37:35 GMT References: <3140@casbah.acns.nwu.edu> <1991Feb04.013025.8087@ariel.unm.edu> Organization: University of New Mexico Math Dept., Albuquerque, NM Lines: 52 Whoops! Sorry about reposting the previous message. Something messed up and my reply got trashed. What I intended to be posted was the following comment. Concerning the -Bstatic bug, we have recently had more problems with unformatted i/o. Specifically: The following code bombed using Sun Fortran version 1.3 : program test parameter (imax=5000,jmax=20) integer k(imax,jmax) do 20 i=1,imax do 10 j=1,jmax k(i,j)=j 10 continue 20 continue open (unit=1,file='test.dat',status='unknown',form='unformatted') write (1) ((k(i,j),i=1,imax),j=1,jmax) rewind 1 read (1) ((k(i,j),i=1,imax,j=1,jmax) do 40 i=1,imax do 30 j=1,jmax if (k(i,j).ne.j) call abort 30 continue 40 continue close (unit=1) end We compiled with: f77 -Bstatic -o test test.f and ran it. It failed the check in loop 30. HOWEVER, if you eliminate the implied do in the read/write and just write/read the array (i.e., write (1) k ), it worked fine! We had other problems as well in trying to compile a much more complicated code. We finally constructed work arounds, but they are clumsy. By the way, without the -Bstatic, the code bombs with a segmentation fault. So, two questions. First, anyone see something unforgiveable that I am doing with this code? Second, anyone else seen this problem or know of a fix? Thanks, John -- John K. Prentice john@unmfys.unm.edu (Internet) Dept. of Physics and Astronomy, University of New Mexico, Albuquerque, NM, USA Computational Physics Group, Amparo Corporation, Albuquerque, NM, USA