CUDA host compiler check is not retriggered
The check that is meant to detect whether the nvcc + host compiler combination work correctly seems to not get rerun after conditions change that should otherwise trigger a re-check considering the line source:cmake/gmxManageGPU.cmake#L272.
$ cmake ../ -DGMX_FFT_LIBRARY=fftpack [...] -- Check for working NVCC/C compiler combination -- Check for working NVCC/C compiler combination - works [...] $ cmake ../ -DGMX_FFT_LIBRARY=fftpack -DCUDA_HOST_COMPILER=foo -- Configuring done -- Generating done
Clearly, the second cmake invocation should have resulted in a rerun of the check and a failure.
Fix nvcc host compiler check triggering
The nvcc host compiler check conditional triggering on the change of the
host compiler binary has not been functional as the check has been
placed after another gmx_check_if_changed() call on the same variable.
This change moves the code that checks the functioning of nvcc and host
compiler to gmxManageNvccConf and refactors the conditionals to reuse
the result of the previously issues check if changed call.
#2 Updated by Szilárd Páll over 1 year ago
- Status changed from New to In Progress
gmx_check_if_changed() on L272 does not work on the CUDA_HOST_COMPILER condition because this is already checked in gmxManageNvccConfig.cmake which precedes this code. In fact, the buggy check in question is also misplaced and as it's an nvcc-specific check, it should be in gmxManageNvccConfig.cmake too.