Problems with ADIOS dump style

This problem is not related to #45328, because it happens on other machine

In my in.file I write

dump ADIOSDUMP all atom/adios 1000 dump.pb

The log.lammps out

dump ADIOSDUMP all atom/adios 1000 dump.pb
fix extra all print 1000 "${str},${tm}" file temperature.log screen no

fix NVEFIX all nve

run 100000
Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
Per MPI rank memory allocation (min/avg/max) = 3.882 | 3.905 | 3.932 Mbytes
   Step          Temp          E_pair         E_mol          TotEng         Press     
         1   0.75           0              0              1.1249989      0.017310929  
     10000   0.8607381     -0.16610778     0              1.1249981      0.017763544  
     20000   0.87661253    -0.18991941     0              1.1249981      0.017943719  
     30000   0.88269194    -0.1990385      0              1.1249981      0.017942047  
     40000   0.88435167    -0.20152811     0              1.1249981      0.0179933    
     50000   0.88575       -0.2036257      0              1.124998       0.017979413  
     60000   0.88605093    -0.20407703     0              1.124998       0.017980362  
     70000   0.88624206    -0.2043638      0              1.124998       0.017974951  
     80000   0.886276      -0.20441486     0              1.1249978      0.017998695  
     90000   0.88605867    -0.20408897     0              1.1249977      0.018039604  
    100000   0.88632049    -0.20448177     0              1.1249976      0.018025306  
    100001   0.88631973    -0.20448063     0              1.1249976      0.018025409  
Loop time of 84.0754 on 128 procs for 100000 steps with 1000188 atoms

Performance: 513824.597 tau/day, 1189.409 timesteps/s
97.9% CPU use with 128 MPI tasks x 1 OpenMP threads

MPI task timing breakdown:
Section |  min time  |  avg time  |  max time  |%varavg| %total
---------------------------------------------------------------
Pair    | 20.529     | 21.338     | 25.308     |   9.6 | 25.38
Neigh   | 8.6221     | 8.8277     | 9.1821     |   2.9 | 10.50
Comm    | 28.764     | 31.257     | 33.564     |  14.8 | 37.18
Output  | 5.8702     | 5.8867     | 5.9245     |   0.4 |  7.00
Modify  | 6.8585     | 7.0174     | 9.8193     |  10.3 |  8.35
Other   |            | 9.748      |            |       | 11.59

Nlocal:        7813.97 ave        8072 max        7557 min
Histogram: 2 5 14 22 24 23 10 17 10 1
Nghost:        2158.59 ave        2286 max        2049 min
Histogram: 8 6 11 24 33 14 11 13 4 4
Neighs:        9464.66 ave       10185 max        8797 min
Histogram: 3 7 11 26 20 26 17 11 6 1

Total # of neighbors = 1211477
Ave neighs/atom = 1.2112493
Neighbor list builds = 3498
Dangerous builds = 0

And then it happens on the screen

terminate called after throwing an instance of 'std::invalid_argument'
  what():  [Mon Nov  7 04:00:13 2022] [ADIOS2 EXCEPTION] <Core> <ADIOS> <DeclareIO> : IO atom declared twice

My ADIOS2 build configuration
Pastebin
LAMMPS build configuration (LAMMPS (23 Jun 2022 - Update 2))
Pastebin

OS - SUSE Linux Enterprise Server 12 SP3
Platform - Linux head-epyc 4.4.73-5-default #1 SMP Tue Jul 4 15:33:39 UTC 2017 (b7ce4e4) x86_64
Cmake version 3.18.0

I have never seen this error and it appears to come from within ADIOS.
Unfortunately, there is not enough information here to reproduce it exactly as you see it.
Please modify one of the existing input files (e.g. bench/in.lj or bench/in.rhodo or bench/in.eam) so that it causes the same error and post it here.

Modified bench/in.lj reproduces the error

variable	x index 1
variable	y index 1
variable	z index 1

variable	xx equal 20*$x
variable	yy equal 20*$y
variable	zz equal 20*$z

units		lj
atom_style	atomic

lattice		fcc 0.8442
region		box block 0 ${xx} 0 ${yy} 0 ${zz}
create_box	1 box
create_atoms	1 box
mass		1 1.0

velocity	all create 1.44 87287 loop geom

pair_style	lj/cut 2.5
pair_coeff	1 1 1.0 1.0 2.5

neighbor	0.3 bin
neigh_modify	delay 0 every 20 check no

minimize 0.0 10e-8 10000 1000000

fix		1 all nve

run		10000

dump ADIOSDUMP all atom/adios 1 dump.bp

run 10000

fix NVTFIX all nvt temp 0.69 0.69 $(1000.0*dt)

run 10000

Thanks for the input. The problem is that the adios dump styles as implemented in LAMMPS cannot be used over multiple run commands. You need to use undump, and dump.

This can probably be corrected in the source code, but that will take some time and testing effort.

P.S.: you input has a serious mistake. you must not add a second integrator (fix nvt) without deleting the first (fix nve). Please note the corresponding warning about atoms being time integrated more than once.

you input has a serious mistake. you must not add a second integrator (fix nvt) without deleting the first (fix nve)

Yes, it’s a mistake, it is just for reproduce the error

You need to use undump, and dump

I.e. I must use several dump files if I use run command several times?

The documentation about the ADIOS dump styles say nothing about appending to an existing dump, so I would assume it is not supported and you would have to use different file/folder names and merge them after the fact.

If you feel adventurous, you can instead apply the changes from commit add support for building/using the ADIOS package without MPI · lammps/lammps@09e490d · GitHub and commit initialize ADIOS dumps only the first time when used in multiple runs · lammps/lammps@dc4301d · GitHub
and see if that works for you. This is currently not fully tested and is waiting for approval of the author of the ADIOS package.

1 Like

I would try, only I don’t understand how to get myself these commits. The LAMMPS repository does not have these commits (as git tells me), but Github itself says that these commits do not belong to any of the branches.

You should be able to just “git pull” the commit URLs into a local feature branch.

You can also download the patch files and apply them manually with “patch”.

They are currently in a branch in my personal fork of the LAMMPS repo. I don’t want to post the branch URL here, because it keep re-using that branch name for collections of minor changes instead of creating a branch and pull request of each of them, so anybody that comes across this discussion later would be taken to the wrong or a non-existing branch.
Once I have submitted that branch as a pull request, it will have a unique URL, but that has not happened yet (there are not enough accumulated changes yet).

Both methods seem to work - multiple runs and without MPI
Thank you!