[Developers] A possible GPU project

Matthew Supernaw matthew.supernaw at noaa.gov
Sun Apr 8 19:21:14 PDT 2012


Yeah... I see what your saying! Looks like it might work if you just run the j loop in parallel. 

 

On Apr 8, 2012, at 3:00 PM, developers-request at admb-project.org wrote:

> Send Developers mailing list submissions to
>    developers at admb-project.org
> 
> To subscribe or unsubscribe via the World Wide Web, visit
>    http://lists.admb-project.org/mailman/listinfo/developers
> or, via email, send a message with subject or body 'help' to
>    developers-request at admb-project.org
> 
> You can reach the person managing the list at
>    developers-owner at admb-project.org
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Developers digest..."
> 
> 
> Today's Topics:
> 
>   1. A possible GPU project (Matthew Supernaw)
>   2. Re: A possible GPU project (dave fournier)
>   3. Re: A possible GPU project (dave fournier)
>   4. trying a new quasi newton method which might be good    for GPU
>      calculations. (dave fournier)
>   5. Re: trying a new quasi newton method which might be good    for
>      GPU calculations. (dave fournier)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Sat, 7 Apr 2012 22:15:15 -0400
> From: Matthew Supernaw <matthew.supernaw at noaa.gov>
> To: "developers at admb-project.org" <developers at admb-project.org>
> Subject: [Developers] A possible GPU project
> Message-ID: <E2B4E23A-AB66-40A8-84DF-4CCFB18551D6 at noaa.gov>
> Content-Type: text/plain;    charset=us-ascii
> 
> 
> Dave, 
> Great idea! Would you use opencl or cuda? I believe double precision is a add on for opencl, not sure about cuda.
> Matthew
> 
> 
> 
> On Apr 6, 2012, at 3:00 PM, developers-request at admb-project.org wrote:
> 
>> A possible GPU project
> 
> 
> ------------------------------
> 
> Message: 2
> Date: Sun, 08 Apr 2012 07:32:24 -0700
> From: dave fournier <davef at otter-rsch.com>
> To: developers at admb-project.org
> Subject: Re: [Developers] A possible GPU project
> Message-ID: <4F81A178.7030601 at otter-rsch.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> 
> 
> On 12-04-07 07:15 PM, Matthew Supernaw wrote:
> 
> 
> Unfortunately looking at the code in newfmin.cpp more carefully the
> main o(n^2) loop does not look parallelizable.
> 
> 
>    int iu=n;
>    int iv=2*n;
>    int ib=3*n;
>    for (int j=2;j<=n;j++)
>    {
>       double * pd=&(h.elem(j,1));
>       double * qd=&(w.elem(iu+j));
>       double * rd=&(w.elem(iv+1));
>       double * sd=&(w.elem(ib+1));
>       for (int i=1;i<j;i++)
>       {
>          *qd-=*pd * *rd++;
>          *pd++ +=*sd++ * *qd;
>       }
>    }
> 
> 
> 
> 
> 
> 
> 
> 
>> Dave,
>> Great idea! Would you use opencl or cuda? I believe double precision is a add on for opencl, not sure about cuda.
>> Matthew
>> 
>> 
>> 
>> On Apr 6, 2012, at 3:00 PM, developers-request at admb-project.org wrote:
>> 
>>> A possible GPU project
>> _______________________________________________
>> Developers mailing list
>> Developers at admb-project.org
>> http://lists.admb-project.org/mailman/listinfo/developers
>> 
> 
> 
> 
> ------------------------------
> 
> Message: 3
> Date: Sun, 08 Apr 2012 07:52:55 -0700
> From: dave fournier <davef at otter-rsch.com>
> To: developers at admb-project.org
> Subject: Re: [Developers] A possible GPU project
> Message-ID: <4F81A647.4050401 at otter-rsch.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> 
> On 12-04-07 07:15 PM, Matthew Supernaw wrote:
> 
> However there are other quasi newton approaches that look parallelizable.
> 
> As usual what we need is existing code that can just be plugged in rather
> than trying to reinvent this wheel.
> 
> 
> 
> 
> 
>> Dave,
>> Great idea! Would you use opencl or cuda? I believe double precision is a add on for opencl, not sure about cuda.
>> Matthew
>> 
>> 
>> 
>> On Apr 6, 2012, at 3:00 PM, developers-request at admb-project.org wrote:
>> 
>>> A possible GPU project
>> _______________________________________________
>> Developers mailing list
>> Developers at admb-project.org
>> http://lists.admb-project.org/mailman/listinfo/developers
>> 
> 
> 
> 
> ------------------------------
> 
> Message: 4
> Date: Sun, 08 Apr 2012 11:25:50 -0700
> From: dave fournier <davef at otter-rsch.com>
> To: "'developers at admb-project.org'" <developers at admb-project.org>
> Subject: [Developers] trying a new quasi newton method which might be
>    good    for GPU calculations.
> Message-ID: <4F81D82E.1050503 at otter-rsch.com>
> Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
> 
> There is a quasi newton minimizer in the GSL.  It appears to use the 
> BLAS for the
> vector matrix calculations involved in the quasi newton calcs.  That 
> could lead to an
> easy path for using a GPU.  I wrote a little test program to see how it 
> works.
> 
> The next step is to interface it with the autodif stuff to compare it to 
> the code in newfmin
> using automatic differentiation. That should not be very hard.  I hope 
> it doesn't suck.
> 
> example is attached.
> 
> I trust this is more interesting than discussions on organizing organizing.
> 
> 
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: testmin.cpp
> Type: text/x-c++src
> Size: 2549 bytes
> Desc: not available
> URL: <http://lists.admb-project.org/pipermail/developers/attachments/20120408/dec8e2c1/attachment-0001.cpp>
> 
> ------------------------------
> 
> Message: 5
> Date: Sun, 08 Apr 2012 11:32:53 -0700
> From: dave fournier <davef at otter-rsch.com>
> To: developers at admb-project.org
> Subject: Re: [Developers] trying a new quasi newton method which might
>    be good    for GPU calculations.
> Message-ID: <4F81D9D5.1050109 at otter-rsch.com>
> Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
> 
> On 12-04-08 11:25 AM, dave fournier wrote:
> 
> There is one gotcha with the newer versions of gcc
> For some reason you can get unsatisfied references in the gls stuff. To 
> fix this
> you need to use a linker option --no-as-needed. to pass this option 
> using the gcc shell
> you need to use the -Xlinker flag as in
> 
> 
>    -Xlinker --no-as-needed -lgsl -lgslcblas
> 
> 
> 
> 
> 
>> There is a quasi newton minimizer in the GSL.  It appears to use the 
>> BLAS for the
>> vector matrix calculations involved in the quasi newton calcs.  That 
>> could lead to an
>> easy path for using a GPU.  I wrote a little test program to see how 
>> it works.
>> 
>> The next step is to interface it with the autodif stuff to compare it 
>> to the code in newfmin
>> using automatic differentiation. That should not be very hard.  I hope 
>> it doesn't suck.
>> 
>> example is attached.
>> 
>> I trust this is more interesting than discussions on organizing 
>> organizing.
>> 
>> 
>> 
>> _______________________________________________
>> Developers mailing list
>> Developers at admb-project.org
>> http://lists.admb-project.org/mailman/listinfo/developers
> 
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.admb-project.org/pipermail/developers/attachments/20120408/e6f54e70/attachment-0001.html>
> 
> ------------------------------
> 
> _______________________________________________
> Developers mailing list
> Developers at admb-project.org
> http://lists.admb-project.org/mailman/listinfo/developers
> 
> 
> End of Developers Digest, Vol 38, Issue 10
> ******************************************


More information about the Developers mailing list