Lammps Dump sorting id issues

Hi all,
I am running the simulation in lammps where during the initial first minimization the lammps dump the atom id properly in the trajectory but during the production run the atom ids are not sorted correctly. I tried running it in my system and the dumping happens correctly but when I run it in the cluster the ids are not getting sorted correctly only during the production run. Could anyone help me with this issue?

the lammps input script that i used

variable temperature equal 150
variable randomSeed equal 15973
##   Lammps Input File Creating data file for multi chain condensate 

#----------------- Box and units  (use real units and periodic boundaries)----------------
  
variable        input string input
units          	real
atom_style     	full
dimension      	3
boundary       	p p f

#---------- Pair interactions require lists of neighbours to be calculated -------------

neighbor        3.5    multi
neigh_modify    every 10 delay 0 check no

#-------------- READ "start" data file ------------------------------------------------

read_data       data_Multi.${input}
include         forcefield.${input}

#---------- Output thermodynamic info(temperature, energy, pressure, etc.) ------------

thermo_style    custom step temp pe ke etotal lx ly lz pxx pyy pzz
thermo          100

#--------------- Dump configurations at regular intervals -----------------------------

dump            2 all custom 100 input1.lammpstrj id mol type q x y z     ## wrap coordinate
dump_modify     2 sort id

timestep  	10
fix 		botwall all wall/lj93 zlo -130.0 1.0 6.0 10.0 # lz epsilon sigma cutoff
fix 		topwall all wall/lj93 zhi 130.0 1.0 6.0 10.0
fix             cg_npt all npt temp 100.0 100.0 100.0 x 1.0 1.0 1000.0 y 1.0 1.0 1000.0 couple xy
run        	30000 

unfix 	botwall
unfix 	topwall
unfix 	cg_npt

change_box 	all z final -300 300 boundary p p p 

fix            fxnve   all nve
fix            fxlange all langevin 100 100 1000.0 548669595 
run 		10000


# Initital pair style and bond parameters
bond_style  harmonic

dielectric  80.0

# Set pair parameters
include         forcefield.input

reset_atom_ids
velocity        all create ${temperature} ${randomSeed}

special_bonds fene

# neighbour list settings
neighbor  3.5 multi

# Timestep and computational parameters
comm_style      tiled
timestep        10

# Relax sim by performing minimisation (this is helpful if we change the potential or sequence)
min_style       fire
timestep        0.0000001
minimize 0.0 1.0e-8 1000 100000
timestep        0.00001
minimize 0.0 1.0e-8 1000 100000
timestep        0.1
minimize 0.0 1.0e-8 1000 100000
timestep        10
minimize 0.0 1.0e-8 1000 100000


neigh_modify    every 10 delay 0

fix             fxnve   all nve
fix             fxlange all langevin ${temperature} ${temperature} 100000.0 ${randomSeed}
fix             fxbal  all balance 1000 1.1 rcb



variable binsize equal lz/200
compute dens all chunk/atom bin/1d z lower ${binsize}
fix 6 all ave/chunk 1000 1 1000 dens density/mass density/number file density.profile

fix fixCOM all recenter INIT INIT INIT  # this helps to prevent drift of the interfaces and makes it easier to average over many measurements

# Thermo output settings
thermo          100000
thermo_style    custom step pe ecoul ke temp press density
thermo_modify   flush yes

dump            3 all custom 200000 result.lammpstrj id mol type q x y z
dump_modify     3 sort id
dump            4 all custom 200000 result_nopbc.lammpstrj id mol type q xu yu zu
dump_modify     4 sort id
#dump         	 2 all molfile 1800 melt2.pdb pdb .:/usr/local/lib/vmd/plugins/LINUXAMD64/molfile
#dump_modify     2 unwrap yes 
# Equilibration
run             50000

# Run simulation
restart        10000000 restart
run             20000000


# write final configuration
write_data      final-structure.dat nocoeff

output example :

input1.lammpstrj
ITEM: ATOMS id mol type q x y z
1 1 11 0 562.467 73.907 97.042
2 1 3 -0.75 564.166 76.43 94.528
3 1 18 0 566.861 74.486 92.722
4 1 5 0 564.636 72.313 90.495
5 1 11 0 563.008 75.167 88.592
result.lammpstrj
ITEM: ATOMS id mol type q xu yu zu
1 89 18 0 -76.0925 -95.8928 -29.1919
2 89 18 0 -74.9051 -97.133 -38.0792
3 89 16 0 -63.4815 -84.9568 -35.4658
4 89 6 0 -73.9764 -99.3464 -22.3573
5 89 1 0 -73.8377 -96.2179 -26.2333
6 89 18 0 -75.1316 -101.996 -19.5842
7 100 4 -0.75 -6.34979 -120.171 -52.5064

Thank you

When reporting issues, always report which LAMMPS version you are using.

Both dump files are correctly sorted by atom ID, see the first column.
The difference between the two dump files is that you are using a reset_atom_ids command in between them. That will change everything and you cannot expect the two dump files have their atoms in the exact same order when sorted by atom ID, since you just updated/changed all atom IDs.

Thank you for helping out.