generated from FLAMEGPU/FLAMEGPU2-model-template-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to newer FLAMEGPU2 api (2.0.0-rc), and update benchmark data to V100 CUDA 11.0 executed on Bessemer. Also includes A100 data for an earlier build, but the nodes were not available for 2.0.0-rc benchmarking.
- Loading branch information
Showing
72 changed files
with
673,207 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
# Images etc. | ||
|
||
*.png | ||
*.csv | ||
|
||
*.eps | ||
|
||
# Model output files | ||
*.xml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,75 @@ | ||
include(FetchContent) | ||
cmake_policy(SET CMP0079 NEW) | ||
|
||
# If a FLAMEGPU_VERSION has not been defined, set it to the default option. | ||
if(NOT DEFINED FLAMEGPU_VERSION OR FLAMEGPU_VERSION STREQUAL "") | ||
set(FLAMEGPU_VERSION "master" CACHE STRING "Git branch or tag to use") | ||
endif() | ||
|
||
# Allow users to switch to forks with relative ease. | ||
|
||
if(NOT DEFINED FLAMEGPU_REPOSITORY OR FLAMEGPU_REPOSITORY STREQUAL "") | ||
set(FLAMEGPU_REPOSITORY "https://github.com/FLAMEGPU/FLAMEGPU2.git" CACHE STRING "Remote Git Repository for FLAME GPU 2+") | ||
endif() | ||
|
||
# Always use most recent, simply recommend users that they may wish to do otherwise | ||
FetchContent_Declare( | ||
flamegpu2 | ||
GIT_REPOSITORY ${FLAMEGPU_REPOSITORY} | ||
GIT_TAG ${FLAMEGPU_VERSION} | ||
GIT_SHALLOW 1 | ||
GIT_PROGRESS ON | ||
# UPDATE_DISCONNECTED ON | ||
) | ||
|
||
# Fetch and populate the content if required. | ||
FetchContent_GetProperties(flamegpu2) | ||
if(NOT flamegpu2_POPULATED) | ||
FetchContent_Populate(flamegpu2) | ||
# If overridden by the user, attempt to use that | ||
if (FLAMEGPU_ROOT) | ||
# Look for the main flamegpu.h header to get the abs path, but only look relative to the hints/paths, no cmake defaults. Do not cache the result. | ||
set(FLAMEGPU_INCLUDE_HEADER_FILE include/flamegpu/flamegpu.h) | ||
find_path(FLAMEGPU_ROOT_ABS | ||
NAMES | ||
${FLAMEGPU_INCLUDE_HEADER_FILE} | ||
HINTS | ||
${FLAMEGPU_ROOT} | ||
PATHS | ||
${FLAMEGPU_ROOT} | ||
NO_DEFAULT_PATH | ||
NO_CACHE | ||
) | ||
# If found, use the local flamegpu, otherwise error. | ||
if(FLAMEGPU_ROOT_ABS) | ||
# If the correct flamegpu root was found, output a successful status message | ||
message(STATUS "Found FLAMEGPU_ROOT: ${FLAMEGPU_ROOT_ABS} (${FLAMEGPU_ROOT})") | ||
# update the value to the non abs version, in local and parent scope. | ||
set(FLAMEGPU_ROOT "${FLAMEGPU_ROOT_ABS}") | ||
# And set up the flamegpu build | ||
add_subdirectory(${FLAMEGPU_ROOT_ABS} ${CMAKE_CURRENT_BINARY_DIR}/_deps/flamegpu2-build) | ||
else() | ||
# Send a fatal error if the flamegpu root passed is invalid. | ||
message(FATAL_ERROR "Invalid FLAMEGPU_ROOT '${FLAMEGPU_ROOT}'.\nFLAMEGPU_ROOT must be a valid directory containing '${FLAMEGPU_INCLUDE_HEADER_FILE}'") | ||
endif() | ||
else() | ||
# If a FLAMEGPU_VERSION has not been defined, set it to the default option. | ||
if(NOT DEFINED FLAMEGPU_VERSION OR FLAMEGPU_VERSION STREQUAL "") | ||
set(FLAMEGPU_VERSION "master" CACHE STRING "Git branch or tag to use") | ||
endif() | ||
|
||
# If the FLAME GPU version is a hash not a branch or tag, | ||
if(NOT DEFINED FLAMEGPU_VERSION_ALLOW_HASH OR FLAMEGPU_VERSION_ALLOW_HASH STREQUAL "") | ||
set(FLAMEGPU_VERSION_ALLOW_HASH "OFF" CACHE BOOL "Boolean to enable use of a git hash in FLAMEGPU_VERSION. This will slow down CMake configuration.") | ||
endif() | ||
|
||
# Now disable extra bells/whistles and add it as s dependency | ||
set(BUILD_ALL_EXAMPLES OFF CACHE BOOL "-") | ||
set(BUILD_TESTS OFF CACHE BOOL "-") | ||
mark_as_advanced(FORCE BUILD_FLAMEGPU2) | ||
mark_as_advanced(FORCE BUILD_ALL_EXAMPLES) | ||
mark_as_advanced(FORCE BUILD_EXAMPLE_HOST_FUNCTIONS) | ||
mark_as_advanced(FORCE BUILD_EXAMPLE_GAME_OF_LIFE) | ||
mark_as_advanced(FORCE BUILD_EXAMPLE_CIRCLES_BRUTE_FORCE) | ||
mark_as_advanced(FORCE BUILD_EXAMPLE_CIRCLES_SPATIAL_3D) | ||
mark_as_advanced(FORCE BUILD_EXAMPLE_RTC_EXAMPLE) | ||
mark_as_advanced(FORCE BUILD_TESTS) | ||
# Allow users to switch to forks with relative ease. | ||
if(NOT DEFINED FLAMEGPU_REPOSITORY OR FLAMEGPU_REPOSITORY STREQUAL "") | ||
set(FLAMEGPU_REPOSITORY "https://github.com/FLAMEGPU/FLAMEGPU2.git" CACHE STRING "Remote Git Repository for FLAME GPU 2+") | ||
endif() | ||
|
||
# CMake does not support simple negation, so map to a differnt non cache variable to invert to the correct truthyness for GIT_SHALLOW | ||
set(USE_GIT_SHALLOW "ON") | ||
if(FLAMEGPU_VERSION_ALLOW_HASH) | ||
set(USE_GIT_SHALLOW OFF) | ||
endif() | ||
# Declare the fetch content target usign the above optional variables | ||
FetchContent_Declare( | ||
flamegpu2 | ||
GIT_REPOSITORY ${FLAMEGPU_REPOSITORY} | ||
GIT_TAG ${FLAMEGPU_VERSION} | ||
GIT_SHALLOW ${USE_GIT_SHALLOW} | ||
GIT_PROGRESS ON | ||
# UPDATE_DISCONNECTED ON | ||
) | ||
unset(USE_GIT_SHALLOW) | ||
|
||
# Add the subdirectory | ||
add_subdirectory(${flamegpu2_SOURCE_DIR} ${flamegpu2_BINARY_DIR}) | ||
# Fetch and populate the content if required. | ||
FetchContent_GetProperties(flamegpu2) | ||
if(NOT flamegpu2_POPULATED) | ||
FetchContent_Populate(flamegpu2) | ||
mark_as_advanced(FORCE BUILD_TESTS) | ||
# Add the subdirectory | ||
add_subdirectory(${flamegpu2_SOURCE_DIR} ${flamegpu2_BINARY_DIR}) | ||
# Add flamegpu2' expected location to the prefix path. | ||
set(CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH};${flamegpu2_SOURCE_DIR}/cmake") | ||
endif() | ||
|
||
# Add flamegpu2' expected location to the prefix path. | ||
set(CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH};${flamegpu2_SOURCE_DIR}/cmake") | ||
message(STATUS "Found FLAMEGPU2 ${flamegpu2_SOURCE_DIR}") | ||
set(FLAMEGPU_ROOT ${flamegpu2_SOURCE_DIR}) | ||
endif() | ||
message(STATUS ${flamegpu2_SOURCE_DIR}) | ||
set(FLAMEGPU_ROOT ${flamegpu2_SOURCE_DIR}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.