Error within USER-MISC

Hi all,

I’ve tried to install USER-MISC and ran in the following error during make mpi:

mpicxx -g -O3 -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c …/pair_list.cpp

…/pair_list.cpp(83): error: expected a “;”

const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0];

^

…/pair_list.cpp(84): error: “restrict” has already been declared in the current scope

dbl3_t * _noalias const f = (dbl3_t *) atom->f[0];

^

…/pair_list.cpp(84): error: expected a “;”

dbl3_t * _noalias const f = (dbl3_t *) atom->f[0];

^

…/pair_list.cpp(109): error: identifier “x” is undefined

const double dx = x[i].x - x[j].x;

^

…/pair_list.cpp(155): error: identifier “f” is undefined

f[i].x += dx*fpair;

^

…/pair_list.cpp(161): error: identifier “f” is undefined

f[j].x -= dx*fpair;

^

compilation aborted for …/pair_list.cpp (code 2)

make[1]: *** [pair_list.o] Error 2

I have updated LAMMPS to the newest stable version. This problem still persists. There is no problem with make serial. The problem does not exist if I do not install USER-MISC. Do you have any suggestions on how I can use pair_style lennard/mdf without running into this problem?

Thanks,
Filip

Filip,

this would likely be an issue with the underlying compiler inside your mpicxx wrapper.

can you please compile without USER-MISC and then post the output of

echo info config | ./lmp_mpi

thanks,
axel.

Hi Axel,

Here’s the output:

[[email protected]…9215… src]$ echo info config | ./lmp_mpi

LAMMPS (3 Mar 2020)

Info-Info-Info-Info-Info-Info-Info-Info-Info-Info-Info

Printed on Thu Jun 11 13:03:42 2020

LAMMPS version: 3 Mar 2020 / 20200303

Git info: stable / stable_3Mar2020 / 6354777d098deafc18a600877d00dbfcd8ce15c3

OS information: Linux 3.10.0-693.el7.x86_64 on x86_64

sizeof(smallint): 32-bit

sizeof(imageint): 32-bit

sizeof(tagint): 32-bit

sizeof(bigint): 64-bit

Compiler: Intel C++ Intel® C++ g++ 4.8.5 mode with OpenMP not enabled

C++ standard: C++98

Active compile time flags:

-DLAMMPS_GZIP

-DLAMMPS_SMALLBIG

Installed packages:

KSPACE MANYBODY MC MISC MOLECULE REPLICA RIGID USER-REAXC

Info-Info-Info-Info-Info-Info-Info-Info-Info-Info-Info

Total wall time: 0:00:00

Thanks,
Filip

ok. the difference between serial and mpi is due to the compiler. serial uses the GNU compiler and mpicxx uses an intel compiler.
if you just need the one pair style and are otherwise content with your compilation, you can just delete the files src/pair_list.h src/pair_list.cpp and it should compile.

if you ever want to use the USER-INTEL or USER-OMP package, we would need to find a different workaround/solution. the LAMMPS code itself is doing what it should be doing, it is just that you have an intel compiler that we cannot fully support or that is not properly detected.

axel.

Thanks for your explanation, Axel! For now, I’ll just use the proposed work-around. Could you please suggest compilers that should work / be properly detected by LAMMPS? I can work with the cluster admins to get those installed.

Thanks again,
Filip

version 3March2020 should be very compatible with the exception of some packages requiring c++11 compatibility or the “restrict” keyword to function (as you noticed).
any later version of LAMMPS requires full C++11 compatibility/support and thus will not work in all aspects with older distribution. we currently aim to support CentOS7 and Ubuntu18.04 as the oldest linux distributions but also new releases like ubuntu 20.04 or fedora 32. anything older will have to use the 3 March 2020 version or install an additional, newer compiler.

off the top of my head:

  • any Gcc from 4.8 onward should work (but may need using -std=c++11), version 7 or later is preferred
  • any Clang compiler from version 6 onward
  • any Intel compiler from version 16 onward
    we have not tested with PGI in a long time, so i cannot comment on that.

axel.