ReaxFF simulations in 3 embedded loops

Dear LAMMPS users and developers, I am using reaxFF inside 3 loops but I am facing some issues which I think are not syntax-related because the input file is read without any error message. Here is my code:

variable ke file kevalues.txt
label loopke

    variable n file nvalues.txt
    label loopn

            variable m file mvalues.txt
            label loopm

                clear
                units real
                atom_style        full
                boundary f p p
                print "--------------------------------------"
                print "  KE= ${ke} ;  n= $n ; m= $m. "
                print "--------------------------------------"
                read_data data_files/eq_SYST_$n_$m_KE${ke}.dat
                pair_style	   reax/c NULL
                pair_coeff	* * ffield_IL.txt N C H B F
                fix  1 all qeq/reax 1 0.0 10.0 1e-6 reax/c
                fix EFIX all nve
                region myregion block INF 19 INF INF INF INF
                fix wall all wall/region myregion lj126 1.0 1.0 2.5
                compute Tliq all temp/com
                thermo_style custom step c_Tliq etotal
                thermo 100
                thermo_modify lost ignore
                thermo_modify lost/bond ignore
                timestep 0.5
                dump myDump all custom 100 dump_$n_$m_KE${ke}.prod id type x y z
                dump_modify myDump units yes
                log log_$n_$m_KE${ke}.lammps
                run 20000
                unfix EFIX
                undump myDump

            next m
            jump SELF loopm

    next n
    jump SELF loopn

next ke
jump SELF loopke

Here are my queries:

1- This code works perfectly fine over the three loops for many iterations until we reach certain combinations of (ke,n,m), then the job is terminated and this message shows:

Primary job terminated normally, but 1 process returned
a non-zero exit code. Per user-direction, the job has been aborted.
mpirun noticed that process rank 5 with PID 0 on node Rafids-MacBook exited on signal 11 (Segmentation fault: 11).

I do not see anything particular with these specific files corresponding to these specific combinations. Thus, what could be the problem ?

2- As you saw in my code, I allowed the lost of particules and bonds using “thermo_modify lost ignore” and “thermo_modify lost/bond ignore”. However, this wasn’t a choice of mine but a necessity to make the loops work without aborting the job. Thus, my second question is: is there a way to go to the next iteration when a particule reaches the boundary ?

Thank you,
Rafid Bendimerad.
PhD candidate, Cornell University.

  1. What is your LAMMPS version? How did you compile it? What is the output of “lmp -h”
    It is difficult to assess the issue without seeing a detailed output. First you need to determine whether the failure is due to the looping as such or because of the settings. Thus please try and run just an input with the failing settings and provide the complete output, if it still fails.

  2. If you don’t want atoms to leave the box you either need to define a wall fix or use an “m” boundary to increase the box. If you want to stop the simulation, you can use fix halt with a suitable variable, e.g. counting atoms in a region near the boundary.

Thank you for you prompt reply.
To answer your questions:

  • My LAMMPS version is: LAMMPS (3 Mar 2020)
  • I use this command to run the input file: mpirun -n 8 lmp_mpi -in in.loopfile

However, replacing the boundary conditions to “m m m”, as you suggested, fixed all the issues.
I didn’t figure out what the source of the issue was, but it had certainly something to do with the boundary conditions.

Thank you so much. Your answer was very helpful as always.