Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] OPENMPI 1.2.7 & PGI compilers: configure option --disable-ptmalloc2-opt-sbrk
From: Francesco Iannone (francesco.iannone_at_[hidden])
Date: 2008-10-17 04:14:05


Hi Jeff

Sorry to disturb you

I send you the Stack Frame captured with Totalview.

The example program "callocrash" goes in Segmentation Violation on sYMALLOc
function:

set_head(remainder, remainder_size | PREV_INUSE);

The Stack frame is

Function "sYSMALLOc":
  nb: 0x000000025216d050 (9967161424)
  av: 0x2a95c1ef00 (&main_arena) -> (struct
malloc_state)
Local variables:
  old_top: 0x0b8bc110 -> (struct malloc_chunk)
  old_size: 0x0000000000020ef0 (134896)
  old_end: 0x0b8dd000 -> ""
  size: 0x000000025218def0 (9967296240)
  correction: 0x0000000000000000 (0)
  brk: 0x0b8dd000 -> ""
  snd_brk: 0xffffffffffffffff -> <Bad address:
0xffffffffffffffff>
  front_misalign: 0x0000000000000000 (0)
  end_misalign: 0x000000000b8dd000 (193843200)
  aligned_brk: 0x00507000 -> ""
  p: 0x0b8bc110 -> (struct malloc_chunk)
  remainder: 0x25da29160 -> <Bad address: 0x25da29160>
(struct malloc_chunk)
  remainder_size: 0x0000000000020ea0 (134816)
  sum: 0x000000003828b000 (942190592)
  pagemask: 0x0000000000000fff (4095)

On 16/10/08 14:05, "Francesco Iannone" <francesco.iannone_at_[hidden]>
wrote:

> Hi Jeff
> I used the configure option:
>
> --enable-ptmalloc2-opt-sbrk
>
> To solve a segmentation fault in memory allocation with openmpi.1.2.x and
> PGI 7.1-4 and 7.2.
>
> I have a simple source code (Callocrash.c) as example of this (see belowe).
>
> Could you test this code on a node with 8 Gbyte of RAM and RedHat enterprise
> 4+ openmpi 1.2.x, PGI 7.1-4.
>
> I compiled it with:
>
> pgcc -o Callocrash Callocreash.c (it's ok)
> gnu4 -o Callocrash Callocreash.c (it's ok)
> mpicc -o Callocrash Callocreash.c (Segmentation fault in sysMALLOC when
> it has to allocate 622947588 bytes)
>
> However thanks in advance
>
> greetings
>
>
> Callocrash.c
>
>
> #include <stdio.h>
> #include <stdlib.h>
>
> int main( int argc, char *argv[])
> {
> /*
> * memory allocations simulation for ~50M nonzeros:
> * nd=180 md=350 mdy=420
> *
> * if this program crashes, there is a compiler problem
> */
> printf("memory allocations simulation for ~50M nonzeros: nd=180
> md=350 mdy=420\n");
> printf("if this program crashes, there check your
> compiler/environment configuration\n");
>
> printf("sizeof(int) %d\n",sizeof(int));
> printf("sizeof(int*) %d\n",sizeof(int*));
> printf("sizeof(size_t) %d\n",sizeof(size_t));
>
> if( sizeof(size_t)<8 || sizeof(int*)<8 )
> {
> printf("please compile this program for a 64 bit
> environment!\n");
> return -1;
> }
>
> int *p;
>
> printf("allocation 1/4..\n");
> p = calloc(47109185,16);
> if(!p)printf("..failed.\n");
> printf("allocation 2/4..\n");
> p = calloc(47109185,4);
> if(!p)printf("..failed.\n");
> printf("allocation 3/4..\n");
> p = calloc(47109185,4);
> if(!p)printf("..failed.\n");
> printf("allocation 4/4..\n");
>
> p = calloc(622947588,16);
> if(!p)printf("..failed.\n");
> if(!p) return -1;
>
> printf("allocations test passed (no crash)\n");
> return 0;
> }
>
>
> On 15/10/08 19:42, "Jeff Squyres" <jsquyres_at_[hidden]> wrote:
>
>> On Oct 15, 2008, at 9:35 AM, Francesco Iannone wrote:
>>
>>> I have a cluster of 16 nodes DualCPU DualCore AMD RAM 16 GB with
>>> InfiniBand
>>> CISCO HCA and switch InfiniBand.
>>> It uses Linux RH Enterprise 4 64 bit , OpenMPI 1.2.7, PGI 7.1-4 and
>>> openib-1.2-7.
>>>
>>> Hence it means that the option ‹disable-ptmalloc2 is catastrophic in
>>> the
>>> above configuration.
>>
>> Actually, I notice that in your original message, you said "--disable-
>> ptmalloc2-opt-sbrk", but here you said "--disable-ptmalloc2". The
>> former is:
>>
>> Only trigger callbacks when sbrk is used
>> for small
>> allocations, rather than every call to
>> malloc/free.
>> (default: enabled)
>>
>> So it should be fine to disable; it shouldn't affect overall MPI
>> performance too much.
>>
>> The latter disables ptmalloc2 entirely (and you'll likely get lower
>> benchmark bandwidth for large messages).
>>
>> I'm unaware of either of these options leading to problems with the
>> PGI compiler suite; I have tested OMPI v1.2.x with several versions of
>> the PGI compiler without problem (although my latest version is PGI
>> 7.1-4).
>
> Dr. Francesco Iannone
> Associazione EURATOM-ENEA sulla Fusione
> C.R. ENEA Frascati
> Via E. Fermi 45
> 00044 Frascati (Roma) Italy
> phone 00-39-06-9400-5124
> fax 00-39-06-9400-5524
> mailto:francesco.iannone_at_[hidden]
> http://www.afs.enea.it/iannone
>
>
>
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users

Dr. Francesco Iannone
Associazione EURATOM-ENEA sulla Fusione
C.R. ENEA Frascati
Via E. Fermi 45
00044 Frascati (Roma) Italy
phone 00-39-06-9400-5124
fax 00-39-06-9400-5524
mailto:francesco.iannone_at_[hidden]
http://www.afs.enea.it/iannone