Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: [OMPI users] Memory question and possible bug in 64bit addressing under Leopard!
From: Gregory John Orris (gregory.orris_at_[hidden])
Date: 2008-04-25 16:06:56

OK folks,

Whilst testing cases of ratcheting up memory usage under Mac OSX
Leopard I ran into a peculiar problem of segmentation faults that just
should not be happening. I whittled down the code to find where the
error took place and well, for this simple code...

#include <mpi.h>
#include <iostream>

int main(int argc, char **argv)

         MPI_Init( &argc, &argv);
         int n = 10000000;
         float X[n];

         return 0;


Using mpic++ -m64 test.cpp -o test
and mpiexec -np 1 ./test

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
exited on signal 4 (Illegal instruction).

However, substituting in

float *X = new float[n];
float X[n];


Before we get too far, the implication and the reason I found the
error in the first place is that I was allocating 2D arrays that were
pretty large with the line
float X[n][m];
and they were failing. However the total size times the number of
processors was well within the RAM of the machine.

Am I missing something? Has this been seen before?