Commit e01e90eb authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

workaround for double free issue when using USER-COLVARS with lammps code...

workaround for double free issue when using USER-COLVARS with lammps code loaded as shared library into a standalone executable
parent e9fed809
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -1552,10 +1552,10 @@ std::string colvarmodule::restart_in_name = "";


// i/o constants
size_t const colvarmodule::it_width = 12;
size_t const colvarmodule::cv_prec  = 14;
size_t const colvarmodule::cv_width = 21;
size_t const colvarmodule::en_prec  = 14;
size_t const colvarmodule::en_width = 21;
std::string const colvarmodule::line_marker =
const size_t colvarmodule::it_width = 12;
const size_t colvarmodule::cv_prec  = 14;
const size_t colvarmodule::cv_width = 21;
const size_t colvarmodule::en_prec  = 14;
const size_t colvarmodule::en_width = 21;
const char * const colvarmodule::line_marker = (const char *)
  "----------------------------------------------------------------------\n";
+1 −1
Original line number Diff line number Diff line
@@ -366,7 +366,7 @@ public:
  /// Number of characters to represent the collective variables energy
  static size_t const en_width;
  /// Line separator in the log output
  static std::string const line_marker;
  static const char * const line_marker;


  // proxy functions
+1 −1
Original line number Diff line number Diff line
@@ -193,7 +193,7 @@ double colvarproxy_lammps::compute()
  previous_step = _lmp->update->ntimestep;

  if (cvm::debug()) {
    cvm::log(cvm::line_marker+
    cvm::log(std::string(cvm::line_marker)+
             "colvarproxy_lammps, step no. "+cvm::to_str(colvars->it)+"\n"+
             "Updating internal data.\n");
  }