using LAMMPS with eclipse

Hi All,

I’m trying to compile lammps in eclipse on my machine. I had no problem in compiling lammps in terminal and it went smooth. In eclipse it builds all the source files but at the end when it wants to build the target I get following errors:

./src/angle.o: In function Intracomm': /usr/lib/openmpi/include/openmpi/ompi/mpi/cxx/intracomm.h:25: undefined reference to MPI::Comm::Comm()’
/usr/lib/openmpi/include/openmpi/ompi/mpi/cxx/intracomm.h:25: undefined reference to MPI::Comm::Comm()' ./src/angle.o: In function Intracomm’:
/usr/lib/openmpi/include/openmpi/ompi/mpi/cxx/intracomm_inln.h:23: undefined reference to MPI::Comm::Comm()' ./src/angle.o: In function MPI::Op::Init(void ()(void const, void*, int, MPI::Datatype const&), bool)’:
/usr/lib/openmpi/include/openmpi/ompi/mpi/cxx/op_inln.h:122: undefined reference to ompi_mpi_cxx_op_intercept' ./src/angle.o: In function Intracomm’:
/usr/lib/openmpi/include/openmpi/ompi/mpi/cxx/intracomm.h:25: undefined reference to MPI::Comm::Comm()' /usr/lib/openmpi/include/openmpi/ompi/mpi/cxx/intracomm.h:25: undefined reference to MPI::Comm::Comm()’
/usr/lib/openmpi/include/openmpi/ompi/mpi/cxx/intracomm.h:25: undefined reference to MPI::Comm::Comm()' ./src/angle.o: In function Intracomm’:
/usr/lib/openmpi/include/openmpi/ompi/mpi/cxx/intracomm_inln.h:23: undefined reference to MPI::Comm::Comm()' /usr/lib/openmpi/include/openmpi/ompi/mpi/cxx/intracomm_inln.h:23: undefined reference to MPI::Comm::Comm()’
./src/angle.o:/usr/lib/openmpi/include/openmpi/ompi/mpi/cxx/intracomm_inln.h:23: more undefined references to MPI::Comm::Comm()' follow ./src/angle.o:(.rodata._ZTVN3MPI3WinE[vtable for MPI::Win]+0x48): undefined reference to MPI::Win::Free()’
./src/angle.o:(.rodata._ZTVN3MPI8DatatypeE[vtable for MPI::Datatype]+0x78): undefined reference to `MPI::Datatype::Free()’
collect2: ld returned 1 exit status
make: *** [lammps-10Apr12_Mod] Error 1

I would appreciate any help to resolve this issue. By the way I use mpicc for compilation in both eclipse and terminal.

Best,
Kasra.

Hi All,

I'm trying to compile lammps in eclipse on my machine. I had no problem in
compiling lammps in terminal and it went smooth. In eclipse it builds all
the source files but at the end when it wants to build the target I get

you should complain to the eclipse people. i don't
see how this is a LAMMPS problem?
why not just run the compilation on the terminal?
can't you tell eclipse to just run make?

axel.

well, actually it’s not a complain. I thought I need to set something that you may know. I want to add a fix to lammps that’s why I’m trying to set it up in eclipse.
Any other suggestion or options?

Best,
Kasra.

well, actually it's not a complain. I thought I need to set something that
you may know. I want to add a fix to lammps that's why I'm trying to set it
up in eclipse.

one can actually do programming without an IDE. :wink:

Any other suggestion or options?

why not use eclipse as a text editor and type
"make <your platform>" on the command line
whenever you need to compile the code?

the way how lammps is compiled through the
makefile is not quite the same as what an IDE
might expect. there may be a way to teach
eclipse to do it, but by the time you've sorted
it out, you'd already have your fix programmed
and tested with a text editor.

axel.