[lammps-users] LAMMPS on Mac OS with MPI?

Hey, I'm trying to get lammps running on Mac OS X Snow Leopard with the granular package.
I at least get a binary after compilation, during which I will get warnings like

*.d No such file or directory and
thermo.cpp: In member function ‘void LAMMPS_NS::Thermo::header()’:
thermo.cpp:255: warning: format not a string literal and no format arguments

Trying to run it, I get this error:

mlt28:src Tobias$ mpirun -np 2 ./lmp_mac_mpi < ../examples/crack/in.crack
[mlt28:94665] *** Process received signal ***
[mlt28:94665] Signal: Segmentation fault (11)
[mlt28:94665] Signal code: Address not mapped (1)
[mlt28:94665] Failing at address: 0x440000b0
[mlt28:94665] [ 0] 2 libSystem.B.dylib 0x00007fff8439c80a _sigtramp + 26
[mlt28:94665] [ 1] 3 ??? 0x0000000000000000 0x0 + 0
[mlt28:94665] [ 2] 4 lmp_mac_mpi 0x000000010018469c _ZN9LAMMPS_NS8UniverseC2EPNS_6LAMMPSEi + 218
[mlt28:94665] [ 3] 5 lmp_mac_mpi 0x000000010018471b _ZN9LAMMPS_NS8UniverseC1EPNS_6LAMMPSEi + 9
[mlt28:94665] [ 4] 6 lmp_mac_mpi 0x00000001000e046c _ZN9LAMMPS_NS6LAMMPSC2EiPPci + 174
[mlt28:94665] [ 5] 7 lmp_mac_mpi 0x00000001000e0e15 _ZN9LAMMPS_NS6LAMMPSC1EiPPci + 9
[mlt28:94665] [ 6] 8 lmp_mac_mpi 0x00000001000e3203 main + 64
[mlt28:94665] [ 7] 9 lmp_mac_mpi 0x0000000100000f44 start + 52
[mlt28:94665] [ 8] 10 ??? 0x0000000000000001 0x0 + 1
[mlt28:94665] *** End of error message ***
[mlt28:94666] *** Process received signal ***
[mlt28:94666] Signal: Segmentation fault (11)
[mlt28:94666] Signal code: Address not mapped (1)
[mlt28:94666] Failing at address: 0x440000b0
[mlt28:94666] [ 0] 2 libSystem.B.dylib 0x00007fff8439c80a _sigtramp + 26
[mlt28:94666] [ 1] 3 ??? 0x0000000000000000 0x0 + 0
[mlt28:94666] [ 2] 4 lmp_mac_mpi 0x000000010018469c _ZN9LAMMPS_NS8UniverseC2EPNS_6LAMMPSEi + 218
[mlt28:94666] [ 3] 5 lmp_mac_mpi 0x000000010018471b _ZN9LAMMPS_NS8UniverseC1EPNS_6LAMMPSEi + 9
[mlt28:94666] [ 4] 6 lmp_mac_mpi 0x00000001000e046c _ZN9LAMMPS_NS6LAMMPSC2EiPPci + 174
[mlt28:94666] [ 5] 7 lmp_mac_mpi 0x00000001000e0e15 _ZN9LAMMPS_NS6LAMMPSC1EiPPci + 9
[mlt28:94666] [ 6] 8 lmp_mac_mpi 0x00000001000e3203 main + 64
[mlt28:94666] [ 7] 9 lmp_mac_mpi 0x0000000100000f44 start + 52
[mlt28:94666] [ 8] 10 ??? 0x0000000000000001 0x0 + 1
[mlt28:94666] *** End of error message ***
mpirun noticed that job rank 0 with PID 94665 on node mlt28.math.uni-paderborn.de exited on signal 11 (Segmentation fault).
1 additional process aborted (not shown)

My makefile (using Makefile.mac_mpi as a base) looks like this:

CC = mpic++
CCFLAGS = -O -Wno-write-strings -I../../src
DEPFLAGS = -M
LINK = mpic++
LINKFLAGS = -O
LIB =
ARCHIVE = ar
ARFLAGS = -rc
SIZE = size

LMP_INC = -DLAMMPS_GZIP
MPI_INC = -I/usr/local/include
MPI_PATH = -L/usr/local/lib
MPI_LIB = -lmpich -lpthread
FFTW = /usr/local
FFT_INC = -DFFT_FFTW -I${FFTW}/include
FFT_PATH = -L${FFTW}/lib
FFT_LIB = -lfftw
...

Any help would be greatly appreciated! I've managed to compile lammps with mpi for linux but mac causes a headache...

Best regards,
Tobias

The warning you listed doesn't matter. I presume you looked at
src/MAKE/Makefile.mac_mpi? Can you run on a single
proc? Can you run other MPI based codes (e.g. the test files that
come with MPI) successfully?

Steve

Thank you for your reply. Yes, the /src/MAKE/Makefile.mac_mpi ist the Makefile I'm using. Running on a single processor is not possible either, same error. Weird thing is, I had it working without the granular package last week. I do need the granular package so I tried recompiling again. Now, even the old version won't recompile (without granular). I begin to think my mpicc is broken. I checked the examples in the mpi folder. I can run the cpi example fine, but when compiling and trying to run the others, I also get runtime errors that look like the one with lammps. So I guess my best bet at this point is to do a new install of mpi.

Tobias