From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,3465c61ceb352f60 X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1991-08-14 01:11:11 PST Path: gmdzi!unido!mcsun!uunet!morrow.stanford.edu!pangea.Stanford.EDU!farrell From: farrell@pangea.Stanford.EDU (Phil Farrell) Newsgroups: comp.sys.dec Subject: Re: f77 array size limitation Message-ID: <1991Aug13.230613.28997@morrow.stanford.edu> Date: 13 Aug 91 23:06:13 GMT References: <1991Aug8.022217.1663@shark.uucp> Sender: news@morrow.stanford.edu (News Service) Organization: Stanford Univ. Earth Sciences In article <1991Aug8.022217.1663@shark.uucp> qiangli@GAUSS.CASR.FAU.EDU (Charlie Li) writes: >Our DECstation 5000/200CX is running Ultrix 4.1 and Fortran for RISC. > >(1) When I compile a Fortran program with a large array A(2*N,N), say N=400, >the compiled program give segament fault (core dumped). The program runs >OK for smaller N. I checked the compiler document, it seems the limit on >array size only lay on the system configuration. The RISC for Fortran compiler dynamically allocates all uninitialized arrays at execution time. It uses the stack space to do this. If your stack space is too small, the program will fail. As I recall, the default stacksize allocated by the C-shell (the parameter controlling per process stack space) is quite small, although the system maximum can be quite large (controlled in the config file by maxssiz - default 32 Megabytes). You can see your current stacksize limit (in Kilobytes) with the C-shell command limit and modify it with limit stacksize xxxx which you should probably put into your .cshrc file. -Phil Farrell, Computer Systems Manager Stanford University School of Earth Sciences farrell@pangea.stanford.edu