[lammps-users] lammps+MPICH2

When I'm trying to compile lammps with MPICH2 here is an error.
Have anyone build lammps with MPICH2??

Output with an error
..
/usr/local/mpich2-1.0.7v1/lib/libmpich.a(ch3_shm_memory.o): In
function `MPIDI_CH3I_SHM_Unlink_mem':
ch3_shm_memory.c:(.text+0x36): undefined reference to `shm_unlink'
/usr/local/mpich2-1.0.7v1/lib/libmpich.a(ch3_shm_memory.o): In
function `MPIDI_CH3I_SHM_Attach_to_mem':
ch3_shm_memory.c:(.text+0xcb): undefined reference to `shm_open'
ch3_shm_memory.c:(.text+0x107): undefined reference to `shm_unlink'
/usr/local/mpich2-1.0.7v1/lib/libmpich.a(ch3_shm_memory.o): In
function `MPIDI_CH3I_SHM_Get_mem':
ch3_shm_memory.c:(.text+0x201): undefined reference to `shm_open'
ch3_shm_memory.c:(.text+0x22c): undefined reference to `shm_open'
ch3_shm_memory.c:(.text+0x257): undefined reference to `shm_open'
ch3_shm_memory.c:(.text+0x282): undefined reference to `shm_open'
ch3_shm_memory.c:(.text+0x2ad): undefined reference to `shm_open'
/usr/local/mpich2-1.0.7v1/lib/libmpich.a(ch3_shm_memory.o):ch3_shm_memory.c:(.text+0x2d8):
more undefined references to `shm_open' follow
collect2: ld returned 1 exit status
make[1]: *** [../lmp_g++_poems] Error 1
make[1]: Leaving directory `/home/grid1/lammps-21May08/src/Obj_g++_poems'
make: *** [g++_poems] Error 2

Makarov,

Yes, I use mpich2 without any problem. I'm using a slightly older version than you are (mpich2-1.0.6p1) on my Windows + cygwin box, but that shouldn't matter. Looks like you're trying to build with POEMS. You might try without POEMS for starters. Perhaps just the generic g++ build with no packages is best. You could try with the STUBS first, and then if that works, try rebuilding mpich2 from scratch and then do an mpi build of LAMMPS.

Axel might have some suggestions for you.

Paul

alexey,

When I'm trying to compile lammps with MPICH2 here is an error.
Have anyone build lammps with MPICH2??

i strongly prefer OpenMPI, but that is a different issue...
there should be no problem with MPICH (be it version 1 or 2).

Output with an error
..
/usr/local/mpich2-1.0.7v1/lib/libmpich.a(ch3_shm_memory.o): In
function `MPIDI_CH3I_SHM_Unlink_mem':
ch3_shm_memory.c:(.text+0x36): undefined reference to `shm_unlink'
/usr/local/mpich2-1.0.7v1/lib/libmpich.a(ch3_shm_memory.o): In
function `MPIDI_CH3I_SHM_Attach_to_mem':
ch3_shm_memory.c:(.text+0xcb): undefined reference to `shm_open'

this is referring to subroutines, that provide SYSV shared memory
interface, as it is also part of posix.

can you please enlighten us, what hardware and operating system
you are running on? it looks like you are not providing all libraries
that are required. this has to be a _generic_ MPI installation releated
problem, so please check, if you can compile/link trivial MPI tests.

cheers,
   axel.

There was a problem with device type, MPICH built with option
--with-device=ch3:ssm
Then I build it with option --with-device=ch3:sock all is work, I not
sure, but it looks like it was the cause.

can you please enlighten us, what hardware and operating system
you are running on? it looks like you are not providing all libraries
that are required. this has to be a _generic_ MPI installation releated
problem, so please check, if you can compile/link trivial MPI tests.

MPICH installation is clearly work and all libraries linked.

Thank´s for help.