Xref: utzoo comp.lang.fortran:5098 alt.sys.sun:3354 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!batcomputer!cornell!rochester!rocksanne!jeyadev From: jeyadev@WRC.XEROX.COM (Surendar Jeyadev) Newsgroups: comp.lang.fortran,alt.sys.sun Subject: Sun Fortran Unformatted Write Message-ID: <769@rocksanne.WRC.XEROX.COM> Date: 3 Apr 91 23:58:15 GMT Sender: news@WRC.XEROX.COM Reply-To: jeyadev@WRC.XEROX.COM (Surendar Jeyadev) Distribution: usa Organization: WRC, XEROX Lines: 50 Sometime ago there was a spate of articles about problems connected with the unformatted write statement in Sun Fortran 1.3.1. I did not see what the conclusion was, but we seem to be running into a similar problem. The program in question has the following statements: ...... imax = 56 jmax = 22 kmax = 17 write(3) (((array(i,j,k), k=1,kmax), j=1,jmax), i=1,imax) ....... While the version 1.2 did not seem to mind, version 1.3.1 declares a segmentation fault and quits. Using dbx I got signal SEGV (no mapping at the fault address) in w4cp at 0xf76f0724 w4cp+8: ld [%o0 + %o1], %o4 but I do not know what to do with this! The user of this program used to run it on a VAX and the write statement was tailored to take into account the fact that the maximum number of records that could be written is 8191. After playing around a bit with the values of imax, jmax and kmax, I found that the program works fine for small values of the 3 numbers, but crashes when their product reaches a critical value. A simple program that writes out a vector with ....... lmax = write(3) (a(i), l=1,lmax) ....... reveals that the program crashes when lmax reaches 2046. Now the question. Is this well known? I cannot find anything about this in the manuals (such as they are). I understand that the workaround is easy, but, has this been observed/documented? And, since the user depends heavily on unformatted writes, are there any other limitations for unformatted writes? Thanks -- Surendar Jeyadev Internet: jeyadev.wbst128@xerox.com Most books say that the sun is a star. But, somehow, it knows how to change back to a sun in the morning. (5th grader)