Interprocessor Communication Error When Installing MSCG

Dear LAMMPS users,

I am trying to build the MSCG package using GNU compilers v. 6.4.0, however, I get a compilation error as below.

:src$ make g++_openmpi

make[1]: Entering directory `/vsc-hard-mounts/leuven-data/sys/x0090231/easybuild/work/LAMMPS/lammps-16Mar18/src/Obj_g++_openmpi’

make[1]: Leaving directory `/vsc-hard-mounts/leuven-data/sys/x0090231/easybuild/work/LAMMPS/lammps-16Mar18/src/Obj_g++_openmpi’

make[1]: Entering directory `/vsc-hard-mounts/leuven-data/sys/x0090231/easybuild/work/LAMMPS/lammps-16Mar18/src/Obj_g++_openmpi’

mpicxx -g -O3 -DLAMMPS_GZIP -I…/…/lib/mscg/includelink -DLMP_PYTHON -DLMP_MPIIO -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -std=c++11 -I/apps/leuven/skylake/2018a/software/Python/2.7.14-foss-2018a/include/python2.7 -I/apps/leuven/skylake/2018a/software/Python/2.7.14-foss-2018a/include/python2.7 -c …/fix_mscg.cpp

…/fix_mscg.cpp: In constructor ‘LAMMPS_NS::FixMSCG::FixMSCG(LAMMPS_NS::LAMMPS*, int, char**)’:

…/fix_mscg.cpp:48:12: error: invalid use of incomplete type ‘class LAMMPS_NS::Comm’

me = comm->me;

^~

In file included from …/pointers.h:26:0,

from …/fix.h:17,

from …/fix_mscg.h:23,

from …/fix_mscg.cpp:21:

…/lammps.h:32:9: note: forward declaration of ‘class LAMMPS_NS::Comm’

class Comm *comm; // inter-processor communication

^~~~

…/fix_mscg.cpp:49:16: error: invalid use of incomplete type ‘class LAMMPS_NS::Comm’

nprocs = comm->nprocs;

^~

In file included from …/pointers.h:26:0,

from …/fix.h:17,

from …/fix_mscg.h:23,

from …/fix_mscg.cpp:21:

…/lammps.h:32:9: note: forward declaration of ‘class LAMMPS_NS::Comm’

class Comm *comm; // inter-processor communication

^~~~

make[1]: *** [fix_mscg.o] Error 1

make[1]: Leaving directory `/vsc-hard-mounts/leuven-data/sys/x0090231/easybuild/work/LAMMPS/lammps-16Mar18/src/Obj_g++_openmpi’

make: *** [g++_openmpi] Error 2

The loaded module list is:

  1. EasyBuild/3.6.0 16) foss/2018a

  2. GCCcore/6.4.0 17) FFTW/3.3.7-gompi-2018a

  3. binutils/2.28-GCCcore-6.4.0 18) bzip2/1.0.6-GCCcore-6.4.0

  4. icc/2018.1.163-GCC-6.4.0-2.28 19) zlib/1.2.11-GCCcore-6.4.0

  5. ifort/2018.1.163-GCC-6.4.0-2.28 20) libreadline/7.0-GCCcore-6.4.0

  6. iccifort/2018.1.163-GCC-6.4.0-2.28 21) ncurses/6.0-GCCcore-6.4.0

  7. impi/2018.1.163-iccifort-2018.1.163-GCC-6.4.0-2.28 22) Tcl/8.6.8-GCCcore-6.4.0

  8. iimpi/2018a 23) SQLite/3.21.0-GCCcore-6.4.0

  9. imkl/2018.1.163-iimpi-2018a 24) GMP/6.1.2-GCCcore-6.4.0

  10. GCC/6.4.0-2.28 25) libffi/3.2.1-GCCcore-6.4.0

  11. numactl/2.0.11-GCCcore-6.4.0 26) Python/2.7.14-foss-2018a

  12. OpenMPI/2.1.2-GCC-6.4.0-2.28 27) CUDA/9.1.85

  13. OpenBLAS/0.2.20-GCC-6.4.0-2.28 28) hwloc/1.11.8-GCCcore-6.4.0

  14. gompi/2018a 29) GSL/2.4-GCCcore-6.4.0

  15. ScaLAPACK/2.0.2-gompi-2018a-OpenBLAS-0.2.20

My plan is to build with the GCC/OpenMPI, and then try it again with the Intel compilers, later.

Any input is very appreciated.

Regards,

Ehsan

In my version of LAMMPS, fix_mscg.cpp includes comm.h, which should fix this issue. Please update LAMMPS to the latest version.

Dear Stefan,

Thanks for your correct pointer. Indeed, the <comm.h> was missing from the fix_mscg.cpp from the stable release.

Kind regards,

Ehsan.