Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Spelling: Env AMREX_CUDA_ARCH #1522

Merged
merged 1 commit into from
Nov 7, 2020
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
5 changes: 3 additions & 2 deletions Docs/sphinx_documentation/source/GPU.rst
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,9 @@ For example, on Cori GPUs you can specify the architecture as follows:
cmake [options] -DAMReX_GPU_BACKEND=CUDA -DAMReX_CUDA_ARCH=Volta /path/to/amrex/source


If no architecture is specified, CMake will default to the architecture defined in the environmental
variable ``AMReX_CUDA_ARCH``. If the latter is not defined, CMake will try to determine which GPU
If no architecture is specified, CMake will default to the architecture defined in the
*environment variable* ``AMREX_CUDA_ARCH`` (note: all caps).
If the latter is not defined, CMake will try to determine which GPU
architecture is supported by the system. If more than one is found, CMake will build for all of them.
This will generally results in a larger library and longer build times.
If autodetection fails, a set of "common" architectures is assumed.
Expand Down
4 changes: 2 additions & 2 deletions Tools/CMake/AMReX_SetupCUDA.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ endif ()
message(STATUS "Enabled CUDA options:")

set(AMReX_CUDA_ARCH_DEFAULT "Auto")
if(DEFINED ENV{AMReX_CUDA_ARCH})
set(AMReX_CUDA_ARCH_DEFAULT "$ENV{AMReX_CUDA_ARCH}")
if(DEFINED ENV{AMREX_CUDA_ARCH})
set(AMReX_CUDA_ARCH_DEFAULT "$ENV{AMREX_CUDA_ARCH}")
endif()
set(AMReX_CUDA_ARCH ${AMReX_CUDA_ARCH_DEFAULT} CACHE STRING "CUDA architecture (Use 'Auto' for automatic detection)")

Expand Down