HELP: Memory allocation problem [message #1440] |
Mon, 08 November 1993 22:27 |
<FUHRER
Messages: 1 Registered: November 1993
|
Junior Member |
|
|
I am posting this for Markus Heuer, who has not yet access to
Internet / Usenet.
"I am using IDL procedures/functions TRIANGULATE and TRIGRID with huge
amounts of sample data on VAX/VMS (IDL Verson 3.0.0, VMS Version 5.5,
machine: VAX 4000/90). To reduce the required array sizes, I split the
rectangular resampling region into smaller subrectangles and collect the data
lying in them. However, the arrays inevitably contain several 100'000 elements.
When increasing the sample array sizes beyond 100'000, I encounter a memory
allocation problem, i.e. the program stops with the error message:
'unable to allocate memory: to make array. not enough core'. The error is
reproduced with the following short test procedure:
PRO TestTriangulate, Ndata, Nloop
FOR l = 0, Nloop-1 DO BEGIN
; generate random sample data
x = RANDOMU(sd, Ndata)
y = RANDOMU(sd, Ndata)
z = RANDOMU(sd, Ndata)
; regridding sample data
TRIANGULATE, x,y, trg
r = TRIGRID(x,y,z, trg)
; deallocating data and work arrays
x = 0.
y = 0.
z = 0.
trg = 0.
; test memory in use
HELP, /MEMORY
ENDFOR
END
What is surprising: the error occurs only AFTER one or more successful passes
through a resampling cycle. And: allocating large FLTARR's works up to much
larger sizes of 8'000'000, and a short C program calling malloc produces
allocation failures at about the same large size of 8M elements.
Questions:
- Is the problem due to VAX system parameter settings? (The system manager
already tuned system parameters).
- Could it be a memory leakage problem in IDL procedures TRIANGULATE and
TRIGRID (results of HELP, /MEMORY inserted in the loop above suggest this,
although the discrepancies are small)?
- Might there be problems with the VAX implementations of the C functions
malloc and free presumably used in the implementations of TRIANGULATE
and TRTGRID?
- Is there a workaround for the memory allocation failure, APART FROM
reducing large array sizes (which I really need in the application at hand)?
A quick solution would be helpful since the mentioned application is
supposed to be up and running in about 2 weeks".
Markus Heuer
--
Jean-Pierre Farine
------------------------------------------------------------ ------------------
e-mail: farine@decus.ch (used as a gateway to usenet)
X.400: c=ch,admd=arcom,prmd=grd,s=farine
FAX: +41 31 67 61 21 Phone: +41 31 67 61 10 / 13
------------------------------------------------------------ ------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++
Martin W. Fuhrer ----- ----- ----\
Defense Technology and Procurement Agency / / / / / /
Stauffacherstrasse 65 / __ /---- / /
/ / / \ / /
CH-3000 Bern 22 (Switzerland) ----- / \ -----
------------------------------------------------------------ --------
E-MAIL : fuhrer@ra1.grd.arcom.ch
|
|
|