Project

General

Profile

Bug #2227

CUDA + gcc 6 does not work

Added by Szilárd Páll about 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
mdrun
Target version:
Affected version - extra info:
Affected version:
Difficulty:
uncategorized
Close

Description

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

Associated revisions

Revision 386f0e38 (diff)
Added by Mark Abraham about 3 years ago

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.

Fixes #2227

Change-Id: I2cb66e3f9e90cd809467f2c9b42c07b97e2b19ca

History

#1 Updated by Gerrit Code Review Bot about 3 years ago

Gerrit received a related patchset '1' for Issue #2227.
Uploader: Mark Abraham ()
Change-Id: gromacs~release-2016~I2cb66e3f9e90cd809467f2c9b42c07b97e2b19ca
Gerrit URL: https://gerrit.gromacs.org/6828

#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.

#3 Updated by Mark Abraham about 3 years ago

  • Status changed from New to Fix uploaded

#4 Updated by Mark Abraham about 3 years ago

  • Status changed from Fix uploaded to Resolved

#5 Updated by Mark Abraham about 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF