Dear all,
I'm getting a strange error when trying to extract the velocity
distribution of atoms in a confined liquid, using the enclosed input
file and LAMMPS (21 Jul 2010).
When using fix ave/histo I get a segmentation fault or the program
freezes, depending on the values I'm trying to histogram (for
instance: seg fault for vx vy vz, freezes for vx alone):
fix 5 liq ave/histo 1000 1 1000 -3.0 3.0 30 vx vy vz mode vector file histo.test
I'm probably doing something stupid, but I really can't see what.
Could someone give me a hint?
Best,
Laurent
in.test (699 Bytes)
Dear all,
I'm getting a strange error when trying to extract the velocity
distribution of atoms in a confined liquid, using the enclosed input
file and LAMMPS (21 Jul 2010).
When using fix ave/histo I get a segmentation fault or the program
freezes, depending on the values I'm trying to histogram (for
instance: seg fault for vx vy vz, freezes for vx alone):
fix 5 liq ave/histo 1000 1 1000 -3.0 3.0 30 vx vy vz mode vector file histo.test
I'm probably doing something stupid, but I really can't see what.
Could someone give me a hint?
Best,
Laurent
in.test (699 Bytes)
dear laurent,
after a brief debugging session with your input,
it is obvious that there are some serious issues
with argument parsing. a lot of the code doesn't
make much sense (to me) and it is not very easy
to read, too.
it looks that this mostly affects "normal" data
(position, velocity, forces) and not data from
fixes, variables, or computes.
i have tried to correct the issues that i have
identified, but it still doesn't work correctly.
i'll have another look later. this looks like a good
candidate for your regression test library.
is anybody else here using fix ave/history?
if yes, would you mind sending in (small) tests.
it would be helpful to make sure that any changes
to fix laurent's issues don't break working inputs.
thanks,
axel.
Laurent,
Thanks for pointing this out. I've made a couple of minor mods to fix_ave_histo.cpp that should fix the problems you're seeing here. Please try the attached and let me know if that doesn't work.
Paul
fix_ave_histo.cpp (30.6 KB)
Dear Paul,
Thank you, there is a clear improvement with your modified file, but:
* In serial, the program runs fine, the histo file is written, but I
still get an error when the job ends:
Dangerous builds = 1
*** glibc detected *** ../src/lmp_pc213: free(): invalid next size
(fast): 0x00000000009a4a50 ***
I enclosed the complete output (serial.out).
* When run in parallel, there is an error message at the very beginning:
*** glibc detected *** ../src/lmp_openmpi: malloc(): memory
corruption: 0x0000000002385430 ***
LAMMPS (21 Jul 2010)
and then the program freezes just before printing the thermo information.
Thank you for your help,
Laurent
in.test (700 Bytes)
serial.out (3.35 KB)
Dear Paul,
Thank you, there is a clear improvement with your modified file, but:
yeah. the argument parsing was pretty much messed up.
a file that works for your example is here.
http://git.icms.temple.edu/git/?p=lammps-icms.git;a=blob_plain;f=src/fix_ave_histo.h;hb=013b4c4c20964ec651fd60fadd109da486fbe58b
axel.
Thanks a lot, it works perfectly with this version of fix_ave_histo.cpp
Best,
Laurent
Posted Axel's upgraded file as a 2Aug10 patch.
Thanks,
Steve