[gmx-developers] combine neighborlist

Szilárd Páll pall.szilard at gmail.com
Wed Jul 8 01:07:54 CEST 2015


On Wed, Jul 8, 2015 at 12:39 AM, Sikandar Mashayak <mashayak at votca.org>
wrote:

> Hi,
>
> I am trying to understand how a SIMD-based kernel distributes the work
> across OpenMP threads. I found that, given n threads, n neighborlists are
> built, each OpenMP thread is assigned a neighborlist and for each
> neighborlist outer and inner loop computations are performed using SIMD
> instructions.
>
> My question is, whether building n neibhorlists and assigning 1 list to
> each thread is same (from performance considerations) as creating 1
> neighborlist and dividing i-clusters among n threads (nci/n per thread)?
>

Not exactly. Lists are of different length and when N lists are produced
for N non-bonded compute tasks, the search tries to generated balanced
work. Splitting using the simple static nci/N formula will give imbalanced
chunks of work.

You never said what are you trying to accomplish, how are you going to use
the single 4x4 list? You may be able to avoid some pitfalls by sharing the
bigger picture.

--
Szilárd


> Thanks,
> Sikandar
>
> On Tue, Jun 30, 2015 at 1:57 PM, Sikandar Mashayak <mashayak at votca.org>
> wrote:
>
>> Thanks Szilard,
>>
>> Yeah, I guess with some coding merging neighborlists into a single simple
>> CPU-style list is possible. For now, I am manually setting number of
>> neighborlist to 1 independent of openmp threads.
>>
>> Thanks,
>> Sikandar
>>
>> On Wed, Jun 24, 2015 at 8:00 PM, Szilárd Páll <pall.szilard at gmail.com>
>> wrote:
>>
>>> Hi,
>>>
>>> I think it should be supported if not out of the box, perhaps with
>>> small code changes. I know we have discussed decoupling the search
>>> form the force compute to allow executing them on different number of
>>> executors/tasks. Also, I'm not entirely sure if the implementation
>>> allows searchig on N tasks and merging simple CPU-style lists into a
>>> single list output.
>>>
>>> Try looking into the nbnxn_init_pairlist_set() function which gets
>>> passed a boolean that tells whether to combine lists or not.
>>>
>>> Note that you can control the number of tasks (=OpenMP threads) in
>>> different parts of the code through the gmx_omp module which reads
>>> environment variables in the form of GMX_*_NUM_THREADS.
>>>
>>> Cheers,
>>> --
>>> Szilárd
>>>
>>>
>>> On Thu, Jun 25, 2015 at 1:06 AM, Sikandar Mashayak <mashayak at votca.org>
>>> wrote:
>>> > Hi,
>>> >
>>> > I want to use pairlist with M = 4 and N = 4 i and j cluster sizes. I
>>> > understand, that with OpenMP threads enabled, gromacs builds ntomp,
>>> i.e.,
>>> > nthreads, neighborlists. I understand, for 8*8*8 kernel type, these
>>> > neighborlists are combined and superclusters are built.
>>> >
>>> > I am wondering, is there a way to combine all the nthreads
>>> neighborlist into
>>> > one for simple 4*4 type neighborlist?
>>> >
>>> > Thanks,
>>> > Sikandar
>>> >
>>> > --
>>> > 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.
>>> --
>>> 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.
>>
>>
>>
>
> --
> 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/20150707/0da134fb/attachment.html>


More information about the gromacs.org_gmx-developers mailing list