From 1cd47b762b094e61539c89019486abf41a498799 Mon Sep 17 00:00:00 2001 From: Taylor Barnes Date: Thu, 8 Sep 2022 18:39:59 +0000 Subject: [PATCH] Update MDI plugin code --- cmake/Modules/Packages/MDI.cmake | 4 ++-- lib/mdi/Install.py | 2 +- src/MDI/library_mdi.cpp | 4 ++-- src/MDI/library_mdi.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmake/Modules/Packages/MDI.cmake b/cmake/Modules/Packages/MDI.cmake index 0c6bf81ec1..5e93f2a272 100644 --- a/cmake/Modules/Packages/MDI.cmake +++ b/cmake/Modules/Packages/MDI.cmake @@ -11,8 +11,8 @@ option(DOWNLOAD_MDI "Download and compile the MDI library instead of using an al if(DOWNLOAD_MDI) message(STATUS "MDI download requested - we will build our own") - set(MDI_URL "https://github.com/MolSSI-MDI/MDI_Library/archive/v1.4.9.tar.gz" CACHE STRING "URL for MDI tarball") - set(MDI_MD5 "705ddb6b0018a542d39f17cc45c67bd9" CACHE STRING "MD5 checksum for MDI tarball") + set(MDI_URL "https://github.com/MolSSI-MDI/MDI_Library/archive/v1.4.10.tar.gz" CACHE STRING "URL for MDI tarball") + set(MDI_MD5 "1c203b7fd462d9934834f643f09f3c06" CACHE STRING "MD5 checksum for MDI tarball") mark_as_advanced(MDI_URL) mark_as_advanced(MDI_MD5) enable_language(C) diff --git a/lib/mdi/Install.py b/lib/mdi/Install.py index b039599cb5..dd9d0a4733 100644 --- a/lib/mdi/Install.py +++ b/lib/mdi/Install.py @@ -37,7 +37,7 @@ url = "https://github.com/MolSSI-MDI/MDI_Library/archive/v%s.tar.gz" % version # known checksums for different MDI versions. used to validate the download. checksums = { \ - '1.4.9' : '705ddb6b0018a542d39f17cc45c67bd9', \ + '1.4.10' : '1c203b7fd462d9934834f643f09f3c06', \ } # print error message or help diff --git a/src/MDI/library_mdi.cpp b/src/MDI/library_mdi.cpp index dd062f7724..85689d88b1 100644 --- a/src/MDI/library_mdi.cpp +++ b/src/MDI/library_mdi.cpp @@ -48,16 +48,16 @@ command-line argument, which must be provided by the MDI driver. * \param class_obj pointer to an instance of an mdi/engine fix cast to ``void *``. * \return 0 on no error. */ -int MDI_Plugin_init_lammps() +int MDI_Plugin_init_lammps(void* plugin_state) { // initialize MDI int mdi_argc; char **mdi_argv; + if (MDI_Set_plugin_state(plugin_state)) MPI_Abort(MPI_COMM_WORLD, 1); if (MDI_Plugin_get_argc(&mdi_argc)) MPI_Abort(MPI_COMM_WORLD, 1); if (MDI_Plugin_get_argv(&mdi_argv)) MPI_Abort(MPI_COMM_WORLD, 1); - if (MDI_Init(&mdi_argc, &mdi_argv)) MPI_Abort(MPI_COMM_WORLD, 1); // get the MPI intra-communicator for this code diff --git a/src/MDI/library_mdi.h b/src/MDI/library_mdi.h index afc522ed68..445ffb6a94 100644 --- a/src/MDI/library_mdi.h +++ b/src/MDI/library_mdi.h @@ -20,6 +20,6 @@ #include extern "C" { -int MDI_Plugin_init_lammps(); +int MDI_Plugin_init_lammps(void* plugin_state); } #endif