Fix saed/vtk in diffraction example not working

Hello everyone,

I’m looking for some assistance with an issue I encountered. I compiled the latest version of LAMMPS (29 Aug 2024) using cmake with the following command:

cmake -D PKG_KSPACE=yes -D PKG_DIFFRACTION=yes -D PKG_VTK=yes …/cmake

After compiling, I navigated to examples/PACKAGES/diffraction/ and attempted to run in.BulkNi. However, I encountered this error:

ERROR: Must set ‘extvector’ or ‘extlist’ when setting ‘vector_flag’ for fix saed/vtk. Contact the developer. (src/fix.cpp:138)
Last command: run 0

Has anyone come across a similar error or know how to resolve it?

This has been fixed in the 29 Aug 2024 update 1 bugfix release (and the LAMMPS develop branch which is about to be released as a new feature release very soon).

Thank you kindly.

I am also facing this issue and seeing the following error message when running my code:

Must set ‘extvector’ or ‘extlist’ when setting ‘vector_flag’ for fix vector.

I compiled using cmake and tried building both lammps 2024 stable release and feature release (separately) from the download page and both are giving the same error message. Which version should I download and build?

Hi @sabyasachi_chatterje. I downloaded and build 29 Aug 2024 update 1 bugfix release from GitHub. It worked properly.

1 Like

Please provide the exact version numbers. Best by posting the output from “lmp -h | head -100”.

For a feature release you need the 19 Nov 2024 release or later. The bugfix for this issue was applied on September 2nd 2024.

@akohlmey I used the tarfile from Download LAMMPS (Stable release 29 Aug 2024) and also tried the tarfile in Release Update 1 for Stable release 29 August 2024 · lammps/lammps · GitHub. Both give the error mentioned above.

The output from lmp -h | head -100 for the update 1 version is below.


Large-scale Atomic/Molecular Massively Parallel Simulator - 29 Aug 2024 - Update 1

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

List of command line options supported by this LAMMPS executable:

-echo none/screen/log/both : echoing of input script (-e)
-help : print this help message (-h)
-in none/filename : read input from file or stdin (default) (-i)
-kokkos on/off … : turn KOKKOS mode on or off (-k)
-log none/filename : where to send log output (-l)
-mdi ‘’ : pass flags to the MolSSI Driver Interface
-mpicolor color : which exe in a multi-exe mpirun cmd (-m)
-cite : select citation reminder style (-c)
-nocite : disable citation reminder (-nc)
-nonbuf : disable screen/logfile buffering (-nb)
-package style … : invoke package command (-pk)
-partition size1 size2 … : assign partition sizes (-p)
-plog basename : basename for partition logs (-pl)
-pscreen basename : basename for partition screens (-ps)
-restart2data rfile dfile … : convert restart to data file (-r2data)
-restart2dump rfile dgroup dstyle dfile …
: convert restart to dump file (-r2dump)
-restart2info rfile : print info about restart rfile (-r2info)
-reorder topology-specs : processor reordering (-r)
-screen none/filename : where to send screen output (-sc)
-skiprun : skip loops in run and minimize (-sr)
-suffix gpu/intel/kk/opt/omp: style suffix to apply (-sf)
-var varname value : set index style variable (-v)

OS: Linux “Ubuntu 22.04.5 LTS” 6.8.0-51-generic x86_64

Compiler: GNU C++ 11.4.0 with OpenMP 4.5
C++ standard: C++11
MPI v1.0: LAMMPS MPI STUBS for LAMMPS version 29 Aug 2024

Accelerator configuration:

FFT information:

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

Active compile time flags:

-DLAMMPS_GZIP
-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:

MANYBODY

List of individual style options included in this LAMMPS executable

  • Atom styles:

atomic body charge ellipsoid hybrid
line sphere tri

  • Integrate styles:

respa verlet

  • Minimize styles:

cg fire/old fire hftn quickmin
sd

  • Pair styles:

adp airebo airebo/morse atm bop
born buck buck/coul/cut comb comb3
coul/cut coul/debye coul/dsf coul/wolf meam/c
reax reax/c mesont/tpm eam eam/alloy
eam/cd eam/cd/old eam/fs eam/he edip
edip/multi eim extep gw gw/zbl
hybrid hybrid/omp hybrid/molecular
hybrid/molecular/omp hybrid/overlay hybrid/overlay/omp
hybrid/scaled hybrid/scaled/omp lcbop lj/cut
lj/cut/coul/cut lj/expand local/density meam/spline meam/sw/spline
morse nb3b/harmonic nb3b/screened polymorphic rebo
rebomos soft sw sw/angle/table sw/mod
table tersoff tersoff/mod tersoff/mod/c tersoff/table
tersoff/zbl threebody/table vashishta vashishta/table yukawa


That cannot be. You must have made a mistake somewhere. If I use the LAMMPS binary from https://github.com/lammps/lammps/releases/download/stable_29Aug2024/lammps-linux-x86_64-29Aug2024.tar.gz I do get the ‘vector_flag’ error, but with the binary from https://github.com/lammps/lammps/releases/download/stable_29Aug2024_update1/lammps-linux-x86_64-29Aug2024_update1.tar.gz this is not the case and - for example - the input in examples/PACKAGES/diffraction can run without that error.

Thanks for the clarification. Yes, the update 1 binary works for the diffraction example. I am using it to simulate uniaxial tension on a 1D metallic lattice chain. But it still gives the same error.

ERROR: Must set ‘extvector’ or ‘extlist’ when setting ‘vector_flag’ for fix vector. Contact the developer. (src/fix.cpp:138)
Last command: run ${nmax_steps}

I prepared a minimum working example which is pasted below.


units metal
dimension 3
boundary p p p
atom_style atomic
variable latparam equal 4.05

lattice fcc ${latparam}

region chain block 0 10 0 1 0 1
create_box 1 chain
lattice fcc ${latparam} orient x 1 0 0 orient y 0 1 0 orient z 0 0 1
create_atoms 1 region chain

pair_style eam/alloy
pair_coeff * * Al99.eam.alloy Al

#equilibration

reset_timestep 0

velocity all create 300 12345 mom yes rot no

fix 1 all nve

thermo 50000
thermo_style custom step lx ly lz pxx pe ke temp

run 20000
unfix 1
#equilibration done

variable inst_pe equal c_1

variable srate_avg equal 1.0e8 # Unit = per_sec
variable srate1_avg equal “v_srate_avg / 1.0e12”

compute 1 all pe

fix 1 all nve
fix 2 all deform 1 x erate ${srate1_avg} y volume z volume units box remap x

fix 3 all ave/time 1 1 1 v_inst_pe ave running

fix 4 all vector 1 f_3

variable nmax_steps equal 1.5*1.0e5

run ${nmax_steps}

This is not the same error, but a different error since it is for a different fix style: fix vector instead of fix saed/vtk. Please use your skills as a scientist and observe carefully!!

This bug was fixed as well, but but later than the one for fix saed/vtk and thus it is not yet released for the stable version. An update2 release is in preparation, but not yet complete.

You can, however, download the 4 Feb 2025 feature release and that should have the issue fixed.

… or you can download a snapshot of the “maintenance” branch, which is the precursor to the next stable update release. https://github.com/lammps/lammps/archive/refs/heads/maintenance.tar.gz

Or apply this bugfix to your source: fix incorrect extvector setting bug for using fix vector with fixes · lammps/lammps@014b304 · GitHub

I tried the 4th Feb 2025 feature release and it does not show the error anymore. Thank you.