Path: utzoo!attcan!uunet!cs.utexas.edu!usc!sdd.hp.com!uakari.primate.wisc.edu!relay.nswc.navy.mil!oasys!news From: news@oasys.dt.navy.mil (USENET News System) Newsgroups: comp.lang.fortran Subject: Re: Array dilemma. Message-ID: <5477@oasys.dt.navy.mil> Date: 23 Jan 91 14:21:39 GMT References: Reply-To: jwhite@dtoa3.dt.navy.mil (Joseph White) Organization: David Taylor Research Center, Annapolis, MD Lines: 51 ~ Sorry to post this, but it bounced when I tried to mail it (Host unknown) ~ ~ In article quan@sol.surv.utas.oz (Stephen Quan) writes: >I am currently on a project for surveyors and recently attempted to port >the code from our Sun workstation to a PC. Unfortunately, the original >code needed double precision arrays of the order of 50000 elements or >higher. > ~ [Stuff deleted] ~ >Cause of problem DOUBLE PRECISION BIG(3,50000) >Synopsis of problem compiler won't compile code for BIG is size 3x50000. >Synopsis 2 PC won't load executable when BIG is size 3x4000. >Synopsis 3 Seems to runs ok, when BIG is size 3x3000. >Current Compiler Microsoft Fortran. >Current Size of EXE About 150K (for both Synopsis 2 and 3). > >Question 1 Will F77L handle this problem? >Question 2 Does F77L allocated space for arrays in the EXE? > - Will I get a larger EXE file? (somewhat 600K?). >Question 3 Is there a compiler that would solve this problem? > >There is little chance that I can push the department to get an F77L/EM, >but I would be interested if that or any other compiler would solve my >problem. If all fails, I probably replaced the array with random >accessing a large file instead. ~ Hello; I can't directly answer any of your questions, but I might be able to provide some insight to your problem. To have an Double Precision array that is (3,50000) would require: ~ (3 * 50000)elements * 8bytes/element = 1,200,000 bytes = 1,171.875Kbytes ~ This is the amount of memory required to hold that array in memory, since a PC can only access 640 Kbytes, there is not enough memory to hold your array im memory let alone the rest of your program. The only way I can see out of your problem, other than the file approach you mention is to get a 386 machine and a compiler that would create a protected mode program. ~ Sorry I couldn't help you more, but I wanted to share some insight into your problem ~ Joe White jwhite@dtoa3.dt.navy.mil David Taylor Research Center, Annapolis MD ~