[gmx-developers] Gromacs-2016.1 Windows VS2015 + CUDA8

Mark Abraham mark.j.abraham at gmail.com
Fri Dec 9 04:24:33 CET 2016


Hi,

That's mystifying - in normal C the static const float should be in scope
every time CUDA compiles the file. Clearly it works fine with other
compilers, but we don't test the CUDA build on Windows.
http://stackoverflow.com/questions/15004955/host-float-constant-usage-in-a-kernel-in-cuda
suggests
that file static int and float are different for CUDA.
http://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#variable-type-qualifiers
suggests
that using static const __device__ float might force MSVC to do what
perhaps other compilers achieve via optimization? I'm pretty sure that
value isn't used by GROMACS on the host, so it might just work. Not sure if
any of the other qualifiers will help improve speed.

Mark

On Wed, Nov 23, 2016 at 9:41 AM Wahab Mirco <
Mirco.Wahab at chemie.tu-freiberg.de> wrote:

> I'm about to build 2016.1 on a windows machine w/VS2015
> and hitting a wall:
>
> ...
> 2>  Building NVCC (Device) object
>
> src/gromacs/CMakeFiles/libgromacs.dir/mdlib/nbnxn_cuda/Release/libgromacs_generated_nbnxn_cuda.cu.obj
> 2>  nbnxn_cuda.cu
> 2>
> 2>CUSTOMBUILD : nvcc warning : The 'compute_20', 'sm_20', and 'sm_21'
> architectures are deprecated, and may be removed in a future release
> (Use -Wno-deprecated-gpu-targets to suppress warning).
> 2>
>
> 2>D:/LibSrc/Gromacs2016/gromacs-2016.1/src\gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_kernel_utils.cuh(351):
> error : identifier "c_oneSixth" is undefined
>
> 2>D:/LibSrc/Gromacs2016/gromacs-2016.1/src\gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_kernel_fermi.cuh(243):
> error : identifier "c_oneSixth" is undefined in device code
> ...
>
> and so on. A quick look into the file reveals "c_oneSixth" at line 78:
>
> [nbnxn_cuda_kernel_utils.cuh]
> ...
> 78: static const float  c_oneSixth    = 0.16666667f;
> 79: static const float  c_oneTwelveth = 0.08333333f;
> ...
>
> I'm not sure where to start looking for a solution ...
>
> Regards
>
> Mirco
>
> --
> Gromacs Developers mailing list
>
> * Please search the archive at
> http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List before
> posting!
>
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>
> * For (un)subscribe requests visit
> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers
> or send a mail to gmx-developers-request at gromacs.org.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20161209/2af97c1f/attachment.html>


More information about the gromacs.org_gmx-developers mailing list