Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!usc!apple!agate!ucbvax!c.chem.upenn.edu!YATES From: YATES@c.chem.upenn.edu ("YATES, JOHN H.") Newsgroups: comp.sys.sgi Subject: f77 and -static option Message-ID: <9102241616.AA25648@remote.dccs.upenn.edu> Date: 24 Feb 91 16:14:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 32 I have a Fortran program that repeatedly builds and diagonalizes a 400x400 array using routines from a math library. I find that if I compile without the option -static, it core dumps (after about the 7th array, about 27 minutes of CPU time). If I build the whole code with f77 -g -static -o pa1 pa1.f pa2.f pa3.f It did not core dump. (roughly 2 hours of CPU time, about 29 400x400 arrays.) I learned about using -static by example from someones Makefile for a large Fortran code, and it is described in the f77 man page, which seems to leave it to folklore on when to use it or when it is necessary. My questions are, 1. should ALL Fortran Unix codes be compiled with the -static option? 2. When is it "safe" to not use it? 3. Are the unsafe -automatic Fortran constructs things like EQUIVALENCE, COMMON blocks, BLOCK DATA, ... and others? 4. Is it buggy Fortran code that requires -static to be used, or just normal Fortran coding practices? 5. What f77 options are generally regarded as "necessary" or "useful" in building large codes ported from non-Unix (e.g. VMS) systems. 6. Could this perhaps be an IRIX or f77 bug? Thanks, John yates@c.chem.upenn.edu Brought to you by Super Global Mega Corp .com