Problems building last stable Lammps with USER-OMP

Dear Lammps users and developers,

the latest stable version as well as the GitHub version can be now alternatively build with cmake. However I have problems compiling the USER-OMP package.

Everything works fine with 16Mar18 version, which uses only the old make. But I can't compile USER-OMP in 22Aug18 version.

What I do using cmake:

mkdir build; cd build; cmake -D PKG_USER-OMP=yes ../cmake; make -j8

Looks fine, the -fopenmp flag is automatically added, but the test script fails, saying there is no USER-OMP

time OMP_NUM_THREADS=2 mpirun -n 4 ./lmp -sf omp -pk omp 2 -in in.test

LAMMPS (22 Aug 2018)
   using 2 OpenMP thread(s) per MPI task
ERROR: Using suffix omp without USER-OMP package installed (src/lammps.cpp:681)
Last command: (unknown)

Alternatively I tried the old make:

cd ../src;make yes-user-omp
Installing package user-omp

Looks good, but checking by make package-status gives a lot of errors

Installed YES: package USER-OMP
   src/angle_charmm_omp.cpp does not exist
   src/angle_class2_omp.cpp does not exist
   src/angle_cosine_delta_omp.cpp does not exist
   src/angle_cosine_omp.cpp does not exist
   src/angle_cosine_periodic_omp.cpp does not exist
   src/angle_cosine_shift_exp_omp.cpp does not exist
   src/angle_cosine_shift_omp.cpp does not exist
   src/angle_cosine_squared_omp.cpp does not exist
   src/angle_dipole_omp.cpp does not exist
   src/angle_fourier_omp.cpp does not exist
   src/angle_fourier_simple_omp.cpp does not exist
   src/angle_harmonic_omp.cpp does not exist
   src/angle_quartic_omp.cpp does not exist
   src/angle_sdk_omp.cpp does not exist
   src/angle_table_omp.cpp does not exist
   src/bond_class2_omp.cpp does not exist
   src/bond_fene_expand_omp.cpp does not exist
   src/bond_fene_omp.cpp does not exist
....

I think the problem is that these files, which were before directly in src/, are now located in src/USER-OMP/ directory, but make does not find them. Not sure about cmake though.

Building is surprisingly without problems:
make -j8 ubuntu_simple

where I have manually added -fopenmp in Makefile.ubuntu_simple

But test script fails as well, although in a different manner:

LAMMPS (22 Aug 2018)
   using 2 OpenMP thread(s) per MPI task
using multi-threaded neighbor list subroutines
   using 2 OpenMP thread(s) per MPI task
using multi-threaded neighbor list subroutines
Reading data file ...
   orthogonal box = (-62.663 -61.6246 -62.0203) to (62.663 61.6246 62.0203)
   2 by 1 by 2 MPI processor grid
   reading atoms ...
   120833 atoms
   reading velocities ...
   120833 velocities
Changing box ...
   orthogonal box = (-62.663 -61.6246 -62.0203) to (62.663 61.6246 62.0203)
ERROR: Unknown pair style eam/fs (../force.cpp:262)
Last command: pair_style eam/fs

Dear Lammps users and developers,

the latest stable version as well as the GitHub version can be now
alternatively build with cmake. However I have problems compiling the
USER-OMP package.

Everything works fine with 16Mar18 version, which uses only the old
make. But I can’t compile USER-OMP in 22Aug18 version.

What I do using cmake:

mkdir build; cd build; cmake -D PKG_USER-OMP=yes …/cmake; make -j8

Looks fine, the -fopenmp flag is automatically added, but the test
script fails, saying there is no USER-OMP

this is a known bug in cmake support in the stable release. it is going to be fixed in an upcoming patch. the correction is available in this pull request: https://github.com/lammps/lammps/pull/1084

time OMP_NUM_THREADS=2 mpirun -n 4 ./lmp -sf omp -pk omp 2 -in in.test

LAMMPS (22 Aug 2018)
using 2 OpenMP thread(s) per MPI task
ERROR: Using suffix omp without USER-OMP package installed
(src/lammps.cpp:681)
Last command: (unknown)

Alternatively I tried the old make:

cd …/src;make yes-user-omp
Installing package user-omp

Looks good, but checking by make package-status gives a lot of errors

Installed YES: package USER-OMP
src/angle_charmm_omp.cpp does not exist
src/angle_class2_omp.cpp does not exist
src/angle_cosine_delta_omp.cpp does not exist
src/angle_cosine_omp.cpp does not exist
src/angle_cosine_periodic_omp.cpp does not exist
src/angle_cosine_shift_exp_omp.cpp does not exist
src/angle_cosine_shift_omp.cpp does not exist
src/angle_cosine_squared_omp.cpp does not exist
src/angle_dipole_omp.cpp does not exist
src/angle_fourier_omp.cpp does not exist
src/angle_fourier_simple_omp.cpp does not exist
src/angle_harmonic_omp.cpp does not exist
src/angle_quartic_omp.cpp does not exist
src/angle_sdk_omp.cpp does not exist
src/angle_table_omp.cpp does not exist
src/bond_class2_omp.cpp does not exist
src/bond_fene_expand_omp.cpp does not exist
src/bond_fene_omp.cpp does not exist

I think the problem is that these files, which were before directly in
src/, are now located in src/USER-OMP/ directory, but make does not find

that is fine, those packages require other packages to be installed. if you read the updated installation instructions, you will see that the package install for the conventional make and cmake based builds are different. in fact, using cmake requires that no packages are installed via the conventional make and it will complain, if they are.

them. Not sure about cmake though.

Building is surprisingly without problems:
make -j8 ubuntu_simple

where I have manually added -fopenmp in Makefile.ubuntu_simple

But test script fails as well, although in a different manner:

LAMMPS (22 Aug 2018)
using 2 OpenMP thread(s) per MPI task
using multi-threaded neighbor list subroutines
using multi-threaded neighbor list subroutines
using 2 OpenMP thread(s) per MPI task
using multi-threaded neighbor list subroutines
using multi-threaded neighbor list subroutines
Reading data file …
orthogonal box = (-62.663 -61.6246 -62.0203) to (62.663 61.6246 62.0203)
2 by 1 by 2 MPI processor grid
reading atoms …
120833 atoms
reading velocities …
120833 velocities
Changing box …
orthogonal box = (-62.663 -61.6246 -62.0203) to (62.663 61.6246 62.0203)
ERROR: Unknown pair style eam/fs (…/force.cpp:262)
Last command: pair_style eam/fs

this is not unexpected, since you do not have the MANYBODY package installed through the conventional make build system. as mentioned in the manual, you cannot mix and match those. you have to pick one of them and stick with it.

axel.