Unverified Commit 6d0ef856 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer Committed by GitHub
Browse files

Merge pull request #2055 from akohlmey/reaxc-runtime-adjust

Make MIN_HBONDS define for reax/c configurable via an input option
parents 48262fd0 1418ec4a
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -21,12 +21,13 @@ Syntax

  .. parsed-literal::

     keyword = *checkqeq* or *lgvdw* or *safezone* or *mincap*
     keyword = *checkqeq* or *lgvdw* or *safezone* or *mincap* or *minhbonds*
       *checkqeq* value = *yes* or *no* = whether or not to require qeq/reax fix
       *enobonds* value = *yes* or *no* = whether or not to tally energy of atoms with no bonds
       *lgvdw* value = *yes* or *no* = whether or not to use a low gradient vdW correction
       *safezone* = factor used for array allocation
       *mincap* = minimum size for array allocation
       *minhbonds* = minimum size use for storing hydrogen bonds

Examples
""""""""
@@ -146,11 +147,11 @@ zero. The latter behavior is usual not desired, as it causes
discontinuities in the potential energy when the bonding of an atom
drops to zero.

Optional keywords *safezone* and *mincap* are used for allocating
reax/c arrays.  Increasing these values can avoid memory problems,
such as segmentation faults and bondchk failed errors, that could
occur under certain conditions. These keywords are not used by the
Kokkos version, which instead uses a more robust memory allocation
Optional keywords *safezone*\ , *mincap*\ , and *minhbonds* are used
for allocating reax/c arrays.  Increasing these values can avoid memory
problems, such as segmentation faults and bondchk failed errors, that
could occur under certain conditions. These keywords are not used by
the Kokkos version, which instead uses a more robust memory allocation
scheme that checks if the sizes of the arrays have been exceeded and
automatically allocates more memory.

@@ -352,7 +353,7 @@ Default
"""""""

The keyword defaults are checkqeq = yes, enobonds = yes, lgvdw = no,
safezone = 1.2, mincap = 50.
safezone = 1.2, mincap = 50, minhbonds = 25.

----------

+1 −0
Original line number Diff line number Diff line
@@ -1786,6 +1786,7 @@ Militzer
Minary
mincap
Mindlin
minhbonds
mingw
minima
minimizations
+1 −1
Original line number Diff line number Diff line
@@ -508,7 +508,7 @@ int PairReaxCOMP::estimate_reax_lists()
    num_nbrs += numneigh[i];
  }

  int new_estimate = MAX (num_nbrs, mincap*MIN_NBRS);
  int new_estimate = MAX(num_nbrs, mincap*REAX_MIN_NBRS);

  return new_estimate;
}
+1 −1
Original line number Diff line number Diff line
@@ -310,7 +310,7 @@ void Validate_ListsOMP(reax_system *system, storage * /*workspace*/, reax_list *
      Hindex = system->my_atoms[i].Hindex;
      if (Hindex > -1) {
        system->my_atoms[i].num_hbonds =
          (int)(MAX( Num_Entries(Hindex, hbonds)*saferzone, MIN_HBONDS ));
          (int)(MAX(Num_Entries(Hindex,hbonds)*saferzone,system->minhbonds));

        if (Hindex < numH-1)
          comp = Start_Index(Hindex+1, hbonds);
+1 −1
Original line number Diff line number Diff line
@@ -68,7 +68,7 @@ int Init_ListsOMP(reax_system *system, control_params *control,
      system->my_atoms[i].num_hbonds = hb_top[i];
      total_hbonds += hb_top[i];
    }
    total_hbonds = (int)(MAX( total_hbonds*saferzone, mincap*MIN_HBONDS ));
    total_hbonds = (int)(MAX(total_hbonds*saferzone,mincap*system->minhbonds));

    if( !Make_List( system->Hcap, total_hbonds, TYP_HBOND,
                    *lists+HBONDS ) ) {
Loading