From 0223df7038ca8a5a93f09dd3e8830fa7ef98fa8e Mon Sep 17 00:00:00 2001 From: Trevor Steil Date: Fri, 25 Oct 2024 07:49:02 -0700 Subject: [PATCH] Using 'find' for MVAPICH warning instead of assuming its location --- include/ygm/detail/comm.ipp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/ygm/detail/comm.ipp b/include/ygm/detail/comm.ipp index e958188c..ffffba50 100644 --- a/include/ygm/detail/comm.ipp +++ b/include/ygm/detail/comm.ipp @@ -47,7 +47,8 @@ inline comm::comm(MPI_Comm mcomm) inline void comm::comm_setup(MPI_Comm c) { // Warn about MVAPICH - if (mpi_library().substr(0, 8) == "MVAPICH2") { + const auto mpi_details = mpi_library(); + if (mpi_details.find("MVAPICH2") != mpi_details.npos) { cerr0() << "YGM::COMM WARNING: YGM hangs when run with MVAPICH2 on certain " "machines. Use at your own risk." << std::endl;