Skip to content

Commit

Permalink
Merge pull request #431 from GOMC-WSU/development
Browse files Browse the repository at this point in the history
GOMC Release 2.75
  • Loading branch information
GregorySchwing authored Apr 12, 2022
2 parents 606fc41 + 140e52d commit 06d8d3e
Show file tree
Hide file tree
Showing 534 changed files with 426,701 additions and 6,455 deletions.
25 changes: 24 additions & 1 deletion CMake/FileLists.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
set(sources
src/BlockOutput.cpp
src/BondAdjacencyList.cpp
src/BoxDimensions.cpp
src/BoxDimensionsNonOrth.cpp
src/CBMC.cpp
Expand All @@ -9,9 +10,13 @@ set(sources
src/Coordinates.cpp
src/CPUSide.cpp
src/CalculateEnergy.cpp
src/Checkpoint.cpp
src/CheckpointOutput.cpp
src/CheckpointSetup.cpp
src/DCDlib.cpp
src/EnPartCntSampleOutput.cpp
src/ExtendedSystem.cpp
src/ExtendedSystemOutput.cpp
src/Ewald.cpp
src/EwaldCached.cpp
src/FFConst.cpp
Expand All @@ -38,6 +43,7 @@ set(sources
src/PDBOutput.cpp
src/PRNGSetup.cpp
src/PSFOutput.cpp
src/Random123Wrapper.cpp
src/Reader.cpp
src/Simulation.cpp
src/StaticVals.cpp
Expand All @@ -63,11 +69,13 @@ set(sources

set(headers
src/BlockOutput.h
src/BondAdjacencyList.h
src/BoxDimensions.h
src/BoxDimensionsNonOrth.h
src/CalculateEnergy.h
src/CBMC.h
src/CellList.h
src/Checkpoint.h
src/CheckpointOutput.h
src/CheckpointSetup.h
src/Clock.h
Expand All @@ -78,9 +86,12 @@ set(headers
src/Coordinates.h
src/CoordinateSetup.h
src/CPUSide.h
src/DCDlib.h
src/EnergyTypes.h
src/EnPartCntSampleOutput.h
src/EnsemblePreprocessor.h
src/ExtendedSystem.h
src/ExtendedSystemOutput.h
src/Ewald.h
src/EwaldCached.h
src/FFAngles.h
Expand All @@ -98,6 +109,8 @@ set(headers
src/FreeEnergyOutput.h
src/FxdWidthWrtr.h
src/Geometry.h
src/GOMCEventsProfile.h
src/GOMCEventsProfileDef.h
src/HistOutput.h
src/InputAbstracts.h
src/InputFileReader.h
Expand All @@ -121,6 +134,7 @@ set(headers
src/PRNG.h
src/PRNGSetup.h
src/PSFOutput.h
src/Random123Wrapper.h
src/Reader.h
src/SeedReader.h
src/Setup.h
Expand All @@ -130,6 +144,7 @@ set(headers
src/SubdividedArray.h
src/System.h
src/TransformMatrix.h
src/Velocity.h
src/Writer.h
src/XYZArray.h
src/cbmc/DCComponent.h
Expand All @@ -152,35 +167,43 @@ set(headers
src/cbmc/DCRotateOnAtom.h
src/cbmc/DCSingle.h
src/cbmc/TrialMol.h
src/moves/CFCMC.h
src/moves/NeMTMC.h
src/moves/CrankShaft.h
src/moves/IntraMoleculeExchange1.h
src/moves/IntraMoleculeExchange2.h
src/moves/IntraMoleculeExchange3.h
src/moves/IntraSwap.h
src/moves/IntraTargetedSwap.h
src/moves/MoleculeExchange1.h
src/moves/MoleculeExchange2.h
src/moves/MoleculeExchange3.h
src/moves/MoleculeTransfer.h
src/moves/MoveBase.h
src/moves/MultiParticle.h
src/moves/MultiParticleBrownianMotion.h
src/moves/Regrowth.h
src/moves/Rotation.h
src/moves/TargetedSwap.h
src/moves/Translate.h
src/moves/VolumeTransfer.h)

set(libHeaders
lib/AlphaNum.h
lib/BasicTypes.h
lib/BitLib.h
lib/Endian.h
lib/GeomLib.h
lib/Lambda.h
lib/NumLib.h
lib/StrLib.h
lib/StrStrmLib.h
lib/VectorLib.h
lib/CircuitFinder.h
lib/FloydWarshallCycle.h)

set(libSources
lib/AlphaNum.cpp
lib/CircuitFinder.cpp
lib/FloydWarshallCycle.cpp)

set(cudaHeaders
Expand Down
1 change: 1 addition & 0 deletions CMake/GOMCCPUSetup.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#EnsemblePreprocessor defines NVT = 1, GEMC = 2, GCMC = 3, NPT = 4
#NPT (Isothermal-Isobaric) Ensemble

set(NPT_flags "-DENSEMBLE=4")
set(NPT_name "GOMC_CPU_NPT")

Expand Down
25 changes: 21 additions & 4 deletions CMake/GOMCCUDASetup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,35 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -g -G --keep")
endif()


set(GEN_COMP_flag "-DGOMC_CUDA -DTHRUST_IGNORE_DEPRECATED_CPP_DIALECT ")

if (GOMC_NVTX_ENABLED)
message("-- Enabling profiling with NVTX for GPU")
set(GEN_COMP_flag "${GEN_COMP_flag} -DGOMC_NVTX_ENABLED")
endif()


include_directories(src/GPU)

set(GPU_NPT_flags "-DENSEMBLE=4 -DGOMC_CUDA -DTHRUST_IGNORE_DEPRECATED_CPP_DIALECT")
set(GPU_NPT_flags "-DENSEMBLE=4 ${GEN_COMP_flag}")
set(GPU_NPT_name "GOMC_GPU_NPT")
set(GPU_GC_flags "-DENSEMBLE=3 -DGOMC_CUDA -DTHRUST_IGNORE_DEPRECATED_CPP_DIALECT")
set(GPU_GC_flags "-DENSEMBLE=3 ${GEN_COMP_flag}")
set(GPU_GC_name "GOMC_GPU_GCMC")
set(GPU_GE_flags "-DENSEMBLE=2 -DGOMC_CUDA -DTHRUST_IGNORE_DEPRECATED_CPP_DIALECT")
set(GPU_GE_flags "-DENSEMBLE=2 ${GEN_COMP_flag}")
set(GPU_GE_name "GOMC_GPU_GEMC")
set(GPU_NVT_flags "-DENSEMBLE=1 -DGOMC_CUDA -DTHRUST_IGNORE_DEPRECATED_CPP_DIALECT")
set(GPU_NVT_flags "-DENSEMBLE=1 ${GEN_COMP_flag}")
set(GPU_NVT_name "GOMC_GPU_NVT")

set(CMAKE_CUDA_STANDARD 14)
set(CMAKE_CUDA_STANDARD_REQUIRED true)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED true)

# Set host compiler
set(CCBIN "-ccbin=${CMAKE_CXX_COMPILER}")
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} ${CCBIN} -Wno-deprecated-gpu-targets" )

include_directories(${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES})

#####################################
Expand All @@ -30,6 +43,7 @@ if(ENSEMBLE_GPU_NVT)
set_target_properties(GPU_NVT PROPERTIES
CUDA_SEPARABLE_COMPILATION ON
OUTPUT_NAME ${GPU_NVT_name}
CUDA_ARCHITECTURES "35;60;70;80"
COMPILE_FLAGS "${GPU_NVT_flags}")
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
message("-- Debug build type detected, GPU_NVT setting CUDA_RESOLVE_DEVICE_SYMBOLS ON")
Expand All @@ -49,6 +63,7 @@ if(ENSEMBLE_GPU_GEMC)
set_target_properties(GPU_GEMC PROPERTIES
CUDA_SEPARABLE_COMPILATION ON
OUTPUT_NAME ${GPU_GE_name}
CUDA_ARCHITECTURES "35;60;70;80"
COMPILE_FLAGS "${GPU_GE_flags}")
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
message("-- Debug build type detected, GPU_GEMC setting CUDA_RESOLVE_DEVICE_SYMBOLS ON")
Expand All @@ -68,6 +83,7 @@ if(ENSEMBLE_GPU_GCMC)
set_target_properties(GPU_GCMC PROPERTIES
CUDA_SEPARABLE_COMPILATION ON
OUTPUT_NAME ${GPU_GC_name}
CUDA_ARCHITECTURES "35;60;70;80"
COMPILE_FLAGS "${GPU_GC_flags}")
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
message("-- Debug build type detected, GPU_GCMC setting CUDA_RESOLVE_DEVICE_SYMBOLS ON")
Expand All @@ -87,6 +103,7 @@ if(ENSEMBLE_GPU_NPT)
set_target_properties(GPU_NPT PROPERTIES
CUDA_SEPARABLE_COMPILATION ON
OUTPUT_NAME ${GPU_NPT_name}
CUDA_ARCHITECTURES "35;60;70;80"
COMPILE_FLAGS "${GPU_NPT_flags}")
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
message("-- Debug build type detected, GPU_NPT setting CUDA_RESOLVE_DEVICE_SYMBOLS ON")
Expand Down
24 changes: 19 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ set(ENSEMBLE_GPU_NPT ON CACHE BOOL "Build GPU NPT version")

include(${PROJECT_SOURCE_DIR}/CMake/GOMCMPI.cmake)

#enable config header
configure_file(
"${PROJECT_SOURCE_DIR}/GOMC_Config.h.in"
"${PROJECT_BINARY_DIR}/GOMC_Config.h"
)
include_directories("${PROJECT_BINARY_DIR}")

if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
Expand All @@ -58,6 +53,25 @@ endif()

# Set Source and Header files
include(${PROJECT_SOURCE_DIR}/CMake/FileLists.cmake)
include_directories(lib/cereal-1.3.0/include)


#Optional CMake Argument
option(GOMC_GTEST "Build unit tests for GOMC" OFF)
option(GOMC_GTEST_MPI "Build unit tests for GOMC - MPI Enabled" OFF)

#enable config header
configure_file(
"${PROJECT_SOURCE_DIR}/GOMC_Config.h.in"
"${PROJECT_BINARY_DIR}/GOMC_Config.h"
)

# Enable google test
# for now we will disable testing for intel compiler
if(GOMC_GTEST OR GOMC_GTEST_MPI)
enable_testing()
include(test/GoogleTest.cmake)
endif()

# Find if CUDA exists and what is the version number
include(CheckLanguage)
Expand Down
26 changes: 26 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
To contribute to GOMC please follow this procedure:

1) Fork the GOMC repository

2) Clone your forked repository

git clone https://github.com/yourusername/GOMC.git

2) Checkout the development branch:

git checkout development

3) Create a new branch based of the development branch named after your new feature

git checkout -b nameofyourbranch

4) Development on this branch checking for consistent results with the development branch by using the GOMC_Examples.py script

5) When you are ready to add to GOMC, rebase your branch with the development branch.

git remote add upstream https://github.com/GOMC-WSU/GOMC.git
git rebase upstream/development

6) Retest with the GOMC_Examples.py script

7) If all the tests passed, open a pull request and select reviewers.
9 changes: 8 additions & 1 deletion GOMC_Config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
#define GOMC_VERSION_MAJOR @GOMC_VERSION_MAJOR@
#define GOMC_VERSION_MINOR @GOMC_VERSION_MINOR@


/* Allow exposure of methods only used in unit testing */
#cmakedefine01 GOMC_GTEST

/* Allow exposure of methods only used in unit testing - MPI Enabled */
#cmakedefine01 GOMC_GTEST_MPI

/* Use MPI (with mpicc) for parallelization */
#cmakedefine01 GOMC_LIB_MPI

Expand All @@ -14,4 +21,4 @@
#define GOMC_MPI (GOMC_LIB_MPI || GOMC_THREAD_MPI)

/* MPI_IN_PLACE exists for collective operations */
#cmakedefine01 MPI_IN_PLACE_EXISTS
#cmakedefine01 MPI_IN_PLACE_EXISTS
Loading

0 comments on commit 06d8d3e

Please sign in to comment.