CUDA + gcc 6 does not work
CUDA 9.0 supports gcc 6, but compilation fails with the following static assertion error:
/home/pszilard/projects/gromacs/gromacs-16/src/gromacs/utility/smalloc.h(251): error: static assertion failed with "smalloc() called on C++ type" detected during instantiation of "void gmx_smalloc_impl(const char *, const char *, int, T *&, size_t) [with T=void]" /home/pszilard/projects/gromacs/gromacs-16/src/gromacs/gpu_utils/cudautils.cu(95): here
Removed unused host-side allocation code
Even though the code is not called ever, compiling with gcc 6 and CUDA
9.0 triggers our static assertion preventing the inadvertent use of
smalloc on a C++ type with a constructor.
#2 Updated by Mark Abraham about 3 years ago
I assume this is provoked by something generated by nvcc regardless of whether there is a known caller of the routine. The static assertion is in the GROMACS code, to stop us inadvertently using such routines on our own types. Simplest solution is to remove the unused code.