[CWP/SU] malloc failed

364 views
Skip to first unread message

Nadia Kreimer

unread,
Aug 7, 2008, 8:20:42 AM8/7/08
to seis...@dix.mines.edu
Hello,
I'm using a unix script in Seismic Unix that creates a spike and then applies a filter, and plots the results. I keep having an error that I don't know how to handle. It says:
"
/usr/local/cwp/bin/ximage: ealloc.c: malloc failed (Cannot allocate memory)"

I'm running SU in an Ubuntu Hardy version, in a Compaq Presario. I tried modifying the ColorDepth, but the problem doesn't vanish. I'll appreciate some advice...
Thank you all!

Nadia

 


Descargá GRATIS el poder del nuevo Internet Explorer 7. Internet Explorer 7

Reginald Beardsley

unread,
Aug 7, 2008, 11:56:12 AM8/7/08
to seis...@dix.mines.edu, Nadia Kreimer
Nadia,

You need to supply some information about the input. Most likely the cause is attempting to display a very large number of samples.

However, it's also possible that your per process limits are set too low. What does "ulimit -a" return? There's really no reason to set the data, stack & vmemory limits to anything less than unlimited. Back it the days of the VAX 11/780 it made sense, but not when a typical machine has gobs of disk space and physical memory and is only used by one person.

I have 4 GB of DRAM and 32 GB of swap space. I don't normally ever start paging, but if I want to have 20-30 large seismic plots iconified so I can call them up quickly, the extra swap space lets me do that.

Have Fun!
Reg


--- On Thu, 8/7/08, Nadia Kreimer <nadi...@hotmail.com> wrote:

> From: Nadia Kreimer <nadi...@hotmail.com>
> Subject: [CWP/SU] malloc failed
> To: seis...@dix.mines.edu
> Date: Thursday, August 7, 2008, 7:20 AM
> Hello,
> I'm using a unix script in Seismic Unix that creates a
> spike and then applies a filter, and plots the results. I
> keep having an error that I don't know how to handle. It
> says:
> "/usr/local/cwp/bin/ximage: ealloc.c: malloc failed
> (Cannot allocate memory)"
>
> I'm running SU in an Ubuntu Hardy version, in a Compaq
> Presario. I tried modifying the ColorDepth, but the problem
> doesn't vanish. I'll appreciate some advice...
> Thank you all!
>
> Nadia
>
>

> _________________________________________________________________


> Descargá GRATIS el poder del nuevo Internet Explorer 7.

> http://optimized.msn.com/Default.aspx?mkt=es-ar_______________________________________________
> seisunix mailing list
> seis...@dix.mines.edu
> http://www.cwp.mines.edu/mailman/listinfo/seisunix


_______________________________________________
seisunix mailing list
seis...@dix.mines.edu
http://www.cwp.mines.edu/mailman/listinfo/seisunix

Nadia Kreimer

unread,
Aug 7, 2008, 2:27:36 PM8/7/08
to seis...@dix.mines.edu
Hello everyone,
thank you very much for your fast answers! My "ulimit -a" gives:

core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 7672
max locked memory       (kbytes, -l) 32
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) unlimited
cpu time               (seconds, -t) unlimited
max user processes              (-u) 7672
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

I modified to unlimited the stack size, but it still complains about malloc failed. I don't believe that's a memory problem of my laptop, but perhaps something it's badly configured -I'm newbie on Linux-. The input is this:
suspike nspk=1 nt=500 ntr=1 dt=0.002 ix1=1 it1=250 > tmp1
suximage < tmp1  perc=90 xbox=10 ybox=10 wbox=4.00 hbox=6.00 \
        label1="Traveltime [s]" label2="Offset [m]"\
        title="Original Shot Gather" verbose=0  &
 and here it's where the malloc failed appears...
 Thank you a lot for your support,
Nadia


Entra en contacto con el atleta que hay en ti. Haz la prueba.

Reginald Beardsley

unread,
Aug 7, 2008, 6:10:15 PM8/7/08
to seis...@dix.mines.edu, Nadia Kreimer
Nadia,

It's a bug in ximage.c. You're specifying hbox & wbox incorrectly which is what triggered the bug. These should be integer values for the number of pixels, e.g. wbox=400 hbox=600. However, ximage should not calculate a negative width in xSizeAxesBox() which will then cause malloc to fail.

Have Fun!
Reg

John Stockwell

unread,
Aug 11, 2008, 1:50:36 PM8/11/08
to Nadia Kreimer, seis...@dix.mines.edu
I am trying to follow this problem. It seems that I am seeing examples
where people are using suximage to try to view data consisting of
1 trace. Is that it?

-John

> _________________________________________________________________
> Ingresá ya a MSN Deportes y enterate de las últimas novedades del mundo deportivo.
> http://msn.foxsports.com/fslasc/

John Stockwell | jo...@dix.Mines.EDU
Center for Wave Phenomena (The Home of Seismic Un*x)
Colorado School of Mines
Golden, CO 80401 | http://www.cwp.mines.edu/cwpcodes
voice: (303) 273-3049

Our book:
Norman Bleistein, Jack K. Cohen, John W. Stockwell Jr., [2001],
Mathematics of multidimensional seismic imaging, migration, and inversion,
(Interdisciplinary Applied Mathematics, V. 13.), Springer-Verlag, New York.

Brian Macy

unread,
Aug 11, 2008, 3:53:13 PM8/11/08
to John Stockwell, Nadia Kreimer, seis...@dix.mines.edu
Nadia,

Check your wbox and hbox parameters. They are quite small, which could be causing your problem. Try running with the default values of wbox and hbox, and the malloc failure should disappear.

Brian

-John

Reply all
Reply to author
Forward
0 new messages