From fb08dc09f3b372386ecf0e367d71452e9b526722 Mon Sep 17 00:00:00 2001 From: DallasTrinkle <dtrinkle@illinois.edu> Date: Mon, 1 May 2017 13:38:37 -0500 Subject: [PATCH] Small error in elements allocation causing seg. fault for parallel runs; fixed. --- src/USER-MISC/pair_meam_spline.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/USER-MISC/pair_meam_spline.cpp b/src/USER-MISC/pair_meam_spline.cpp index 896c7d3405..5941a9f600 100644 --- a/src/USER-MISC/pair_meam_spline.cpp +++ b/src/USER-MISC/pair_meam_spline.cpp @@ -619,7 +619,7 @@ void PairMEAMSpline::read_file(const char* filename) n = strlen(elements[i]); MPI_Bcast(&n, 1, MPI_INT, 0, world); if (comm->me != 0) - elements[i] = new char[n]; + elements[i] = new char[n+1]; MPI_Bcast(elements[i], n, MPI_CHAR, 0, world); } for (int i = 0; i < nmultichoose2; i++) -- GitLab