[lammps-users] error with reax/bonds fix

Hi Everyone,
I have been trying to use the reax/bonds fix, however the code crashes
right after the file containing the bond order information is written
the first time.
This only happens when I run the code on multiple processors.

The error message I get is this:

lmp_titan:25259 terminated with signal 11 at PC=3b7de5eb9d
SP=7fff41448730. Backtrace:
/lib64/libc.so.6(fflush+0x1d)[0x3b7de5eb9d]
/work/vale/lammps-29Jun09/src/lmp_titan(end_of_step__Q2_9LAMMPS_NS12FixReaxBondsFv+0x37)[0x509a87]

Does anyone have a clue why this is happening? Any help is appreciated.

Regards,
Paolo Valentini

Aidan - do you want to look at this?

Steve

Hi Everyone,
I have been looking at the code of the fix reax/bonds
(fix_reax_bonds.cpp) and I modified a line in end_of_step()
from:

fflush(fp);

to

if(me==0) {

   if(fp) {
      fflush(fp);
   }

}

This seems to fix the problem.

Regards,
Paolo Valentini

yes - that's a problem - I'll post a patch shortly

Thanks,
Steve

Hi Paolo,

Well spotted. This is something that is wrong, but did not cause a problem in testing.

Aidan