LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Kalle Happonen (kalle.happonen_at_[hidden])
Date: 2005-07-05 08:15:18


Thank you,
You were quite right. A case of "blind-for-my-own-code" again. After
fingting with this for hours I noticed with valgrind's help that I was
sending int's and allocating space for char's.

Kalle Happonen

Jeff Squyres wrote:

>This unfortunately is characteristic of a memory problem before the
>location in the code that actually causes the problem -- i.e., there
>was some prior problem that corrupted the heap such that the next time
>you call malloc (or the next next time, or the next next next time...),
>malloc's internal data structures get hosed and you get a segv or bus
>error.
>
>The best step you can do is probably to run this code through a
>memory-checking debugger such as Valgrind. This may help you identify
>the real memory problem that you're seeing. See the LAM FAQ for
>information on general debugging and using memory-checking debuggers.
>
>
>
>On Jul 4, 2005, at 7:02 AM, Kalle Happonen wrote:
>
>
>
>>Hello all,
>>I have a problem running lam 7.1.1. I use the standard debian package
>>on an Athlon.
>>Since mpich doesn't send the command line arguments to all processes
>>and
>>my program depends on it, I've written a function where rank 0
>>broadcasts the arguments to all other ranks.
>>
>>For some reason my progam usually segfaults when receiving the
>>arguments. I've traced the error to a malloc in my own code, and it is
>>the malloc itself that causes the segfault, not a uninitialized pointer
>>on my end. This only happens with lam (mpich works fine). Also if I
>>vary
>>the length of the arguments the program might work or then crash at a
>>later time. And it seems like if I allocate something like 1000 bytes /
>>argument it doesn't crash at all.
>>
>>Can anyone shed light on this one?
>>
>>laminfo output:
>>
>> LAM/MPI: 7.1.1
>> Prefix: /usr/lib/lam
>> Architecture: i386-pc-linux-gnu
>> Configured by: camm
>> Configured on: Tue Mar 22 16:49:24 UTC 2005
>> Configure host: intech19
>> Memory manager: ptmalloc2
>> C bindings: yes
>> C++ bindings: yes
>> Fortran bindings: yes
>> C compiler: i386-linux-gcc
>> C++ compiler: i386-linux-g++
>> Fortran compiler: g77
>> Fortran symbols: double_underscore
>> C profiling: yes
>> C++ profiling: yes
>> Fortran profiling: yes
>> C++ exceptions: no
>> Thread support: yes
>> ROMIO support: yes
>> IMPI support: no
>> Debug support: no
>> Purify clean: no
>> SSI boot: globus (API v1.1, Module v0.6)
>> SSI boot: rsh (API v1.1, Module v1.1)
>> SSI boot: slurm (API v1.1, Module v1.0)
>> SSI coll: lam_basic (API v1.1, Module v7.1)
>> SSI coll: shmem (API v1.1, Module v1.0)
>> SSI coll: smp (API v1.1, Module v1.2)
>> SSI rpi: crtcp (API v1.1, Module v1.1)
>> SSI rpi: lamd (API v1.0, Module v7.1)
>> SSI rpi: sysv (API v1.0, Module v7.1)
>> SSI rpi: tcp (API v1.0, Module v7.1)
>> SSI rpi: usysv (API v1.0, Module v7.1)
>> SSI cr: self (API v1.0, Module v1.0)
>>
>>
>>Thanks,
>>Kalle Happonen
>>_______________________________________________
>>This list is archived at http://www.lam-mpi.org/MailArchives/lam/
>>
>>
>>
>
>
>