<div dir="ltr"><div class="gmail_extra"><div><div class="gmail_signature">On Mon, Dec 14, 2015 at 4:50 PM, Vedran Miletić <span dir="ltr"><<a href="mailto:rivanvx@gmail.com" target="_blank">rivanvx@gmail.com</a>></span> wrote:<br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Excellent. This segfaults on my Caicos (probably due to missing<br>
atomics), and runs correctly on my Bonaire. Tonga is completely broken<br>
at the moment [1].<br>
<br>
I will try to modify this example to make it fail instruction<br>
selection like GROMACS does.<br></blockquote><div><br></div><div>Strange that it segfaults, that would mean that it generated code which should not happen if the instruction is not supported, should it?</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
Regards,<br>
Vedran<br>
<br>
[1] <a href="https://bugs.freedesktop.org/show_bug.cgi?id=93264" rel="noreferrer" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=93264</a><br>
<div class=""><div class="h5"><br>
2015-12-14 14:37 GMT+01:00 Szilárd Páll <<a href="mailto:pall.szilard@gmail.com">pall.szilard@gmail.com</a>>:<br>
> Hi,<br>
><br>
> Last night I grabbed a trivial OpenCL sample code that does vector addition<br>
> (source [1]) and threw in an atomic add on floats: <a href="https://pastee.org/8jtbj" rel="noreferrer" target="_blank">https://pastee.org/8jtbj</a><br>
> Would this work as a starting point?<br>
><br>
> If this is too trivial, one option for extending it is to e.g. generate a<br>
> trivial neighbor list (e.g. a random list of index pairs into a coordinate<br>
> array) that the kernel looks over and calculate a distance (or some simple<br>
> pair potential-like function).<br>
><br>
> Cheers,<br>
> --<br>
> Szilárd<br>
><br>
> [1] <a href="https://www.olcf.ornl.gov/tutorials/opencl-vector-addition/#vecAdd.c" rel="noreferrer" target="_blank">https://www.olcf.ornl.gov/tutorials/opencl-vector-addition/#vecAdd.c</a><br>
><br>
><br>
> On Thu, Dec 10, 2015 at 4:56 PM, Szilárd Páll <<a href="mailto:pall.szilard@gmail.com">pall.szilard@gmail.com</a>><br>
> wrote:<br>
>><br>
>> Vedran,<br>
>><br>
>> Unfortunately, don't think I will have enough time at least in the coming<br>
>> 1-2 weeks. I could help composing the kernel, but that's likely going to be<br>
>> little effort and I am quite inexperienced with OpenCL, especially with the<br>
>> API "glue" code needed to just have a small test kernel running.<br>
>><br>
>> I could pith in with putting together the kernel, but if the goal is to<br>
>> have a simple test for global memory atomic addition on floats, perhaps the<br>
>> best idea is to strip down an SDK example* like a float vector addition (or<br>
>> reduction) and replace the regular global memory writes with the<br>
>> atomicAdd_g_f() function implemented in<br>
>> src/gromacs/mdlib/nbnxn_ocl/vectype_ops.clh.<br>
>><br>
>><br>
>> * Both the AMD SDK and NVIDIA's ancient OpenCL SDK should have ready code,<br>
>> but having checked briefly, a slight stripping down may be needed to remove<br>
>> certain optimizations and avoid utility functions.<br>
>><br>
>> Cheers,<br>
>> --<br>
>> Szilárd<br>
>><br>
>> On Wed, Dec 9, 2015 at 10:30 AM, Vedran Miletić <<a href="mailto:rivanvx@gmail.com">rivanvx@gmail.com</a>> wrote:<br>
>>><br>
>>> 2015-12-04 18:13 GMT+01:00 Szilárd Páll <<a href="mailto:pall.szilard@gmail.com">pall.szilard@gmail.com</a>>:<br>
>>> > Sounds good, is there anything on our side we can help with?<br>
>>> ><br>
>>> > Cheers,<br>
>>> ><br>
>>> > --<br>
>>> > Szilárd<br>
>>> ><br>
>>><br>
>>> Szilard,<br>
>>><br>
>>> actually, there is something that would be very useful, as I am<br>
>>> struggling with testing my changes at the moment. It would be great to<br>
>>> have minimal self-contained OpenCL example programs covering a<br>
>>> spectrum of features we use. As a start, I could use a minimal atomic<br>
>>> compare and swap example that would crash in the same way GROMACS does<br>
>>> now.<br>
>>><br>
>>> LLVM requires tests for all patches [1]. So I would certainly reuse<br>
>>> these.<br>
>>><br>
>>> Is this doable? I can try to make them myself, but you mentioned you<br>
>>> are familiar with the code so I'm hoping you could make them quicker.<br>
>>><br>
>>> Regards,<br>
>>> Vedran<br>
>>><br>
>>> [1] <a href="http://llvm.org/docs/DeveloperPolicy.html" rel="noreferrer" target="_blank">http://llvm.org/docs/DeveloperPolicy.html</a><br>
>>><br>
>>> --<br>
>>> Vedran Miletić<br>
>>> <a href="http://vedranmileti.ch/" rel="noreferrer" target="_blank">http://vedranmileti.ch/</a><br>
>>> --<br>
>>> Gromacs Developers mailing list<br>
>>><br>
>>> * Please search the archive at<br>
>>> <a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List" rel="noreferrer" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a> before<br>
>>> posting!<br>
>>><br>
>>> * Can't post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" rel="noreferrer" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br>
>>><br>
>>> * For (un)subscribe requests visit<br>
>>> <a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers" rel="noreferrer" target="_blank">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a><br>
>>> or send a mail to <a href="mailto:gmx-developers-request@gromacs.org">gmx-developers-request@gromacs.org</a>.<br>
>><br>
>><br>
><br>
><br>
> --<br>
> Gromacs Developers mailing list<br>
><br>
> * Please search the archive at<br>
> <a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List" rel="noreferrer" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a> before<br>
> posting!<br>
><br>
> * Can't post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" rel="noreferrer" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br>
><br>
> * For (un)subscribe requests visit<br>
> <a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers" rel="noreferrer" target="_blank">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a> or<br>
> send a mail to <a href="mailto:gmx-developers-request@gromacs.org">gmx-developers-request@gromacs.org</a>.<br>
<br>
<br>
<br>
--<br>
Vedran Miletić<br>
<a href="http://vedranmileti.ch/" rel="noreferrer" target="_blank">http://vedranmileti.ch/</a><br>
--<br>
Gromacs Developers mailing list<br>
<br>
* Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List" rel="noreferrer" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a> before posting!<br>
<br>
* Can't post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" rel="noreferrer" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br>
<br>
* For (un)subscribe requests visit<br>
<a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers" rel="noreferrer" target="_blank">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a> or send a mail to <a href="mailto:gmx-developers-request@gromacs.org">gmx-developers-request@gromacs.org</a>.</div></div></blockquote></div><br></div></div>