From 1b98c93475ff67e71751f59daff4610c5a879c26 Mon Sep 17 00:00:00 2001 From: greg Date: Thu, 15 Jun 2023 21:32:42 -0500 Subject: [PATCH] comment out clang tidy and ensure src has subvolume before exiting on no left in resevor --- CMakeLists.txt | 2 +- src/moves/TargetedSwap.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5305e8697..0c16e1d69 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,7 +12,7 @@ include_directories(src/GPU) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) # clang-tidy -set(CMAKE_CXX_CLANG_TIDY clang-tidy -checks=-*,mpi-*,openmp-*) +#set(CMAKE_CXX_CLANG_TIDY clang-tidy -checks=-*,mpi-*,openmp-*) #Versioning set (GOMC_VERSION_MAJOR 2) diff --git a/src/moves/TargetedSwap.h b/src/moves/TargetedSwap.h index 11bf6d2a3..1565e2e97 100644 --- a/src/moves/TargetedSwap.h +++ b/src/moves/TargetedSwap.h @@ -421,7 +421,7 @@ inline uint TargetedSwap::GetBoxPairAndMol(const double subDraw, state = PickMolInSubVolume(); #if ENSEMBLE == GCMC - if (state == mv::fail_state::NO_MOL_OF_KIND_IN_BOX && sourceBox == mv::BOX1) { + if (state == mv::fail_state::NO_MOL_OF_KIND_IN_BOX && sourceBox == mv::BOX1 && hasSubVolume[sourceBox]) { std::cout << "Error: There are no molecules of kind " << molRef.kinds[kindIndex].name << " left in reservoir.\n"; exit(EXIT_FAILURE);