-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #209 from alpaka-group/release-2.5.0crp
merge release 2.5.0 to master
- Loading branch information
Showing
524 changed files
with
115,142 additions
and
3,206 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
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ | ||
"title":"mallocMC - Memory Allocator for Many Core Architectures", | ||
"description":"This project provides a framework for fast memory managers on many core accelerators. It is based on alpaka to run on many different accelerators and implements the ScatterAlloc algorithm.", | ||
"keywords":[ | ||
"mallocMC", | ||
"CUDA", | ||
"manycore", | ||
"GPU", | ||
"allocator" | ||
], | ||
"language":"eng", | ||
"access_right":"open", | ||
"license":{ | ||
"id":"MIT" | ||
}, | ||
"creators":[ | ||
{ | ||
"name":"Eckert, Carlchristian", | ||
"affiliation":"Helmholtz-Zentrum Dresden-Rossendorf, TU Dresden", | ||
"orcid":"0000-0002-6459-0842" | ||
}, | ||
{ | ||
"name":"Widera, René", | ||
"affiliation":"Helmholtz-Zentrum Dresden-Rossendorf", | ||
"orcid":"0000-0003-1642-0459" | ||
}, | ||
{ | ||
"name":"Huebl, Axel", | ||
"affiliation":"Helmholtz-Zentrum Dresden-Rossendorf", | ||
"orcid":"0000-0003-1943-7141" | ||
}, | ||
{ | ||
"name":"Gruber, Bernhard Manfred", | ||
"affiliation":"Helmholtz-Zentrum Dresden-Rossendorf, CASUS, CERN", | ||
"orcid":"0000-0001-7848-1690" | ||
}, | ||
{ | ||
"name":"Bastrakov, Sergei", | ||
"affiliation":"Helmholtz-Zentrum Dresden-Rossendorf", | ||
"orcid":"0000-0003-3396-6154" | ||
}, | ||
{ | ||
"name":"Worpitz, Benjamin" | ||
}, | ||
{ | ||
"name":"Grund, Alexander", | ||
"affiliation":"Helmholtz-Zentrum Dresden-Rossendorf", | ||
"orcid":"0000-0002-7196-8452" | ||
} | ||
] | ||
} | ||
|
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,83 +1,87 @@ | ||
project(mallocMC LANGUAGES CUDA CXX) | ||
project(mallocMC LANGUAGES CXX) | ||
cmake_minimum_required(VERSION 3.8) | ||
|
||
set(CMAKE_CXX_STANDARD 11) | ||
set(CMAKE_CXX_STANDARD 14) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
|
||
# helper for libs and packages | ||
set(CMAKE_CUDA_STANDARD 11) | ||
set(CMAKE_CUDA_STANDARD_REQUIRED ON) | ||
set(CMAKE_PREFIX_PATH "/usr/lib/x86_64-linux-gnu/" | ||
"$ENV{CUDA_ROOT}" "$ENV{BOOST_ROOT}") | ||
|
||
|
||
################################################################################ | ||
# CMake policies | ||
# | ||
# Search in <PackageName>_ROOT: | ||
# https://cmake.org/cmake/help/v3.12/policy/CMP0074.html | ||
################################################################################ | ||
|
||
if(POLICY CMP0074) | ||
cmake_policy(SET CMP0074 NEW) | ||
endif() | ||
|
||
|
||
############################################################################### | ||
# CUDA | ||
############################################################################### | ||
if(NOT DEFINED COMPUTE_CAPABILITY) | ||
set(COMPUTE_CAPABILITY "30") | ||
# find alpaka | ||
set(mallocMC_ALPAKA_PROVIDER "intern" CACHE STRING "Select which alpaka is used") | ||
set_property(CACHE mallocMC_ALPAKA_PROVIDER PROPERTY STRINGS "intern;extern") | ||
mark_as_advanced(mallocMC_ALPAKA_PROVIDER) | ||
if(${mallocMC_ALPAKA_PROVIDER} STREQUAL "intern") | ||
set(alpaka_BUILD_EXAMPLES OFF) | ||
set(BUILD_TESTING OFF) | ||
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/alpaka ${CMAKE_BINARY_DIR}/alpaka) | ||
else() | ||
find_package(alpaka HINTS $ENV{ALPAKA_ROOT}) | ||
endif() | ||
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -arch=sm_${COMPUTE_CAPABILITY} -use_fast_math") | ||
|
||
OPTION(CUDA_OUTPUT_INTERMEDIATE_CODE "Output ptx code" OFF) | ||
if(CUDA_OUTPUT_INTERMEDIATE_CODE) | ||
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Xptxas -v --keep") | ||
if(NOT TARGET alpaka::alpaka) | ||
message(FATAL "Required mallocMC dependency alpaka could not be found!") | ||
endif() | ||
|
||
SET(CUDA_OPTIMIZATION_TYPE "unset" CACHE STRING "CUDA Optimization") | ||
set_property(CACHE CUDA_OPTIMIZATION_TYPE PROPERTY STRINGS "unset;-G0;-O0;-O1;-O2;-O3") | ||
if(NOT ${CUDA_OPTIMIZATION_TYPE} STREQUAL "unset") | ||
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} ${CUDA_OPTIMIZATION_TYPE}") | ||
# Catch2 | ||
set(mallocMC_CATCH2_PROVIDER "intern" CACHE STRING "Select which Catch2 is used") | ||
set_property(CACHE mallocMC_CATCH2_PROVIDER PROPERTY STRINGS "intern;extern") | ||
mark_as_advanced(mallocMC_CATCH2_PROVIDER) | ||
if(${mallocMC_CATCH2_PROVIDER} STREQUAL "intern") | ||
add_library(Catch2::Catch2 INTERFACE IMPORTED) | ||
target_include_directories(Catch2::Catch2 INTERFACE ${CMAKE_CURRENT_LIST_DIR}/thirdParty/catch2/include) | ||
else() | ||
find_package(Catch2 CONFIG REQUIRED) | ||
endif() | ||
|
||
# for installation, just copy include folder to install folder | ||
install( | ||
DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/src/include/." | ||
DESTINATION include | ||
) | ||
|
||
################################################################################ | ||
# Warnings | ||
################################################################################ | ||
# warnings | ||
add_library(warnings INTERFACE) | ||
if(CMAKE_COMPILER_IS_GNUCXX) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wshadow -Wno-unknown-pragmas -Wextra -Wno-unused-parameter -Wno-unused-local-typedefs") | ||
target_compile_options(warnings INTERFACE -Wall -Wshadow -Wno-unknown-pragmas -Wextra -Wno-unused-parameter -Wno-unused-local-typedefs) | ||
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wshadow") | ||
target_compile_options(warnings INTERFACE -Wall -Wshadow) | ||
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "PGI") | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Minform=inform") | ||
target_compile_options(warnings INTERFACE -Minform=inform) | ||
endif() | ||
|
||
|
||
############################################################################### | ||
# Installation | ||
############################################################################### | ||
|
||
# copy include folder to install folder | ||
INSTALL( | ||
DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/src/include/." | ||
DESTINATION include | ||
PATTERN ".git" EXCLUDE | ||
PATTERN "mallocMC_config.hpp" EXCLUDE | ||
) | ||
|
||
|
||
############################################################################### | ||
# Executables | ||
############################################################################### | ||
file(GLOB_RECURSE headers src/include/**) | ||
add_custom_target(mallocMC SOURCES ${headers}) # create a target with the header files for IDE projects | ||
add_custom_target(mallocMCIde SOURCES ${headers}) # create a target with the header files for IDE projects | ||
source_group(TREE ${CMAKE_CURRENT_LIST_DIR}/src/include FILES ${headers}) | ||
|
||
include_directories(${CMAKE_CURRENT_LIST_DIR}/src/include) | ||
add_executable(mallocMC_Example01 EXCLUDE_FROM_ALL examples/mallocMC_example01.cu examples/mallocMC_example01_config.hpp) | ||
add_executable(mallocMC_Example02 EXCLUDE_FROM_ALL examples/mallocMC_example02.cu) | ||
add_executable(mallocMC_Example03 EXCLUDE_FROM_ALL examples/mallocMC_example03.cu) | ||
add_executable(VerifyHeap EXCLUDE_FROM_ALL tests/verify_heap.cu tests/verify_heap_config.hpp) | ||
add_custom_target(examples DEPENDS mallocMC_Example01 mallocMC_Example02 mallocMC_Example03 VerifyHeap) | ||
alpaka_add_executable(mallocMC_Example01 EXCLUDE_FROM_ALL examples/mallocMC_example01.cpp) | ||
target_include_directories(mallocMC_Example01 PUBLIC ${CMAKE_CURRENT_LIST_DIR}/src/include) | ||
target_link_libraries(mallocMC_Example01 PUBLIC alpaka::alpaka warnings) | ||
|
||
alpaka_add_executable(mallocMC_Example03 EXCLUDE_FROM_ALL examples/mallocMC_example03.cpp) | ||
target_include_directories(mallocMC_Example03 PUBLIC ${CMAKE_CURRENT_LIST_DIR}/src/include) | ||
target_link_libraries(mallocMC_Example03 PUBLIC alpaka::alpaka warnings) | ||
|
||
alpaka_add_executable(VerifyHeap EXCLUDE_FROM_ALL tests/verify_heap.cpp tests/verify_heap_config.hpp) | ||
target_include_directories(VerifyHeap PUBLIC ${CMAKE_CURRENT_LIST_DIR}/src/include) | ||
target_link_libraries(VerifyHeap PUBLIC alpaka::alpaka warnings) | ||
|
||
if (CUDA_VERSION VERSION_LESS 10.2) # TODO(bgruber): I do not know exactly where it breaks. 9.1 does not work, 10.2 works | ||
# the catch2 main needs to be in a non-CUDA file before CUDA 10.2, because nvcc fails to compile the catch2 header | ||
# TODO: merge the test_main back into the tests exe, once CUDA 10.2 is the minimum version | ||
add_library(tests_main EXCLUDE_FROM_ALL tests/main.cpp) | ||
target_include_directories(tests_main PUBLIC ${CMAKE_CURRENT_LIST_DIR}/src/include) | ||
target_link_libraries(tests_main PUBLIC Catch2::Catch2 warnings) | ||
|
||
alpaka_add_executable(tests EXCLUDE_FROM_ALL tests/dimensions.cpp tests/policies.cpp) | ||
target_include_directories(tests PUBLIC ${CMAKE_CURRENT_LIST_DIR}/src/include) | ||
target_link_libraries(tests PUBLIC tests_main alpaka::alpaka Catch2::Catch2 warnings) | ||
else() | ||
alpaka_add_executable(tests EXCLUDE_FROM_ALL tests/main.cpp tests/dimensions.cpp tests/policies.cpp) | ||
target_include_directories(tests PUBLIC ${CMAKE_CURRENT_LIST_DIR}/src/include) | ||
target_link_libraries(tests PUBLIC alpaka::alpaka Catch2::Catch2 warnings) | ||
endif() | ||
|
||
add_custom_target(examples DEPENDS mallocMC_Example01 mallocMC_Example03 VerifyHeap) |
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.