From 7dc4e17e0cb1e1d42c98013181b2159cc7d76ca8 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 14 Jun 2025 12:57:01 -0400 Subject: [PATCH] fix compilation with MPI STUBS --- src/library.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/library.cpp b/src/library.cpp index 5b16985183..78ff2cf25a 100644 --- a/src/library.cpp +++ b/src/library.cpp @@ -1277,7 +1277,9 @@ If LAMMPS was compiled with MPI_STUBS, this function returns -1. int lammps_get_mpi_comm(void *handle) { #ifdef MPI_STUBS - const auto mesg = fmt::format("ERROR: {}(): Invalid LAMMPS handle\n", FNERR); + LAMMPS *lmp = nullptr; + const auto mesg = fmt::format("ERROR: {}(): No MPI communicator conversion possible " + "with MPI STUBS\n", FNERR); STORE_ERROR_MESSAGE(lmp, mesg); return -1; #else