Hi Tim and Arun,
Your comments really inspired me a lot. Thank you.
I tested a smaller system with only one cpu core, with my previous multiple fix bond/create input script, I got an error about the bond number exceed the number of bond per atom value defined in data file, which I have meet before but without pay much attention to. I think it should be the results from the “undefined behavior”.
Inspired by Arun’s scripts, I changed my previous multiple fix bond/create input file using two different methods below:
(1) Changing Nevery value for different reaction:
fix p1 all bond/create 1 1 1 1.12246 1 iparam 1 2 jparam 1 2 prob 1 2
fix p2 all bond/create 2 2 1 1.12246 1 iparam 1 3 jparam 1 2 prob 1 3
fix p3 all bond/create 3 3 1 1.12246 1 iparam 1 4 jparam 1 2 prob 1 4
fix p4 all bond/create 4 4 1 1.12246 1 iparam 1 5 jparam 1 2 prob 1 5
fix p5 all bond/create 5 2 2 1.12246 1 iparam 1 3 jparam 1 3 prob 1 6
fix p6 all bond/create 6 3 2 1.12246 1 iparam 1 4 jparam 1 3 prob 1 7
fix p7 all bond/create 7 4 2 1.12246 1 iparam 1 5 jparam 1 3 prob 1 8
fix p8 all bond/create 8 3 3 1.12246 1 iparam 1 4 jparam 1 4 prob 1 9
fix p9 all bond/create 9 4 3 1.12246 1 iparam 1 5 jparam 1 4 prob 1 10
fix p10 all bond/create 10 4 4 1.12246 1 iparam 1 5 jparam 1 5 prob 1 11
For single core simulation with small box, it runs smoothly without any problem, however, the big box sample with 36 mpi threads crashed on some steps with error info:
“Bond atoms 82994 106937 missing on proc 8 at step 5 (…/neigh_bond.cpp:65)”
I think at particular step, multiple fix bond/create run at the same time may cause similar problem as before.
(2) Using loops and add “run 1” between each fix command.
variable j loop 500
label loop_j
fix p1 all bond/create 1 1 1 1.12246 1 iparam 1 2 jparam 1 2 prob 1 2
run 1
fix p2 all bond/create 1 2 1 1.12246 1 iparam 1 3 jparam 1 2 prob 1 3
run 1
fix p3 all bond/create 1 3 1 1.12246 1 iparam 1 4 jparam 1 2 prob 1 4
run 1
fix p4 all bond/create 1 4 1 1.12246 1 iparam 1 5 jparam 1 2 prob 1 5
run 1
fix p5 all bond/create 1 2 2 1.12246 1 iparam 1 3 jparam 1 3 prob 1 6
run 1
fix p6 all bond/create 1 3 2 1.12246 1 iparam 1 4 jparam 1 3 prob 1 7
run 1
fix p7 all bond/create 1 4 2 1.12246 1 iparam 1 5 jparam 1 3 prob 1 8
run 1
fix p8 all bond/create 1 3 3 1.12246 1 iparam 1 4 jparam 1 4 prob 1 9
run 1
fix p9 all bond/create 1 4 3 1.12246 1 iparam 1 5 jparam 1 4 prob 1 10
run 1
fix p10 all bond/create 1 4 4 1.12246 1 iparam 1 5 jparam 1 5 prob 1 11
run 1
dump $j all atom 100 dump.atom.*
write_data final.data.*
next j
jump SELF loop_j
Simulation runs smoothly, no processor boundary effect observed, however, the increasing of the crosslink degree is very low even after 500 loops. I guess the reaction in the front may has some screening effect on the following reaction which could reduced the crosslinking probability. I hope each reaction could have same probability, and I am still trying to understand Arun’s smart method. I didn’t change bond type, because I am still thinking about how to apply it to my system which is relatively simple compared with Arun’s simulation.
I am also checking the source code and try to understand and locate this “undefined behavior”. Thanks.
Zilu