wang@math.ufl.edu (03/05/91)
Hi, you fortran experts! I was writing a test program. I wanted to write a character string with, say, 10000 characters onto an unformatted file. Here is my little program: CHARACTER*1 ch(10000) PRINT *,'Enter a positive integer less than 10000: ' READ *,kk DO 10 i = 1, kk 10 ch(i) = CHAR(67) OPEN(UNIT=12,FILE='bork.out',FORM='unformatted') WRITE(12) (ch(i),i=1,kk) END I had of course no problem on compiling, but the program got crashed when I tried to write an array with more than 8184 characters! The message I got is: *** Segmentation Violation = signal 11 code 3 I tried to find what this message means from the fortran compiler manual, but no such message could be found from it. Can any of you tell me what the catch is? I am running a SUN Sparc IPC with SunOS 4.1.1 and Sun Fortran 1.2. I'd like to ask: Does SUN Fortran have any limitations on the maximum record length of an unformatted file??? If so, such limitations seem not to exist on SUN-3 systems because the above program worked fine for any integers I entered. Are there any bugs in SUN Fortran 1.2? -Liyun
khb@chiba.Eng.Sun.COM (Keith Bierman fpgroup) (03/06/91)
..I was writing a test program. I wanted to write a character string >with, say, 10000 characters onto an unformatted file. Here is my >little program: f77 v1.3.1 with "patch2" i.e. the current release for the last many moons.... f77 for.f && a.out for.f: MAIN: Enter a positive integer less than 10000: 8185 chiba:/net/chiba/home2/khb> on a 4/75. Also works with f77v1.4. f77v1.2 was a long time ago. I don't recall this being a problem in that time ... but my brain is leaky sometimes. This is the sort of inquiry which really should go to the Sun Answer center .... v1.2 wasn't really designed for SunOS 4.1+ (couldn't, it shipped a year or more before that OS) ... I know that the AC folks know a lot about all sorts of configuration problems that I don't. cheers -- ---------------------------------------------------------------- Keith H. Bierman kbierman@Eng.Sun.COM | khb@chiba.Eng.Sun.COM SMI 2550 Garcia 12-33 | (415 336 2648) Mountain View, CA 94043