[lammps-users] compiling atc

Thank you for your help.
But that’s not over yet.
After changing List to LIST I got that list:
In file included from LammpsInterface.cpp:19:
/opt/mpich-ch_p4-gcc-1.2.7/include/mpi2c++/comm.h:171: error: expected ,' or …’ before ‘&’ token
/opt/mpich-ch_p4-gcc-1.2.7/include/mpi2c++/comm.h:171: error: ISO C++ forbids declaration of Datatype' with no type /opt/mpich-ch_p4-gcc-1.2.7/include/mpi2c++/comm.h:173: error: expected ,’ or ...' before '&' token /opt/mpich-ch_p4-gcc-1.2.7/include/mpi2c++/comm.h:174: error: ISO C++ forbids declaration of Datatype’ with no type
/opt/mpich-ch_p4-gcc-1.2.7/include/mpi2c++/comm.h:177: error: expected ,' or …’ before ‘&’ token
/opt/mpich-ch_p4-gcc-1.2.7/include/mpi2c++/comm.h:178: error: ISO C++ forbids declaration of Datatype' with no type /opt/mpich-ch_p4-gcc-1.2.7/include/mpi2c++/comm.h:178: error: virtual void Comm::Recv(void*, int, int) const’ and virtual void Comm::Recv(void*, int, int) const' cannot be overloaded /opt/mpich-ch_p4-gcc-1.2.7/include/mpi2c++/comm.h:181: error: expected ,’ or ...' before '&' token /opt/mpich-ch_p4-gcc-1.2.7/include/mpi2c++/comm.h:181: error: ISO C++ forbids declaration of Datatype’ with no type
/opt/mpich-ch_p4-gcc-1.2.7/include/mpi2c++/comm.h:184: error: expected ,' or …’ before ‘&’ token
/opt/mpich-ch_p4-gcc-1.2.7/include/mpi2c++/comm.h:184: error: ISO C++ forbids declaration of Datatype' with no type /opt/mpich-ch_p4-gcc-1.2.7/include/mpi2c++/comm.h:187: error: expected ,’ or ...' before '&' token /opt/mpich-ch_p4-gcc-1.2.7/include/mpi2c++/comm.h:187: error: ISO C++ forbids declaration of Datatype’ with no type
/opt/mpich-ch_p4-gcc-1.2.7/include/mpi2c++/comm.h:189: error: Request' does not name a type /opt/mpich-ch_p4-gcc-1.2.7/include/mpi2c++/comm.h:192: error: Request’ does not name a type
/opt/mpich-ch_p4-gcc-1.2.7/include/mpi2c++/comm.h:195: error: Request' does not name a type /opt/mpich-ch_p4-gcc-1.2.7/include/mpi2c++/comm.h:198: error: Request’ does not name a type
/opt/mpich-ch_p4-gcc-1.2.7/include/mpi2c++/comm.h:201: error: Request' does not name a type /opt/mpich-ch_p4-gcc-1.2.7/include/mpi2c++/comm.h:204: error: Status’ has not been declared
/opt/mpich-ch_p4-gcc-1.2.7/include/mpi2c++/comm.h:204: error: ISO C++ forbids declaration of status' with no type /opt/mpich-ch_p4-gcc-1.2.7/include/mpi2c++/comm.h:208: error: Status’ has not been declared
/opt/mpich-ch_p4-gcc-1.2.7/include/mpi2c++/comm.h:208: error: ISO C++ forbids declaration of status' with no type /opt/mpich-ch_p4-gcc-1.2.7/include/mpi2c++/comm.h:212: error: Prequest’ does not name a type
/opt/mpich-ch_p4-gcc-1.2.7/include/mpi2c++/comm.h:216: error: Prequest' does not name a type /opt/mpich-ch_p4-gcc-1.2.7/include/mpi2c++/comm.h:220: error: Prequest’ does not name a type
/opt/mpich-ch_p4-gcc-1.2.7/include/mpi2c++/comm.h:224: error: Prequest' does not name a type /opt/mpich-ch_p4-gcc-1.2.7/include/mpi2c++/comm.h:228: error: Prequest’ does not name a type
/opt/mpich-ch_p4-gcc-1.2.7/include/mpi2c++/comm.h:233: error: expected ,' or …’ before ‘&’ token
/opt/mpich-ch_p4-gcc-1.2.7/include/mpi2c++/comm.h:236: error: ISO C++ forbids declaration of Datatype' with no type /opt/mpich-ch_p4-gcc-1.2.7/include/mpi2c++/comm.h:239: error: expected ,’ or ...' before '&' token /opt/mpich-ch_p4-gcc-1.2.7/include/mpi2c++/comm.h:242: error: ISO C++ forbids declaration of Datatype’ with no type
/opt/mpich-ch_p4-gcc-1.2.7/include/mpi2c++/comm.h:242: error: virtual void Comm::Sendrecv(const void*, int, int) const' and virtual void Comm::Sendrecv(const void*, int, int) const’ cannot be overloaded
/opt/mpich-ch_p4-gcc-1.2.7/include/mpi2c++/comm.h:245: error: expected ,' or …’ before ‘&’ token
/opt/mpich-ch_p4-gcc-1.2.7/include/mpi2c++/comm.h:247: error: ISO C++ forbids declaration of Datatype' with no type /opt/mpich-ch_p4-gcc-1.2.7/include/mpi2c++/comm.h:250: error: expected ,’ or ...' before '&' token /opt/mpich-ch_p4-gcc-1.2.7/include/mpi2c++/comm.h:252: error: ISO C++ forbids declaration of Datatype’ with no type
/opt/mpich-ch_p4-gcc-1.2.7/include/mpi2c++/comm.h:252: error: virtual void Comm::Sendrecv_replace(void*, int, int) const' and virtual void Comm::Sendrecv_replace(void*, int, int) const’ cannot be overloaded
/opt/mpich-ch_p4-gcc-1.2.7/include/mpi2c++/comm.h:288: error: expected ,' or …’ before ‘&’ token
/opt/mpich-ch_p4-gcc-1.2.7/include/mpi2c++/comm.h:288: error: ISO C++ forbids declaration of Errhandler' with no type /opt/mpich-ch_p4-gcc-1.2.7/include/mpi2c++/comm.h:290: error: Errhandler’ does not name a type
/opt/mpich-ch_p4-gcc-1.2.7/include/mpi2c++/comm.h:293: error: Errhandler' does not name a type /opt/mpich-ch_p4-gcc-1.2.7/include/mpi2c++/comm.h:335: error: Status’ does not name a type
LammpsInterface.cpp: In member function int ATC::LammpsInterface::ngroup()': LammpsInterface.cpp:374: error: invalid use of undefined type struct LAMMPS_NS::Group’
…/…/src/lammps.h:37: error: forward declaration of struct LAMMPS_NS::Group' LammpsInterface.cpp: In member function int ATC::LammpsInterface::group_bit(int)’:
LammpsInterface.cpp:376: error: invalid use of undefined type struct LAMMPS_NS::Group' ../../src/lammps.h:37: error: forward declaration of struct LAMMPS_NS::Group’
LammpsInterface.cpp: In member function int ATC::LammpsInterface::find_group(const char*)': LammpsInterface.cpp:378: error: invalid use of undefined type struct LAMMPS_NS::Group’
…/…/src/lammps.h:37: error: forward declaration of struct LAMMPS_NS::Group' LammpsInterface.cpp: In member function int ATC::LammpsInterface::group_inverse_mask(int)’:
LammpsInterface.cpp:382: error: invalid use of undefined type struct LAMMPS_NS::Group' ../../src/lammps.h:37: error: forward declaration of struct LAMMPS_NS::Group’
LammpsInterface.cpp: In member function char* ATC::LammpsInterface::group_name(int)': LammpsInterface.cpp:387: error: invalid use of undefined type struct LAMMPS_NS::Group’
…/…/src/lammps.h:37: error: forward declaration of struct LAMMPS_NS::Group' LammpsInterface.cpp: In member function void ATC::LammpsInterface::group_bounds(int, double*)’:
LammpsInterface.cpp:392: error: invalid use of undefined type struct LAMMPS_NS::Group' ../../src/lammps.h:37: error: forward declaration of struct LAMMPS_NS::Group’
make: *** [LammpsInterface.o] Error 1

ps you can remove the typedef List entirely, it doesn't appear to be used and it is removed in our development copy

I don't know why you are getting errors with your installed mpi2 comm.h... sorry

congratulations,
you are finding out how braindead the MPICH implementation of MPI is.

lammps doesn't use any of the c++ MPI bindings, so if you add

-DMPICH_SKIP_MPICXX

to your compiler flags, most of the problems should go away magically.

i would also strongly recommend to have a serious look at
OpenMPI instead of MPICH. i find it to be a much cleaner implementation,
more flexible to set up (its fortran bindings are compiler independent,
so no need to compile it with different compilers, just compile
with gcc once and be done with it) and easier and more convenient
to use and adjust to the local environment. ...and the mpiXXX wrappers
do work properly (unlike the MPICH ones).

cheers,
     axel.

2010/12/16 t t <[email protected]...>: