more local buffers removed and file error status added.

This commit is contained in:
Axel Kohlmeyer
2020-06-04 19:46:35 -04:00
parent 62ee8d41f3
commit 54a8b4e08b
15 changed files with 152 additions and 146 deletions

View File

@ -21,6 +21,8 @@
#include "atom_masks.h"
#include "memory.h"
#include "error.h"
#include "utils.h"
#include "fmt/format.h"
using namespace LAMMPS_NS;
@ -254,7 +256,9 @@ void Bond::write_file(int narg, char **arg)
FILE *fp;
if (me == 0) {
fp = fopen(arg[4],"a");
if (fp == NULL) error->one(FLERR,"Cannot open bond_write file");
if (fp == NULL)
error->one(FLERR,fmt::format("Cannot open bond_write file {}: {}",
arg[4], utils::getsyserror()));
}
// initialize potentials before evaluating bond potential