Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 27 additions & 28 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,34 +51,33 @@ jobs:
-DAMReX_MPI=OFF
cmake --build build -j 2

# TODO: target_compile_features no known features for CUDA compiler "" version .
# nvcc11:
# name: [email protected] [email protected]
# runs-on: ubuntu-20.04
# env: {CXXFLAGS: "-fno-operator-names"}
# steps:
# - uses: actions/checkout@v2
# - name: Dependencies
# run: .github/workflows/dependencies/dependencies_nvcc11.sh
# - name: Build & Install
# run: |
# export PATH=/usr/local/nvidia/bin:/usr/local/cuda/bin:${PATH}
# export LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64:/usr/local/cuda/lib64:${LD_LIBRARY_PATH}
# which nvcc || echo "nvcc not in PATH!"
#
# export CC=$(which gcc)
# export CXX=$(which g++)
# export CUDAHOSTCXX=$(which g++)
#
# cmake -S . -B build \
# -DCMAKE_VERBOSE_MAKEFILE=ON \
# -DAMReX_GPU_BACKEND=CUDA \
# -DCMAKE_CUDA_STANDARD=17 \
# -DCMAKE_CXX_STANDARD=17 \
# -DAMReX_CUDA_ARCH=8.0 \
# -DAMReX_CUDA_ERROR_CROSS_EXECUTION_SPACE_CALL=ON \
# -DAMReX_CUDA_ERROR_CAPTURE_THIS=ON
# cmake --build build -j 2
nvcc11:
name: [email protected] [email protected]
runs-on: ubuntu-20.04
env: {CXXFLAGS: "-fno-operator-names"}
steps:
- uses: actions/checkout@v2
- name: Dependencies
run: .github/workflows/dependencies/dependencies_nvcc11.sh
- name: Build & Install
run: |
export PATH=/usr/local/nvidia/bin:/usr/local/cuda/bin:${PATH}
export LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64:/usr/local/cuda/lib64:${LD_LIBRARY_PATH}
which nvcc || echo "nvcc not in PATH!"

export CC=$(which gcc)
export CXX=$(which g++)
export CUDAHOSTCXX=$(which g++)

cmake -S . -B build \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DAMReX_GPU_BACKEND=CUDA \
-DCMAKE_CUDA_STANDARD=17 \
-DCMAKE_CXX_STANDARD=17 \
-DAMReX_CUDA_ARCH=8.0 \
-DAMReX_CUDA_ERROR_CROSS_EXECUTION_SPACE_CALL=ON \
-DAMReX_CUDA_ERROR_CAPTURE_THIS=ON
cmake --build build -j 2

# TODO: in pybind11
# multiple definition of `scalblnl`, `sinhl', `tanhl`, `tanl`, ...
Expand Down
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ endif()
if(POLICY CMP0104)
cmake_policy(SET CMP0104 OLD)
endif()
# device link step not yet fully implemented in AMReX logic
# https://cmake.org/cmake/help/latest/policy/CMP0105.html
if(POLICY CMP0105)
cmake_policy(SET CMP0105 OLD)
endif()


# CCache Support ##############################################################
Expand Down
4 changes: 2 additions & 2 deletions cmake/dependencies/AMReX.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ macro(find_amrex)

if(pyAMReX_amrex_src)
list(APPEND CMAKE_MODULE_PATH "${pyAMReX_amrex_src}/Tools/CMake")
if(pyAMReX_COMPUTE STREQUAL CUDA)
if(AMReX_GPU_BACKEND STREQUAL CUDA)
enable_language(CUDA)
include(AMReX_SetupCUDA)
endif()
Expand All @@ -46,7 +46,7 @@ macro(find_amrex)
if(NOT fetchedamrex_POPULATED)
FetchContent_Populate(fetchedamrex)
list(APPEND CMAKE_MODULE_PATH "${fetchedamrex_SOURCE_DIR}/Tools/CMake")
if(pyAMReX_COMPUTE STREQUAL CUDA)
if(AMReX_GPU_BACKEND STREQUAL CUDA)
enable_language(CUDA)
include(AMReX_SetupCUDA)
endif()
Expand Down
2 changes: 1 addition & 1 deletion cmake/pyAMReXFunctions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ macro(set_ccache)
find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
if(pyAMReX_COMPUTE STREQUAL CUDA)
if(AMReX_GPU_BACKEND STREQUAL CUDA)
set(CMAKE_CUDA_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
endif()
endif()
Expand Down