[lammps-users] Seg-fault problem

Dear LAMMPS users,

I am running a test model on a local HPC machine but I receive a Seg-fault error. Below, I give a brief description of the model:

I am working on developing a mesoscopic hybrid model to simulate the reaction on the surface of a catalyst material. When the reaction occurs, particle A converts to particle B (by changing the particle type and its group) generating a (Leonard-Jones) repulsive force with the catalyst surface. Apparently, it is not possible to dynamically change particle types in LAMMPS for the packages that I use, so I developed a pseudo-dynamic method by running the code over a loop where I can change the particle type between successive runs. In this case and for the sake of simplicity, the reaction occurs when the concentration of a diffusion problem reaches a certain threshold. The model works fine for a few loops observing the changes in particle type but it gives a Segmentation fault error. Below, you can find the backtrace of the error generated at the end of the Slurm output data:

[bear-pg0210u19b:1918400:0:1918400] Caught signal 11 (Segmentation fault: address not mapped to object at address 0x201fcbd8c)

==== backtrace (tid:1918400) ====
0 0x0000000000012b30 .annobin_sigaction.c() sigaction.c:0
1 0x0000000000c1a78a LAMMPS_NS::NBinStandard::bin_atoms() ???:0
2 0x0000000000c1e5e8 LAMMPS_NS::Neighbor::build() ???:0
3 0x0000000000d2315b LAMMPS_NS::Verlet::run() ???:0
4 0x0000000000ce3340 LAMMPS_NS::Run::command() ???:0
5 0x0000000000b9a66b LAMMPS_NS::Input::command_creator<LAMMPS_NS::Run>() ???:0
6 0x0000000000b98b35 LAMMPS_NS::Input::execute_command() ???:0
7 0x0000000000b99095 LAMMPS_NS::Input::file() ???:0
8 0x0000000000400e58 main() ???:0
9 0x0000000000023803 __libc_start_main() ???:0
10 0x0000000000400ebe _start() ???:0

I have attached the slurm file and the input file for your reference, but the initial data file is relatively large so I didn’t attach it here. Would you please guide me through this issue?

P1: The error does not occur between the loops when the code is called, it occurs during the runtime.

P2: The moment that the error occurs changes by changing some of the simulation parameters e.g. the diffusion coefficient, L-J coefficient, and L-J cut-off distance.

P3: I have doubled the allocated memory per cpu core to check whether this has anything to do with the model but I observed no change in the results.

Regards,

Amin

model with seg-fault.lmp (2.85 KB)

slurm-file.out (23.5 KB)

Dear LAMMPS users,

I am running a test model on a local HPC machine but I receive a Seg-fault error. Below, I give a brief description of the model:

this description is pretty much useless. nothing is relevant to the issue.

I am working on developing a mesoscopic hybrid model to simulate the reaction on the surface of a catalyst material. When the reaction occurs, particle A converts to particle B (by changing the particle type and its group) generating a (Leonard-Jones) repulsive force with the catalyst surface. Apparently, it is not possible to dynamically change particle types in LAMMPS for the packages that I use, so I developed a pseudo-dynamic method by running the code over a loop where I can change the particle type between successive runs. In this case and for the sake of simplicity, the reaction occurs when the concentration of a diffusion problem reaches a certain threshold. The model works fine for a few loops observing the changes in particle type but it gives a Segmentation fault error. Below, you can find the backtrace of the error generated at the end of the Slurm output data:

your input is too complex and convoluted to make any sense of it from a simple look.
it also has some settings that don’t make sense like the choice of atom style.

in your output there are warnings that need to be taken very seriously. they are not hard errors since there are few cases where the corresponding combination of settings is valid, but your case is obviously not one of them.

WARNING: More than one fix rigid (src/RIGID/fix_rigid.cpp:715)
WARNING: More than one fix rigid (src/RIGID/fix_rigid.cpp:715)
WARNING: One or more atoms are time integrated more than once (src/modify.cpp:289)

without debug info in the executable the stack trace is mostly useless.

[…]

I have attached the slurm file and the input file for your reference, but the initial data file is relatively large so I didn’t attach it here. Would you please guide me through this issue?

if you want help you have to do two things:

  1. build a data file with as few atoms as possible that can reproduce the segmentation fault
  2. create an input that produces no warnings and has all commands that are not needed to reproduce the segfault removed (including variable commands for parameters!) and runs shortened to the minimum so that the segfault will be reproduced as quickly as possible with as few resources needed as possible.

and post the resulting files to the list.
i strongly suggest to resolve the issues causing the warnings first, as you simulation will otherwise be producing bogus results anyway.
I also suggest to first run a test with the latest patch release version of LAMMPS to see if you are not subject to a problem that has since been resolved.

Axel.