Documentation: Clarify that `CUDA_ARCH` can only be overridden from command line
PR summary
Clarify that CUDA_ARCH can only be overridden from the command line; setting CUDA_ARCH in GNUmakefile will be overridden and has no effect.
PR motivation
Overriding this parameter from the command line will prevent AMReX from changing it, while specifying it in GNUmakefile will be overridden.
I've learned it the hard way in AMReX-Codes/amrex#4621.
PR checklist
- [ ] test suite needs to be run on this PR
- [ ] this PR will change answers in the test suite to more than roundoff level
- [ ] all newly-added functions have docstrings as per the coding conventions
- [ ] the
CHANGESfile has been updated, if appropriate - [ ] if appropriate, this change is described in the docs
One could still specify it in GNUmakefile with override CUDA_ARCH = 80.
https://www.gnu.org/software/make/manual/html_node/Override-Directive.html
Variable assignments marked with the override flag have a higher priority than all other assignments, except another override.
So maybe suggest using override in GNUmakefile? e.g.:
For recent GPUs, like the NVIDIA RTX 4090, you may need to change
the default CUDA architecture. This can be done by adding:
.. code::
CUDA_ARCH=89
to the ``make`` line or by using an override in ``GNUmakefile``.