[gmx-developers] GPU kernel code
Szilárd Páll
pall.szilard at gmail.com
Thu Apr 25 13:29:20 CEST 2019
On Thu, Apr 25, 2019 at 12:21 PM Mahmood Naderan <nt_mahmood at yahoo.com>
wrote:
> Thanks Szilard,
>
> I looked at that. It seems that it is a big GPU kernel and specific parts
> of it are executed using #ifdef macros and those are actually enabled
> whenever it is needed in nbnxn_cuda.cu.
>
Not really. Combinations of LJ and Coulomb flavors as well input/output
functionalities (force, force and energy, pruning) are all generated and
compiled into the binary. Selection happens at runtime, see
in nbnxn_cuda.cu:select_nbnxn_kernel().
> However, the names are still vague for me. For example, I assume that the
> FUNC_NAME is something like ElecEw_VdwLJCombLB_F but grepping even
> *LJComb* shows no match.
>
It should show up; this a common component of the short-range pair
interaction kernel over all architectures, CPU and GPU, so it will be all
over the place in the nbnxn module. Try "git grep LJComb".
The CUDA kernel generation happens in
src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_kernels.cuh
> Instead I see "#ifndef LJ_COMB". I would like to know which part of the
> kernel is used for ElecEw_VdwLJCombLB_F?
>
See the mapping of macros to filenames in the above file.
Let me know if something is still unclear.
Cheers,
--
Szilárd
>
>
>
> Regards,
> Mahmood
>
>
> On Thursday, April 25, 2019, 1:29:46 PM GMT+4:30, Szilárd Páll <
> pall.szilard at gmail.com> wrote:
>
>
> Hi Mahmood,
>
> The kernels are preprocessor-generated, including the kernel names (see
> NB_KERNEL_FUNC_NAME() macro); the common source code is in
> src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_kernel.cuh.
>
> Cheers,
> --
> Szilárd
>
>
> On Wed, Apr 24, 2019 at 7:24 PM Mahmood <nt_mahmood at yahoo.com> wrote:
>
> Hi,
>
> How can I see the code of a GPU kernel named
> nbnxn_kernel_ElecEw_VdwLJCombLB_F_cuda?
>
> That exists in src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda.cu however, I can
> not find its implementation.
>
> Can someone help?
>
>
>
> Regards,
> Mahmood
> --
> 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/20190425/2c85440c/attachment.html>
More information about the gromacs.org_gmx-developers
mailing list