Kokkos version of minimize

Hi!

I compiled LAMMPS with support for KOKKOS, CUDA, and ML-PACE.

cmake -C ../cmake/presets/kokkos-cuda.cmake \
    -D PKG_ML-PACE=YES \
    -D CMAKE_BUILD_TYPE=Release \
    -D BUILD_MPI=OFF \
    -D PKG_OPENMP=YES \
    -D BUILD_OMP=ON \
    -D PKG_KOKKOS=ON \
    -D BUILD_KOKKOS=ON \
    -D Kokkos_ENABLE_CUDA=ON \
    -D Kokkos_ARCH_HOSTARCH=YES \
    -D BUILD_SHARED_LIBS=OFF \
    -D CMAKE_CXX_FLAGS="-static-libgcc -static-libstdc++ -fopenmp" \
    -D CMAKE_EXE_LINKER_FLAGS="-static-libgcc -static-libstdc++ -L/usr/lib/gcc/x86_64-linux-gnu/12 -lgomp" \
    ../cmake

When running on a cluster I see the following error

ERROR: KOKKOS package requires fix minimize/kk (src/KOKKOS/min_kokkos.cpp:64)
Last input line: minimize 1.0e-4 1.0e-6 1000 10000

Part of the input file

#[ UNITS
units          metal
boundary       f f f
atom_style     atomic/kk
atom_modify        map array
newton         off
neighbor       0.1 bin
neigh_modify   delay 10
timestep 0.001
thermo ${echo_thermo_every_step}
#]

#[ Atom Definition & potential
read_data    ${start_file} 
pair_style   hybrid/overlay/kk pace table linear 10000
pair_coeff   * * pace c_ace.yace C
pair_coeff   * * table d2.table D2 9.0
#]


min_style cg/kk
minimize 1.0e-4 1.0e-6 1000 10000
run 0
delete_atoms group removed_atoms

If I add fix kkmin all minimize/kk to the input file I see the following error:

ERROR: Unrecognized fix style 'minimize/kk' (src/modify.cpp:928)
Last input line: fix kkmin all minimize/kk          

I use LAMMPS (2 Apr 2025)

Please see: [BUG] Unable to run minimization with kokkos without `-sf kk` · Issue #4549 · lammps/lammps · GitHub

I don’t think the problem is related to the bug you fixed. I’ve tried patching locally and making a new binary, but I still have the same problem.
Moreover, I tried running with -sf kk before.

I’m also surprised that I don’t see minimize/kk in the output of the following command:

$ lmp -sf kk -h
* Minimize styles:                                                                                                                                                                                                 
                                                                                                                                                                                                                   
cg              cg/kk           fire/old        fire            hftn                                                                                                                                               
quickmin        sd                                                                                                                                                                                                 
                                                                                                                                                                                                                   
* Pair styles:                                                                                                                                                                                                     
                                                                                                                                                                                                                   
born            born/omp        buck            buck/coul/cut   buck/coul/cut/kk                                                                                                                                   
buck/coul/cut/omp               buck/kk         buck/omp        coul/cut                                                                                                                                           
coul/cut/kk     coul/cut/omp    coul/debye      coul/debye/kk   coul/debye/omp                                                                                                                                     
coul/dsf        coul/dsf/kk     coul/dsf/omp    coul/wolf       coul/wolf/kk                                                                                                                                       
coul/wolf/omp   meam/c          reax            reax/c          mesont/tpm                                                                                                                                         
hybrid          hybrid/omp      hybrid/kk       hybrid/molecular                                                                                                                                                   
hybrid/molecular/omp            hybrid/overlay  hybrid/overlay/omp                                                                                                                                                 
hybrid/overlay/kk               hybrid/scaled   hybrid/scaled/omp                                                                                                                                                  
lj/cut          lj/cut/coul/cut lj/cut/coul/cut/kk                                                                                                                                                                 
lj/cut/coul/cut/omp             lj/cut/kk       lj/cut/omp      lj/expand                                                                                                                                          
lj/expand/kk    lj/expand/omp   morse           morse/kk        morse/omp                                                                                                                                          
pace            pace/extrapolation              pace/extrapolation/kk                                                                                                                                              
pace/kk         soft            soft/kk         soft/omp        table                                                                                                                                              
table/kk        table/omp       yukawa          yukawa/kk       yukawa/omp                                                                                                                                         
zbl             zbl/kk          zbl/omp         zero                      

I was wrong. I remove this line fix 1 all minimize/kk and now all good. Thanks.

You cannot see the KOKKOS minimize fix because it is an internal fix and thus hidden.

When you use -sf kk then you should remove all /kk suffixes in the input.

I have no problem with the latest develop branch using this simplified input:

units           lj
atom_style      atomic/kk
lattice         fcc 0.8442
region          box block 0 2 0 2 0 2
create_box      1 box
create_atoms    1 box
mass            1 1.0

velocity        all create 3.0 2131513 loop geom

pair_style      hybrid/overlay/kk lj/cut/kk 2.5 morse/kk 2.5
pair_coeff      1 1 lj/cut/kk  0.5 1.0
pair_coeff      1 1 morse/kk   50.0 2.0 1.5
neighbor        0.3 bin
neigh_modify    every 20 delay 0 check no one 100000 page 10000000

fix             1 all nve/kk
thermo 5

min_style cg/kk
minimize 1.0e-4 1.0e-6 1000 10000
run_style verlet/kk
run 0

Here is the output from ./lmp -h:

Large-scale Atomic/Molecular Massively Parallel Simulator - 2 Apr 2025 - Development
Git info (molecule-refactor-for-json / patch_2Apr2025-455-g9941d9132c-modified)

Usage example: ./lmp -var t 300 -echo screen -in in.alloy

[...]

OS: Linux "Fedora Linux 42 (Adams)" 6.14.8-300.fc42.x86_64 x86_64

Compiler: GNU C++ 15.1.1 20250521 (Red Hat 15.1.1-2) with OpenMP 4.5
C++ standard: C++17
Embedded fmt library version: 10.2.0
Embedded JSON class version: 3.12.0

MPI v4.1: MPICH Version:      4.2.2
MPICH Release date: Wed Jul  3 09:16:22 AM CDT 2024
MPICH ABI:          16:2:4

Accelerator configuration:

GPU package API: HIP
GPU package precision: mixed
KOKKOS package API: OpenMP Serial
KOKKOS package precision: double
Kokkos library version: 4.6.0
OPENMP package API: OpenMP
OPENMP package precision: double
OpenMP standard: OpenMP 4.5

Compatible GPU present: yes

FFT information:

FFT precision  = double
FFT engine  = mpiFFT
FFT library = KISS
KOKKOS FFT engine  = mpiFFT
KOKKOS FFT library = KISS

Active compile time flags:

-DLAMMPS_GZIP
-DLAMMPS_PNG
-DLAMMPS_JPEG
-DLAMMPS_FFMPEG
-DLAMMPS_CURL
-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
Extension: .lz4    Command: lz4


Installed packages:

AMOEBA ASPHERE AWPMD BOCS BODY BPM BROWNIAN CG-DNA CG-SPICA CLASS2 COLLOID 
COLVARS COMPRESS CORESHELL DIELECTRIC DIFFRACTION DIPOLE DPD-BASIC DPD-MESO 
DPD-REACT DPD-SMOOTH DRUDE EFF ELECTRODE EXTRA-COMMAND EXTRA-COMPUTE 
EXTRA-DUMP EXTRA-FIX EXTRA-MOLECULE EXTRA-PAIR FEP GPU GRANULAR H5MD 
INTERLAYER KIM KOKKOS KSPACE LATBOLTZ LEPTON MACHDYN MANIFOLD MANYBODY MC MDI 
MEAM MESONT MGPT MISC ML-HDNNP ML-IAP ML-PACE ML-POD ML-QUIP ML-RANN ML-SNAP 
ML-UF3 MOFFF MOLECULE MOLFILE NETCDF OPENMP OPT ORIENT PERI PHONON PLUGIN 
PLUMED POEMS PTM PYTHON QEQ QTB REACTION REAXFF REPLICA RHEO RIGID SHOCK SMTBQ 
SPH SPIN SRD TALLY UEF VORONOI YAFF 

List of individual style options included in this LAMMPS executable

* Atom styles:

amoeba          angle           angle/kk        atomic          atomic/kk       
body            bond            bond/kk         bpm/sphere      charge          
charge/kk       dielectric      dipole          dipole/kk       dpd             
dpd/kk          edpd            electron        ellipsoid       full            
full/kk         hybrid          hybrid/kk       line            mdpd            
molecular       molecular/kk    oxdna           peri            rheo            
rheo/thermal    smd             sph             sphere          sphere/kk       
spin            spin/kk         tdpd            template        tri             
wavepacket      

* Integrate styles:

respa           respa/omp       verlet          verlet/kk       verlet/split    

* Minimize styles:

cg              cg/kk           fire/old        fire            hftn            
quickmin        sd              spin            spin/cg         spin/lbfgs      

* Pair styles:

adp             adp/kk          adp/omp         agni            agni/omp        
aip/water/2dm   aip/water/2dm/opt               airebo          airebo/morse    
airebo/morse/omp                airebo/omp      amoeba          amoeba/gpu      
atm             awpmd/cut       beck            beck/gpu        beck/omp        
body/nparticle  body/rounded/polygon            body/rounded/polyhedron         
bop             born            born/coul/dsf   born/coul/dsf/cs                
born/coul/long  born/coul/long/cs               born/coul/long/cs/gpu           
born/coul/long/gpu              born/coul/long/omp              born/coul/msm   
born/coul/msm/omp               born/coul/wolf  born/coul/wolf/cs               
born/coul/wolf/cs/gpu           born/coul/wolf/gpu              
born/coul/wolf/omp              born/gauss      born/gpu        born/omp        
bpm/spring      brownian        brownian/kk     brownian/omp    brownian/poly   
brownian/poly/omp               buck            buck6d/coul/gauss/dsf           
buck6d/coul/gauss/long          buck/coul/cut   buck/coul/cut/gpu    
buck/coul/cut/kk                buck/coul/cut/omp               buck/coul/long  
buck/coul/long/cs               buck/coul/long/gpu              
buck/coul/long/kk               buck/coul/long/omp              buck/coul/msm   
buck/coul/msm/omp               buck/gpu        buck/kk         
buck/long/coul/long             buck/long/coul/long/omp         buck/mdf        
buck/omp        colloid         colloid/gpu     colloid/omp     comb            
comb3           comb/omp        cosine/squared  coul/ctip       coul/cut        
coul/cut/dielectric             coul/cut/global coul/cut/global/omp             
coul/cut/gpu    coul/cut/kk     coul/cut/omp    coul/cut/soft   
coul/cut/soft/omp               coul/debye      coul/debye/gpu  coul/debye/kk   
coul/debye/omp  coul/diel       coul/diel/omp   coul/dsf        coul/dsf/gpu    
coul/dsf/kk     coul/dsf/omp    coul/exclude    coul/long       coul/long/cs    
coul/long/cs/gpu                coul/long/dielectric            coul/long/gpu   
coul/long/kk    coul/long/omp   coul/long/soft  coul/long/soft/omp              
coul/msm        coul/msm/omp    coul/shield     coul/slater/cut coul/slater/long                
coul/slater/long/gpu            coul/streitz    coul/tt         coul/wolf       
coul/wolf/cs    coul/wolf/kk    coul/wolf/omp   meam/c          reax            
reax/c          mesont/tpm      dispersion/d3   dpd             
dpd/coul/slater/long            dpd/coul/slater/long/gpu        dpd/ext         
dpd/ext/kk      dpd/ext/omp     dpd/ext/tstat   dpd/ext/tstat/kk                
dpd/ext/tstat/omp               dpd/fdt         dpd/fdt/energy  
dpd/fdt/energy/kk               dpd/gpu         dpd/kk          dpd/omp         
dpd/tstat       dpd/tstat/gpu   dpd/tstat/kk    dpd/tstat/omp   drip            
dsmc            e3b             eam             eam/alloy       eam/alloy/gpu   
eam/alloy/kk    eam/alloy/omp   eam/alloy/opt   eam/cd          eam/cd/old      
eam/fs          eam/fs/gpu      eam/fs/kk       eam/fs/omp      eam/fs/opt      
eam/gpu         eam/he          eam/kk          eam/omp         eam/opt         
edip            edip/multi      edip/omp        edpd            edpd/gpu        
eff/cut         eim             eim/omp         exp6/rx         exp6/rx/kk      
extep           gauss           gauss/cut       gauss/cut/omp   gauss/gpu       
gauss/omp       gayberne        gayberne/gpu    gayberne/omp    
gran/hertz/history              gran/hertz/history/omp          gran/hooke      
gran/hooke/history              gran/hooke/history/kk           
gran/hooke/history/omp          gran/hooke/omp  granular        gw              
gw/zbl          harmonic/cut    harmonic/cut/omp                
hbond/dreiding/lj               hbond/dreiding/lj/angleoffset   
hbond/dreiding/lj/angleoffset/omp               hbond/dreiding/lj/omp           
hbond/dreiding/morse            hbond/dreiding/morse/angleoffset                
hbond/dreiding/morse/angleoffset/omp            hbond/dreiding/morse/omp        
hdnnp           hippo           hippo/gpu       hybrid          hybrid/omp      
hybrid/kk       hybrid/molecular                hybrid/molecular/omp            
hybrid/overlay  hybrid/overlay/omp              hybrid/overlay/kk               
hybrid/scaled   hybrid/scaled/omp               ilp/graphene/hbn                
ilp/graphene/hbn/opt            ilp/tmd         ilp/tmd/opt     kim             
kolmogorov/crespi/full          kolmogorov/crespi/z             lcbop           
lebedeva/z      lennard/mdf     lepton          lepton/coul     lepton/coul/omp 
lepton/omp      lepton/sphere   lepton/sphere/omp               line/lj         
list            lj96/cut        lj96/cut/gpu    lj96/cut/omp    
lj/charmm/coul/charmm           lj/charmm/coul/charmm/gpu       
lj/charmm/coul/charmm/implicit  lj/charmm/coul/charmm/implicit/kk               
lj/charmm/coul/charmm/implicit/omp              lj/charmm/coul/charmm/kk        
lj/charmm/coul/charmm/omp       lj/charmm/coul/long             
lj/charmm/coul/long/gpu         lj/charmm/coul/long/kk          
lj/charmm/coul/long/omp         lj/charmm/coul/long/opt         
lj/charmm/coul/long/soft        lj/charmm/coul/long/soft/omp    
lj/charmm/coul/msm              lj/charmm/coul/msm/omp          
lj/charmmfsw/coul/charmmfsh     lj/charmmfsw/coul/long          
lj/charmmfsw/coul/long/kk       lj/class2       lj/class2/coul/cut              
lj/class2/coul/cut/kk           lj/class2/coul/cut/omp          
lj/class2/coul/cut/soft         lj/class2/coul/long             
lj/class2/coul/long/cs          lj/class2/coul/long/gpu         
lj/class2/coul/long/kk          lj/class2/coul/long/omp         
lj/class2/coul/long/soft        lj/class2/gpu   lj/class2/kk    lj/class2/omp   
lj/class2/soft  lj/cubic        lj/cubic/gpu    lj/cubic/omp    lj/cut          
lj/cut/coul/cut lj/cut/coul/cut/dielectric      lj/cut/coul/cut/dielectric/omp  
lj/cut/coul/cut/gpu             lj/cut/coul/cut/kk              
lj/cut/coul/cut/omp             lj/cut/coul/cut/soft            
lj/cut/coul/cut/soft/gpu        lj/cut/coul/cut/soft/omp        
lj/cut/coul/debye               lj/cut/coul/debye/dielectric    
lj/cut/coul/debye/dielectric/omp                lj/cut/coul/debye/gpu           
lj/cut/coul/debye/kk            lj/cut/coul/debye/omp           lj/cut/coul/dsf 
lj/cut/coul/dsf/gpu             lj/cut/coul/dsf/kk              
lj/cut/coul/dsf/omp             lj/cut/coul/long                
lj/cut/coul/long/cs             lj/cut/coul/long/dielectric     
lj/cut/coul/long/dielectric/omp lj/cut/coul/long/gpu            
lj/cut/coul/long/kk             lj/cut/coul/long/omp            
lj/cut/coul/long/opt            lj/cut/coul/long/soft           
lj/cut/coul/long/soft/gpu       lj/cut/coul/long/soft/omp       lj/cut/coul/msm 
lj/cut/coul/msm/dielectric      lj/cut/coul/msm/gpu             
lj/cut/coul/msm/omp             lj/cut/coul/wolf                
lj/cut/coul/wolf/omp            lj/cut/dipole/cut               
lj/cut/dipole/cut/gpu           lj/cut/dipole/cut/kk            
lj/cut/dipole/cut/omp           lj/cut/dipole/long              
lj/cut/dipole/long/gpu          lj/cut/gpu      lj/cut/kk       lj/cut/omp      
lj/cut/opt      lj/cut/soft     lj/cut/soft/omp lj/cut/sphere   
lj/cut/sphere/omp               lj/cut/thole/long               
lj/cut/thole/long/omp           lj/cut/tip4p/cut                
lj/cut/tip4p/cut/omp            lj/cut/tip4p/long               
lj/cut/tip4p/long/gpu           lj/cut/tip4p/long/omp           
lj/cut/tip4p/long/opt           lj/cut/tip4p/long/soft          
lj/cut/tip4p/long/soft/omp      lj/expand       lj/expand/coul/long             
lj/expand/coul/long/gpu         lj/expand/coul/long/kk          lj/expand/gpu
lj/expand/kk    lj/expand/omp   lj/expand/sphere                
lj/expand/sphere/omp            lj/gromacs      lj/gromacs/coul/gromacs         
lj/gromacs/coul/gromacs/kk      lj/gromacs/coul/gromacs/omp     lj/gromacs/gpu  
lj/gromacs/kk   lj/gromacs/omp  lj/long/coul/long               
lj/long/coul/long/dielectric    lj/long/coul/long/omp           
lj/long/coul/long/opt           lj/long/dipole/long             
lj/long/tip4p/long              lj/long/tip4p/long/omp          lj/mdf          
lj/pirani       lj/pirani/omp   lj/relres       lj/relres/omp   lj/sf/dipole/sf 
lj/sf/dipole/sf/gpu             lj/sf/dipole/sf/omp             lj/smooth       
lj/smooth/gpu   lj/smooth/linear                lj/sf           
lj/smooth/linear/omp            lj/sf/omp       lj/smooth/omp   lj/spica        
lj/sdk          lj/spica/coul/long              lj/sdk/coul/long                
lj/spica/coul/long/gpu          lj/sdk/coul/long/gpu            
lj/spica/coul/long/kk           lj/sdk/coul/long/kk             
lj/spica/coul/long/omp          lj/sdk/coul/long/omp            
lj/spica/coul/msm               lj/sdk/coul/msm lj/spica/coul/msm/omp           
lj/sdk/coul/msm/omp             lj/spica/gpu    lj/sdk/gpu      lj/spica/kk     
lj/sdk/kk       lj/spica/omp    lj/sdk/omp      lj/switch3/coulgauss/long       
local/density   lubricate       lubricateU      lubricateU/poly lubricate/omp   
lubricate/poly  lubricate/poly/omp              mdpd            mdpd/gpu        
mdpd/rhosum     meam            meam/kk         meam/ms         meam/ms/kk      
meam/spline     meam/spline/omp meam/sw/spline  mesocnt         mesocnt/viscous 
mgpt            mie/cut         mie/cut/gpu     mliap           mliap/kk        
mm3/switch3/coulgauss/long      momb            morse           morse/gpu       
morse/kk        morse/omp       morse/opt       morse/smooth/linear             
morse/smooth/linear/omp         morse/soft      multi/lucy      multi/lucy/rx   
multi/lucy/rx/kk                nb3b/harmonic   nb3b/screened   nm/cut          
nm/cut/coul/cut nm/cut/coul/cut/omp             nm/cut/coul/long                
nm/cut/coul/long/omp            nm/cut/omp      nm/cut/split    oxdna2/coaxstk  
oxdna2/dh       oxdna2/excv     oxdna/coaxstk   oxrna2/coaxstk  oxdna/excv      
oxdna/hbond     oxdna2/hbond    oxdna/stk       oxdna2/stk      oxdna/xstk      
oxdna2/xstk     oxrna2/dh       oxrna2/excv     oxrna2/hbond    oxrna2/stk      
oxrna2/xstk     pace            pace/extrapolation              
pace/extrapolation/kk           pace/kk         pedone          pedone/omp      
peri/eps        peri/lps        peri/lps/omp    peri/pmb        peri/pmb/omp    
peri/ves        pod             pod/kk          polymorphic     python          
quip            rann            reaxff          reaxff/kk       reaxff/omp      
rebo            rebo/omp        rebomos         rebomos/omp     resquared       
resquared/gpu   resquared/omp   rheo            rheo/solid      saip/metal      
saip/metal/opt  sdpd/taitwater/isothermal       smatb           smatb/single    
smd/hertz       smd/tlsph       smd/tri_surface smd/ulsph       smtbq           
snap            snap/kk         soft            soft/gpu        soft/kk         
soft/omp        sph/heatconduction              sph/heatconduction/gpu          
sph/idealgas    sph/lj          sph/lj/gpu      sph/rhosum      sph/taitwater   
sph/taitwater/gpu               sph/taitwater/morris            spin/dipole/cut 
spin/dipole/long                spin/dmi        spin/exchange   
spin/exchange/biquadratic       spin/magelec    spin/neel       srp             
srp/react       sw              sw/angle/table  sw/gpu          sw/kk           
sw/mod          sw/mod/omp      sw/omp          table           table/gpu       
table/kk        table/omp       table/rx        table/rx/kk     tdpd            
tersoff         tersoff/gpu     tersoff/kk      tersoff/mod     tersoff/mod/c   
tersoff/mod/c/omp               tersoff/mod/gpu tersoff/mod/kk  tersoff/mod/omp 
tersoff/omp     tersoff/table   tersoff/table/omp               tersoff/zbl     
tersoff/zbl/gpu tersoff/zbl/kk  tersoff/zbl/omp thole           threebody/table 
tip4p/cut       tip4p/cut/omp   tip4p/long      tip4p/long/omp  tip4p/long/soft 
tip4p/long/soft/omp             tracker         tri/lj          uf3             
uf3/kk          ufm             ufm/gpu         ufm/omp         ufm/opt         
vashishta       vashishta/gpu   vashishta/kk    vashishta/omp   vashishta/table 
vashishta/table/omp             wf/cut          ylz             yukawa          
yukawa/colloid  yukawa/colloid/gpu              yukawa/colloid/kk               
yukawa/colloid/omp              yukawa/gpu      yukawa/kk       yukawa/omp      
zbl             zbl/gpu         zbl/kk          zbl/omp         zero            

* Bond styles:

bpm/rotational  bpm/spring      bpm/spring/plastic              class2          
class2/kk       class2/omp      fene            fene/expand     fene/expand/omp 
fene/kk         fene/nm         fene/omp        gaussian        gromos          
gromos/omp      harmonic        harmonic/kk     harmonic/omp    
harmonic/restrain               harmonic/shift  harmonic/shift/cut              
harmonic/shift/cut/omp          harmonic/shift/omp              hybrid          
hybrid/kk       lepton          lepton/omp      mesocnt         mm3             
morse           morse/omp       nonlinear       nonlinear/omp   oxdna2/fene     
oxdna/fene      oxrna2/fene     quartic         quartic/omp     rheo/shell      
special         table           table/omp       zero            

* Angle styles:

amoeba          charmm          charmm/kk       charmm/omp      class2          
class2/kk       class2/omp      class2/p6       cosine          cosine/buck6d   
cosine/delta    cosine/delta/omp                cosine/kk       cosine/omp      
cosine/periodic cosine/periodic/omp             cosine/shift    cosine/shift/exp                
cosine/shift/exp/omp            cosine/shift/omp                cosine/squared  
cosine/squared/omp              cosine/squared/restricted       
cosine/squared/restricted/omp   cross           dipole          dipole/omp      
fourier         fourier/omp     fourier/simple  fourier/simple/omp              
gaussian        harmonic        harmonic/kk     harmonic/omp    hybrid          
hybrid/kk       lepton          lepton/omp      mesocnt         mm3             
mwlc            quartic         quartic/omp     spica           sdk             
spica/kk        sdk/kk          spica/omp       sdk/omp         table           
table/omp       zero            

charmm          charmm/kk       charmm/omp      charmmfsw       charmmfsw/kk    
class2          class2/kk       class2/omp      cosine/shift/exp                
cosine/shift/exp/omp            cosine/squared/restricted       fourier         
fourier/omp     harmonic        harmonic/kk     harmonic/omp    helix           
helix/omp       hybrid          hybrid/kk       lepton          lepton/omp      
multi/harmonic  multi/harmonic/kk               multi/harmonic/omp              
nharmonic       nharmonic/omp   opls            opls/kk         opls/omp        
quadratic       quadratic/omp   spherical       table           table/cut       
table/omp       zero            

* Improper styles:

amoeba          class2          class2/kk       class2/omp      cossq           
cossq/omp       cvff            cvff/omp        distance        distharm        
fourier         fourier/omp     harmonic        harmonic/kk     harmonic/omp    
hybrid          hybrid/kk       inversion/harmonic              ring            
ring/omp        sqdistharm      umbrella        umbrella/omp    zero            

* KSpace styles:

ewald           ewald/dipole    ewald/dipole/spin               ewald/disp      
ewald/disp/dipole               ewald/electrode ewald/omp       msm             
msm/cg          msm/cg/omp      msm/dielectric  msm/omp         pppm            
pppm/cg         pppm/cg/omp     pppm/dielectric pppm/dipole     pppm/dipole/spin                
pppm/disp       pppm/disp/dielectric            pppm/disp/omp   pppm/disp/tip4p 
pppm/disp/tip4p/omp             pppm/electrode  pppm/gpu        pppm/kk         
pppm/omp        pppm/stagger    pppm/tip4p      pppm/tip4p/omp  

* Fix styles

accelerate/cos  acks2/reax      acks2/reaxff    acks2/reaxff/kk acks2/reax/kk   
adapt           adapt/fep       add/heat        addforce        addtorque       
alchemy         amoeba/bitorsion                amoeba/pitorsion                
append/atoms    atom/swap       ave/atom        ave/chunk       ave/correlate   
ave/correlate/long              ave/grid        ave/histo       ave/histo/weight                
ave/moments     ave/time        aveforce        balance         bocs            
bond/break      bond/create     bond/create/angle               bond/react      
bond/swap       box/relax       brownian        brownian/asphere                
brownian/sphere charge/regulation               cmap            cmap/kk         
colvars         colvars/kk      controller      damping/cundall deform          
deform/kk       deform/pressure deposit         ave/spatial     
ave/spatial/sphere              lb/pc           lb/rigid/pc/sphere              
reax/c/bonds    reax/c/species  dpd/energy      dpd/energy/kk   drag            
drude           drude/transform/direct          drude/transform/inverse     
dt/reset        dt/reset/kk     edpd/source     efield          efield/kk       
efield/lepton   efield/tip4p    ehex            electrode/conp  electrode/conq  
electrode/thermo                electron/stopping               
electron/stopping/fit           enforce2d       enforce2d/kk    eos/cv          
eos/table       eos/table/rx    eos/table/rx/kk evaporate       external        
ffl             filter/corotate flow/gauss      freeze          freeze/kk       
gcmc            gjf             gld             gle             gravity         
gravity/kk      gravity/omp     grem            halt            heat            
heat/flow       hyper/global    hyper/local     imd             indent          
ipi             langevin        langevin/drude  langevin/eff    langevin/kk     
langevin/spin   lb/fluid        lb/momentum     lb/viscous      lineforce       
manifoldforce   mdi/qm          mdi/qmmm        meso/move       mol/swap        
momentum        momentum/chunk  momentum/kk     move            msst            
mvv/dpd         mvv/edpd        mvv/tdpd        neb             neb/spin        
neighbor/swap   nonaffine/displacement          nph             nph/asphere     
nph/asphere/omp nph/body        nph/eff         nph/kk          nph/omp         
nph/sphere      nph/sphere/omp  nphug           npt             npt/asphere     
npt/asphere/omp npt/body        npt/cauchy      npt/eff         npt/gpu         
npt/kk          npt/omp         npt/sphere      npt/sphere/omp  npt/uef         
numdiff         numdiff/virial  nve             nve/asphere     nve/asphere/gpu 
nve/asphere/noforce             nve/awpmd       nve/body        nve/bpm/sphere  
nve/dot         nve/dotc/langevin               nve/eff         nve/gpu         
nve/kk          nve/limit       nve/limit/kk    nve/line        
nve/manifold/rattle             nve/noforce     nve/omp         nve/sphere      
nve/sphere/kk   nve/sphere/omp  nve/spin        nve/tri         nvk             
nvt             nvt/asphere     nvt/asphere/omp nvt/body        nvt/eff         
nvt/gpu         nvt/kk          nvt/manifold/rattle             nvt/omp         
nvt/sllod       nvt/sllod/eff   nvt/sllod/kk    nvt/sllod/omp   nvt/sphere      
nvt/sphere/omp  nvt/uef         oneway          orient/bcc      orient/eco      
orient/fcc      pafi            pair            phonon          pimd/langevin   
pimd/langevin/bosonic           pimd            pimd/nvt        pimd/nvt/bosonic                
planeforce      plumed          poems           polarize/bem/gmres              
polarize/bem/icc                polarize/functional             pour            
precession/spin press/berendsen press/langevin  print           propel/self     
property/atom   property/atom/kk                python/invoke   python          
python/move     qbmsst          qeq/comb        qeq/comb/omp    qeq/ctip        
qeq/dynamic     qeq/fire        qeq/point       qeq/reaxff      qeq/reax        
qeq/reaxff/kk   qeq/reax/kk     qeq/reaxff/omp  qeq/reax/omp    qeq/rel/reaxff  
qeq/shielded    qeq/slater      qtb             qtpie/reaxff    rattle          
reaxff/bonds    reaxff/bonds/kk reaxff/species  reaxff/species/kk               
recenter        recenter/kk     restrain        rheo            rheo/oxidation  
rheo/pressure   rheo/thermal    rheo/viscosity  rhok            rigid           
rigid/meso      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 rx              rx/kk           saed/vtk        setforce        
setforce/kk     setforce/spin   sgcmc           shake           shake/kk        
shardlow        shardlow/kk     smd             smd/adjust_dt   
smd/integrate_tlsph             smd/integrate_ulsph             
smd/move_tri_surf               smd/setvel      smd/wall_surface                
sph             sph/stationary  spring          spring/chunk    spring/rg       
spring/self     spring/self/kk  srd             store/force     store/state     
tdpd/source     temp/berendsen  temp/berendsen/kk               temp/csld       
temp/csvr       temp/rescale    temp/rescale/eff                temp/rescale/kk 
tfmc            tgnpt/drude     tgnvt/drude     thermal/conductivity            
ti/spring       tmd             ttm             ttm/grid        ttm/mod         
tune/kspace     vector          viscosity       viscous         viscous/kk      
viscous/sphere  wall/body/polygon               wall/body/polyhedron            
wall/colloid    wall/ees        wall/flow       wall/flow/kk    wall/gran       
wall/gran/kk    wall/gran/region                wall/harmonic   wall/lepton     
wall/lj1043     wall/lj126      wall/lj93       wall/lj93/kk    wall/morse      
wall/piston     wall/reflect    wall/reflect/kk wall/reflect/stochastic         
wall/region     wall/region/ees wall/region/kk  wall/srd        wall/table      
widom           

* Compute styles:

ackland/atom    adf             aggregate/atom  angle           angle/local     
angmom/chunk    ave/sphere/atom ave/sphere/atom/kk              basal/atom      
body/local      bond            bond/local      born/matrix     centro/atom     
centroid/stress/atom            chunk/atom      chunk/spread/atom               
cluster/atom    cna/atom        cnp/atom        com             com/chunk       
composition/atom                composition/atom/kk             contact/atom    
coord/atom      coord/atom/kk   count/type      damage/atom     mesont          
dihedral        dihedral/local  dilatation/atom dipole          dipole/chunk    
dipole/tip4p    dipole/tip4p/chunk              displace/atom   dpd             
dpd/atom        edpd/temp/atom  efield/atom     efield/wolf/atom                
entropy/atom    erotate/asphere erotate/rigid   erotate/sphere  
erotate/sphere/atom             erotate/sphere/kk               event/displace  
fabric          fep             fep/ta          force/tally     fragment/atom   
gaussian/grid/local             gaussian/grid/local/kk          global/atom     
group/group     gyration        gyration/chunk  gyration/shape  
gyration/shape/chunk            heat/flux       heat/flux/tally 
heat/flux/virial/tally          hexorder/atom   hma             improper        
improper/local  inertia/chunk   ke              ke/atom         ke/atom/eff     
ke/eff          ke/rigid        mliap           momentum        msd             
msd/chunk       msd/nongauss    nbond/atom      omega/chunk     orientorder/atom                
orientorder/atom/kk             pace            pair            pair/local      
pe              pe/atom         pe/mol/tally    pe/tally        plasticity/atom 
pod/atom        pod/global      pod/local       podd/atom       pressure        
pressure/alchemy                pressure/uef    property/atom   property/chunk  
property/grid   property/local  ptm/atom        rattlers/atom   rdf
rheo/property/atom              rigid/local     saed            slcsa/atom      
slice           smd/contact/radius              smd/damage      
smd/hourglass/error             smd/internal/energy             
smd/plastic/strain              smd/plastic/strain/rate         smd/rho         
smd/tlsph/defgrad               smd/tlsph/dt    smd/tlsph/num/neighs            
smd/tlsph/shape smd/tlsph/strain                smd/tlsph/strain/rate           
smd/tlsph/stress                smd/triangle/vertices           smd/ulsph/effm  
smd/ulsph/num/neighs            smd/ulsph/strain                
smd/ulsph/strain/rate           smd/ulsph/stress                smd/vol         
sna/atom        sna/grid        sna/grid/kk     sna/grid/local  
sna/grid/local/kk               snad/atom       snap            snav/atom       
sph/e/atom      sph/rho/atom    sph/t/atom      spin            stress/atom     
stress/cartesian                stress/cylinder pressure/cylinder               
stress/mop      stress/mop/profile              stress/spherical                
stress/tally    tdpd/cc/atom    temp            temp/asphere    temp/body       
temp/chunk      temp/com        temp/cs         temp/deform     temp/deform/eff 
temp/deform/kk  temp/drude      temp/eff        temp/kk         temp/partial    
temp/profile    temp/ramp       temp/region     temp/region/eff temp/rotate     
temp/sphere     temp/uef        ti              torque/chunk    vacf            
vacf/chunk      vcm/chunk       viscosity/cos   voronoi/atom    xrd             

* Region styles:

block           block/kk        cone            cylinder        ellipsoid       
intersect       plane           prism           sphere          sphere/kk       
union           

* Dump styles:

atom            atom/gz         atom/zstd       cfg             cfg/gz          
cfg/uef         cfg/zstd        custom          custom/gz       custom/zstd     
dcd             atom/mpiio      cfg/mpiio       custom/mpiio    xyz/mpiio       
extxyz          grid            grid/vtk        h5md            image           
local           local/gz        local/zstd      molfile         movie           
netcdf          netcdf/mpiio    xtc             xyz             xyz/gz          
xyz/zstd        yaml            

* Command styles

angle_write     balance         change_box      create_atoms    create_bonds    
create_box      delete_atoms    delete_bonds    box             kim_init        
kim_interactions                kim_param       kim_property    kim_query       
reset_ids       reset_atom_ids  reset_mol_ids   message         server          
dihedral_write  displace_atoms  dynamical_matrix                
dynamical_matrix/kk             fitpod          geturl          group2ndx   
hyper           info            kim             mdi             minimize        
ndx2group       neb             neb/spin        plugin          prd             
read_data       read_dump       read_restart    region2vmd      replicate       
rerun           run             set             tad             temper          
temper/grem     temper/npt      third_order     third_order/kk  velocity        
write_coeff     write_data      write_dump      write_restart   

When you use -sf kk then you should remove all /kk suffixes in the input.

Correct, I need to update the documentation to say that -sf kk is preferred and to discourage adding /kk suffixes directly in the input, in general.

1 Like

Thanks for your answers. Now the calculation works for me, but I still see a couple of warnings:

Setting up cg/kk style minimization ...
Unit style : metal
Current step : 0
WARNING: Fix MINIMIZE/kk not compatible with sending data in Kokkos communication (src/KOKKOS/comm_kokkos.cpp:766)
WARNING: Fix with atom-based arrays not compatible with sending data in Kokkos communication, switching to classic exchange/border communication (src/KOKKOS/comm_kokkos.cpp:779)
WARNING: Fix MINIMIZE/kk not compatible with Kokkos sorting on device (src/KOKKOS/atom_kokkos.cpp:212)
WARNING: Fix with atom-based arrays not compatible with Kokkos sorting on device, switching to classic host sorting (src/KOKKOS/atom_kokkos.cpp:218)

part of input file:

min_style cg
minimize 1.0e-4 1.0e-6 1000 10000
run 0
delete_atoms group removed_atoms

Run parameters:

./lmp -k on g 1 -sf kk -pk kokkos neigh half -in input_file.lmp

Can I do anything about these warnings?

That part is not relevant. Why not quote the whole input?

These warnings happens when you use features in a Kokkos enabled run that have not been ported to the KOKKOS package. In KOKKOS styles, the data is kept on the GPU as much as possible and transferred to host only when needed (e.g. for output). But if you use functionality, that is not in KOKKOS, LAMMPS has to transfer all data from the GPU to the host and then back.This can cause significant slowdown depending on the specific details.

The minimize part of scripts is often just a smaller part of the total calculation, so you can probably live with it.

Yes the warnings are related to performance, not correctness, so they can safely be ignored.