Trouble installing Electrode Package using traditional make

Hello,

I am new to LAMMPS, and I am using the stable 2, August 2023 version. I am trying to build LAMMPS using make mpi, and I have the Molecule, Manybody, KSPACE, and Rigid packages installed.

I am trying to install the Electrode Package. I tried to follow the instructions listed on this website (3.7. Packages with extra build options — LAMMPS documentation), and I used these commands:
make lib-electrode args=“-m mpi”
make lib-linalg args=“-m mpi”

The make mpi command works with the first four packages, but whenever I try to use it with the electrode package installed, I get an error that looks like this:

mpicxx -g -O3 -std=c++11 -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c …/pppm_electrode.cpp
…/pppm_electrode.cpp(765): error: expected a “;”
double *_noalias xi_ele = x_ele[ipos];
^

…/pppm_electrode.cpp(768): error: identifier “xi_ele” is undefined
int nix = static_cast((xi_ele[0] - boxlo[0]) * delxinv + shift) - OFFSET;
^

…/pppm_electrode.cpp(883): error: expected a “;”
double *_noalias xi_ele = x_ele[ipos];
^

…/pppm_electrode.cpp(886): error: identifier “xi_ele” is undefined
int nix = static_cast((xi_ele[0] - boxlo[0]) * delxinv + shift) - OFFSET;
^

compilation aborted for …/pppm_electrode.cpp (code 2)
make[1]: *** [Makefile:114: pppm_electrode.o] Error 2
make[1]: Leaving directory ‘/jet/home/dlee5/lammps-2Aug2023/src/Obj_mpi’
make: *** [Makefile:397: mpi] Error 2

Can someone help me with what I am doing wrong to install the package?

Thank you!

I cannot reproduce this error when repeating the commands you described.
The code relevant to define the problematic “_noalias” macro predates the ELECTRODE package (fall 2014) and should always work and never lead to an error like you describe.

Did you make any changes to the sources outside of downloading the stable version?
How did you obtain the stable version?

What compiler do you use and platform are you compiling on?

I went on this website Download LAMMPS and downloaded the stable release for 2 Aug 2023 and unpacked it with the tar -xzvf file.tar.gz command. I do not believe I made any changes to the sources outside of downloading the stable version.

I am trying to use LAMMPS on Bridges-2 with the use of PuTTY and WinSCP. I loaded one of the OpenMPI modules listed, openmpi/4.0.2-intel20.4, to compile the MPI program.

Can you provide the output of “mpicxx --showme”?

You could try loading a different OpenMPI module, e.g. one that uses GCC instead of the Intel compiler.

Another option would be to use the CMake based build.

That said, it should not produce and error regardless. I have currently no idea what could have prompted the failure.