Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] Memory question and possible bug in 64bit addressing under Leopard!
From: Warner Yuen (wyuen_at_[hidden])
Date: 2008-04-25 17:42:17


I believe that you can also add this to your LIB or LDFLAGS for 64-bit
applications:

-Wl,-stack_addr,0xF10000000 -Wl,-stack_size,0x64000000

Warner Yuen
Scientific Computing
Consulting Engineer
Apple Computer
email: wyuen_at_[hidden]
Tel: 408.718.2859
Fax: 408.715.0133

On Apr 25, 2008, at 1:11 PM, users-request_at_[hidden] wrote:

> ------------------------------
>
> Message: 6
> Date: Fri, 25 Apr 2008 14:10:57 -0600
> From: Brian Barrett <brbarret_at_[hidden]>
> Subject: Re: [OMPI users] Memory question and possible bug in 64bit
> addressing under Leopard!
> To: Open MPI Users <users_at_[hidden]>
> Message-ID: <C9986452-B565-454D-8F79-E7C5E0571A19_at_[hidden]>
> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
>
> On Apr 25, 2008, at 2:06 PM, Gregory John Orris wrote:
>
>> produces a core dump on a machine with 12Gb of RAM.
>>
>> and the error message
>>
>> mpiexec noticed that job rank 0 with PID 75545 on node mymachine.com
>> exited on signal 4 (Illegal instruction).
>>
>> However, substituting in
>>
>> float *X = new float[n];
>> for
>> float X[n];
>>
>> Succeeds!
>
>
> You're running off the end of the stack, because of the large amount
> of data you're trying to put there. OS X by default has a tiny stack
> size, so codes that run on Linux (which defaults to a much larger
> stack size) sometimes show this problem. Your best bets are either to
> increase the max stack size or (more portably) just allocate
> everything on the heap with malloc/new.
>
> Hope this helps,
>
> Brian
>
> --
> Brian Barrett
> Open MPI developer
> http://www.open-mpi.org/