Hello everyone,
First of all, I’d like to express my appreciation for the continuous support provided by the LAMMPS development team.
I am currently trying to simulate the behavior of granular particles using LAMMPS with hardware acceleration. My LAMMPS executable is built with the RIGID package, so the fix rigid/small/omp command should be recognized.
However, when I try to use fix rigid/small/omp, LAMMPS returns an error. In contrast, if I use fix rigid/omp, it runs without any issues.
Below is a minimum working example (MWE) that demonstrates the problem:
=== MWE ===
units si
atom_style sphere
boundary f f f
comm_modify vel yes
atom_modify map array
package omp 4
dimension 3
neigh_modify delay 0 every 1 check yes
variable crit_dt equal 5e-7
region domain3D block -0.05 0.05 -0.05 0.05 -0.05 0.05
create_box 2 domain3D
fix grav_acc all gravity 9.81 vector 0.0 0.0 -1.0
fix viscous_damping all viscous 0.0001
read_data clumps.atom add append
group clump1 id 1 2
group clump2 id 3 4
fix rigidAll all rigid/small/omp group 2 clump1 clump2
#fix rigidAll all rigid/omp group 2 clump1 clump2
pair_style gran/hertz/history/omp 200000.0 NULL 50.0 NULL 0.5 1
pair_coeff * *
fix bottomPlate all wall/gran granular hertz/material 70e9 0.01 0.25 tangential mindlin_rescale NULL 1.0 0.4 &
damping tsuji rolling none &
zplane -0.03 NULL
timestep ${crit_dt}
compute temp_sphere all temp/sphere
thermo_modify temp temp_sphere
run 3000000
quit
=== End of MWE ===
=== clumps.atom ===
Python generated LAMMPS data file
4 atoms
2 atom types
#0 0.08 xlo xhi
#0 0.04 ylo yhi
#0 0.08 zlo zhi
Atoms
1 1 0.02 2700 0.0 0.0 0.0
2 1 0.01 2700 0.0 0.0 0.01
3 2 0.02 2700 0.05 0.0 0.0
4 2 0.01 2700 0.05 0.0 0.01
=== End of clumps.atom ===
=== Error Message when using (fix rigid/small/omp) ===
$ mpirun -np 10 ./lmp_IGO -in TMI_2.in
LAMMPS (29 Aug 2024 - Maintenance - stable_29Aug2024_update1-26-g89e442dac1-modified)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98)
using 1 OpenMP thread(s) per MPI task
set 4 OpenMP thread(s) per MPI task
using multi-threaded neighbor list subroutines
Created orthogonal box = (-0.05 -0.05 -0.05) to (0.05 0.05 0.05)
1 by 2 by 5 MPI processor grid
Reading data file ...
WARNING: Non-zero image flags with growing box can produce bad coordinates (src/read_data.cpp:675)
orthogonal box = (-0.5 -0.5 -0.5) to (0.5 0.5 0.5)
1 by 2 by 5 MPI processor grid
reading atoms ...
4 atoms
read_data CPU = 0.001 seconds
2 atoms in group clump1
2 atoms in group clump2
ERROR: Unknown fix rigid/small/omp keyword group (src/RIGID/fix_rigid_small.cpp:151)
Last command: fix rigidAll all rigid/small/omp group 2 clump1 clump2
=== End of Error message ===
=== Information of LAMMPS ===
$ ./lmp_IGO -help
Large-scale Atomic/Molecular Massively Parallel Simulator - 29 Aug 2024 - Maintenance
Git info (maintenance / stable_29Aug2024_update1-26-g89e442dac1-modified)
OS: Linux "Ubuntu 24.04.1 LTS" 6.8.0-51-generic x86_64
Compiler: Intel LLVM C++ 202500.0 / Intel(R) oneAPI DPC++/C++ Compiler 2025.0.4 (2025.0.4.20241205) with OpenMP 5.1
C++ standard: C++11
MPI v3.1: Open MPI v5.0.6, package: Open MPI hp-z8@HP-Z8 Distribution, ident: 5.0.6, repo rev: v5.0.6, Nov 15, 2024
Accelerator configuration:
OPENMP package API: OpenMP
OPENMP package precision: double
OpenMP standard: OpenMP 5.1
INTEL package API: OpenMP
INTEL package precision: single mixed double
INTEL package SIMD: enabled
FFT information:
FFT precision = double
FFT engine = mpiFFT
FFT library = KISS
Active compile time flags:
-DLAMMPS_GZIP
-DLAMMPS_FFMPEG
-DLAMMPS_SMALLBIG
sizeof(smallint): 32-bit
sizeof(imageint): 32-bit
sizeof(tagint): 32-bit
sizeof(bigint): 64-bit
Available compression formats:
Extension: .gz Command: gzip
Extension: .bz2 Command: bzip2
Extension: .zst Command: zstd
Extension: .xz Command: xz
Extension: .lzma Command: xz
Installed packages:
GRANULAR INTEL OPENMP RIGID VTK
List of individual style options included in this LAMMPS executable
* Atom styles:
atomic body charge ellipsoid hybrid
line sphere tri
* Integrate styles:
respa respa/omp verlet
* Minimize styles:
cg fire/old fire hftn quickmin
sd
* Pair styles:
born born/omp buck buck/coul/cut
buck/coul/cut/intel buck/coul/cut/omp buck/intel
buck/omp coul/cut coul/cut/omp coul/debye coul/debye/omp
coul/dsf coul/dsf/omp coul/wolf coul/wolf/omp meam/c
reax reax/c mesont/tpm gran/hertz/history
gran/hertz/history/omp gran/hooke gran/hooke/history
gran/hooke/history/omp gran/hooke/omp granular hybrid
hybrid/omp hybrid/molecular hybrid/molecular/omp
hybrid/overlay hybrid/overlay/omp hybrid/scaled
hybrid/scaled/omp lj/cut lj/cut/coul/cut
lj/cut/coul/cut/omp lj/cut/intel lj/cut/omp lj/expand
lj/expand/omp morse morse/omp soft soft/omp
table table/omp yukawa yukawa/omp zbl
zbl/omp zero
* Fix styles
adapt add/heat addforce ave/atom ave/chunk
ave/correlate ave/grid ave/histo ave/histo/weight
ave/time aveforce balance box/relax damping/cundall
deform deposit ave/spatial ave/spatial/sphere
lb/pc lb/rigid/pc/sphere reax/c/bonds reax/c/species
dt/reset efield ehex enforce2d evaporate
external freeze gravity gravity/omp halt
heat heat/flow indent langevin lineforce
momentum move nph nph/omp nph/sphere
nph/sphere/omp npt npt/intel npt/omp npt/sphere
npt/sphere/omp nve nve/intel nve/limit nve/noforce
nve/omp nve/sphere nve/sphere/omp nvt nvt/intel
nvt/omp nvt/sllod nvt/sllod/intel nvt/sllod/omp nvt/sphere
nvt/sphere/omp pair planeforce pour press/berendsen
press/langevin print property/atom rattle recenter
restrain rigid rigid/nph rigid/nph/omp rigid/nph/small
rigid/npt rigid/npt/omp rigid/npt/small rigid/nve rigid/nve/omp
rigid/nve/small rigid/nvt rigid/nvt/omp rigid/nvt/small rigid/omp
rigid/small rigid/small/omp setforce shake spring
spring/chunk spring/self store/force store/state temp/berendsen
temp/rescale thermal/conductivity vector viscous
wall/gran wall/gran/region wall/harmonic wall/lj1043
wall/lj126 wall/lj93 wall/morse wall/reflect wall/region
wall/table
=== End of Information ===
I would greatly appreciate any advice or insights on how to resolve this issue.
Thank you!