A branch for ADMB Thread development is available <div><br></div><div>$ svn checkout <a href="http://www.admb-project.org/svn/branches/threaded2">http://www.admb-project.org/svn/branches/threaded2</a></div><div>$ make linux</div>
<div>$ make tests</div><div><br></div><div>If you would like to work together, please let me know.</div><div><br></div><div>Johnoel</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Dec 4, 2012 at 8:39 AM, Matthew Supernaw <span dir="ltr"><<a href="mailto:matthew.supernaw@noaa.gov" target="_blank">matthew.supernaw@noaa.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><br></div><div>So I just tried the threading example and it worked. </div><div> </div>
<div>A couple of questions:</div><div><br></div><div>1. What are the consequences for modifying the copy constructor to make a deep copy(i'm sure there are many)? </div><div><br></div><div>2. Can "send_xxx_to_slave" be replaced with a deep copy function?</div>
<div><br></div><div>For instance:</div><div><br></div><div>df1b2variable DeepCopy(const df1b2variable &x){</div><div>return deep_copy_of_x;</div><div>}</div><div><br></div><div><br></div><div>class ADMBThread{</div><div>
public:</div><div><br></div><div> df1b2variable x;</div><div><br></div><div><br></div><div>virtual void Run(){</div><div>do something to x….</div><div>}</div><div><br></div><div>};</div><div><br></div><div><br></div><div>
int main(){</div><div> df1b2variable x = rand();</div><div> ADMBThread thread;</div><div><br></div><div> thread.x = DeepCopy(x);</div><div><br></div><div> thread.Start();</div><div><br></div><div>}</div><div><br>
</div><div><br></div><div>Thanks.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Matthew</div></font></span><div><div class="h5"><div><br></div><div><br></div><div><br>
</div>
<br><div><div>On Dec 4, 2012, at 9:19 AM, Matthew Supernaw wrote:</div><br><blockquote type="cite"><div style="word-wrap:break-word"><div><br></div><div>Dave, </div><div><br></div><div>You are correct, I didn't review your example code. I'll take a look.</div>
<div><br></div><div>Thanks for the architectural overview. It would be convenient if this information was recorded in software design document. </div><div><br></div><div><br></div><div><br></div><div><pre style="line-height:normal;text-indent:0px;letter-spacing:normal;text-align:-webkit-auto;font-variant:normal;text-transform:none;font-style:normal;white-space:pre-wrap;font-weight:normal;word-spacing:0px">
"I guess you didn't bother wasting your time looking at my example for
dvariables.
The big problem with these objects is not some trivial locking in the
constructor etc.
It comes from the fact that the data structure which store all the
information for
multiple levels of reverse AD are not thread safe. If you are doing
df1b2variable
arithmetic each thread needs its own copy of these."
</pre></div><div><br></div><div><div>On Dec 3, 2012, at 2:39 PM, <a href="mailto:developers-request@admb-project.org" target="_blank">developers-request@admb-project.org</a> wrote:</div><br><blockquote type="cite"><div>Send Developers mailing list submissions to<br>
<span style="white-space:pre-wrap"> </span><a href="mailto:developers@admb-project.org" target="_blank">developers@admb-project.org</a><br><br>To subscribe or unsubscribe via the World Wide Web, visit<br><span style="white-space:pre-wrap"> </span><a href="http://lists.admb-project.org/mailman/listinfo/developers" target="_blank">http://lists.admb-project.org/mailman/listinfo/developers</a><br>
or, via email, send a message with subject or body 'help' to<br><span style="white-space:pre-wrap"> </span><a href="mailto:developers-request@admb-project.org" target="_blank">developers-request@admb-project.org</a><br>
<br>You can reach the person managing the list at<br><span style="white-space:pre-wrap"> </span><a href="mailto:developers-owner@admb-project.org" target="_blank">developers-owner@admb-project.org</a><br><br>When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Developers digest..."<br><br><br>Today's Topics:<br><br> 1. Re: admb threading (Matthew Supernaw)<br><br><br>----------------------------------------------------------------------<br>
<br>Message: 1<br>Date: Mon, 3 Dec 2012 14:29:01 -0500<br>From: Matthew Supernaw <<a href="mailto:matthew.supernaw@noaa.gov" target="_blank">matthew.supernaw@noaa.gov</a>><br>To: <a href="mailto:developers@admb-project.org" target="_blank">developers@admb-project.org</a><br>
Subject: Re: [Developers] admb threading<br>Message-ID: <<a href="mailto:C8E76651-698E-4D98-A995-40A2F259B069@noaa.gov" target="_blank">C8E76651-698E-4D98-A995-40A2F259B069@noaa.gov</a>><br>Content-Type: text/plain; charset="us-ascii"<br>
<br><br>Perhaps making admb type containers thread safe is a good place to start. This would make it easier to modify admb internally as well as allow end users to make their own applications concurrent.<br><br>I've started working on this issue for one of our staff. After profiling his model, I found nearly 70-80% of the runtime was in his user_function looping through a df1b2matrix and doing operations on its elements. In this particular case,<br>
admb is quite fast and is really just waiting for user_function evaluations(nested for loops). This is the perfect location for multi-threading.<br><br><br>At the moment I'm working on a thread safe wrapper for df1b2matrix in order to speed up this particular model. This should be all that is needed for this particular case, but I suspect this cause may be a common.<br>
<br><br>Attached is a simple platform independent threading library. <br><br><br>My strategy for making df1b2matrix thread safe is to wrap it as follows:<br><br><br> 11 #include <admodel.h><br> 12 #include "Threads.hpp"<br>
13 <br> 14 <br> 15 namespace admb {<br> 16<br>17 class ts_df1b2matrix {<br> 18 <br> 19 int allocated(void) {<br> 20 noaa::threads::Lock(mutex_);<br> 21 df1b2matrix_.allocated();<br> 22 }<br>
23 <br> 24 void initialize(void) {<br> 25 noaa::threads::Lock(mutex_);<br> 26 df1b2matrix_.initialize();<br> 27 <br> 28 }<br> 29 <br> 30 ~ts_df1b2matrix() {<br> 31 noaa::threads::Lock(mutex_);<br>
32 ~df1b2matrix_;<br> 33 }<br> 34 <br> 35 int rowmin(void) const {<br> 36 noaa::threads::Lock(mutex_);<br> 37 df1b2matrix_.rowmin();<br> 38 }<br> 39 <br> 40 int indexmin(void) const {<br>
41 noaa::threads::Lock(mutex_);<br> 42 df1b2matrix_.indexmin();<br> 43 }<br> 44 <br> 45 int indexmax(void) const {<br> 46 noaa::threads::Lock(mutex_);<br> 47 df1b2matrix_.indexmax();<br>
48 }<br> 49 <br> 50 int rowmax(void) const {<br> 51 noaa::threads::Lock(mutex_);<br> 52 df1b2matrix_.rowmax();<br> 53 }<br> 54 <br> 55 int size(void) const {<br> 56 noaa::threads::Lock(mutex_);<br>
57 df1b2matrix_.size();<br> 58 }<br> 59 <br> 60 ts_df1b2matrix(int nrl, int nrh) {<br> 61 noaa::threads::Lock(mutex_);<br> 62 df1b2matrix_(nrl, nrh);<br> 63 }<br>
64 <br> 65 ts_df1b2matrix(const df1b2matrix &other) {<br> 66 noaa::threads::Lock(mutex_);<br> 67 df1b2matrix_(other);<br> 68 }<br> 69 <br> 70 ts_df1b2matrix(const ts_df1b2matrix &other) {<br>
71 noaa::threads::Lock(mutex_);<br> 72 noaa::threads::Lock2(other.mutex_);<br> 73 df1b2matrix_(other.df1b2matrix_);<br> 74 }<br> 75 <br> 76 ts_df1b2matrix(int nrl, int nrh, const index_type &ncl, const index_type &nch) {<br>
77 noaa::threads::Lock(mutex_);<br> 78 df1b2matrix(nrl, nrh, ncl, nch);<br> 79 }<br> 80 <br> 81 ts_df1b2matrix& operator=(const df3_one_matrix &other) {<br> 82 noaa::threads::Lock(mutex_);<br>
83 this->df1b2matrix_ = other;<br> 84 }<br> 85 <br>.<br>.<br>.<br>.<br><br>162 <br>163 private:<br>164 mutable noaa::threads::Mutex mutex_;<br>165 df1b2matrix df1b2matrix_;<br>
166 <br>167 <br>168 };<br><br><br>The call "noaa::threads::Lock(mutex_); " will lock the function and then unlock it as it goes out of scope.<br>I'll be happy to pass the finished product for review.<br>
<br><br><br><br><br><br><br><br><br><br>Matthew Supernaw<br>Scientific Programmer<br>National Oceanic and Atmospheric Administration<br>National Marine Fisheries Service<br>Sustainable Fisheries Division<br>St. Petersburg, FL, 33701<br>
Office <a href="tel:727-551-5606" value="+17275515606" target="_blank">727-551-5606</a><br>Fax <a href="tel:727-824-5300" value="+17278245300" target="_blank">727-824-5300</a><br><br>On Nov 29, 2012, at 3:00 PM, <a href="mailto:developers-request@admb-project.org" target="_blank">developers-request@admb-project.org</a> wrote:<br>
<br><blockquote type="cite">Send Developers mailing list submissions to<br></blockquote><blockquote type="cite"><span style="white-space:pre-wrap"> </span><a href="mailto:developers@admb-project.org" target="_blank">developers@admb-project.org</a><br>
</blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">To subscribe or unsubscribe via the World Wide Web, visit<br></blockquote><blockquote type="cite"><span style="white-space:pre-wrap"> </span><a href="http://lists.admb-project.org/mailman/listinfo/developers" target="_blank">http://lists.admb-project.org/mailman/listinfo/developers</a><br>
</blockquote><blockquote type="cite">or, via email, send a message with subject or body 'help' to<br></blockquote><blockquote type="cite"><span style="white-space:pre-wrap"> </span><a href="mailto:developers-request@admb-project.org" target="_blank">developers-request@admb-project.org</a><br>
</blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">You can reach the person managing the list at<br></blockquote><blockquote type="cite"><span style="white-space:pre-wrap"> </span><a href="mailto:developers-owner@admb-project.org" target="_blank">developers-owner@admb-project.org</a><br>
</blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">When replying, please edit your Subject line so it is more specific<br></blockquote><blockquote type="cite">than "Re: Contents of Developers digest..."<br>
</blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Today's Topics:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> 1. Re: admb threading (Mark Maunder)<br>
</blockquote><blockquote type="cite"> 2. Re: admb threading (dave fournier)<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">----------------------------------------------------------------------<br>
</blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Message: 1<br></blockquote><blockquote type="cite">Date: Thu, 29 Nov 2012 17:50:41 +0000<br></blockquote><blockquote type="cite">From: Mark Maunder <<a href="mailto:mmaunder@iattc.org" target="_blank">mmaunder@iattc.org</a>><br>
</blockquote><blockquote type="cite">To: dave fournier <<a href="mailto:davef@otter-rsch.com" target="_blank">davef@otter-rsch.com</a>>,<br></blockquote><blockquote type="cite"><span style="white-space:pre-wrap"> </span>"<a href="mailto:developers@admb-project.org" target="_blank">developers@admb-project.org</a>"<span style="white-space:pre-wrap"> </span><<a href="mailto:developers@admb-project.org" target="_blank">developers@admb-project.org</a>><br>
</blockquote><blockquote type="cite">Subject: Re: [Developers] admb threading<br></blockquote><blockquote type="cite">Message-ID:<br></blockquote><blockquote type="cite"><span style="white-space:pre-wrap"> </span><<a href="mailto:339913E1960AE142A9373DFCD849F3DA325FA148@mail1.lajolla.iattc.org" target="_blank">339913E1960AE142A9373DFCD849F3DA325FA148@mail1.lajolla.iattc.org</a>><br>
</blockquote><blockquote type="cite">Content-Type: text/plain; charset="us-ascii"<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">What about the calculation of the hessian, which can be quite long on parameter rich models.<br>
</blockquote><blockquote type="cite">Profile likelihoods would also be another easy one <br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">-----Original Message-----<br>
</blockquote><blockquote type="cite">From: <a href="mailto:developers-bounces@admb-project.org" target="_blank">developers-bounces@admb-project.org</a> [mailto:<a href="mailto:developers-bounces@admb-project.org" target="_blank">developers-bounces@admb-project.org</a>] On Behalf Of dave fournier<br>
</blockquote><blockquote type="cite">Sent: Thursday, November 29, 2012 9:26 AM<br></blockquote><blockquote type="cite">To: <a href="mailto:developers@admb-project.org" target="_blank">developers@admb-project.org</a><br></blockquote>
<blockquote type="cite">Subject: Re: [Developers] admb threading<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">On 12-11-29 09:11 AM, Hans J. Skaug wrote:<br></blockquote><blockquote type="cite">
<br></blockquote><blockquote type="cite">The obvious transparent one is the -ndb (num der blocks) which was already set up for mult-threading, and I recall Derek was doing something with that, but I never heard about it again, and it is not for separable models. For separable models one could split up the separable function calls by different threads in a transparent manner. Both of these involve using the __thread declaration to deal with some global data structures. The real point of my proof of concept example was to demonstrate that this can be done quite easily.<br>
</blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite">Both are useful, but currently "transparent to the user" is the most important.<br>
</blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">hans<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">
<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">-----Original Message-----<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">
From: <a href="mailto:developers-bounces@admb-project.org" target="_blank">developers-bounces@admb-project.org</a> [mailto:<a href="mailto:developers-" target="_blank">developers-</a> <br></blockquote></blockquote></blockquote>
<blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><a href="mailto:bounces@admb-project.org" target="_blank">bounces@admb-project.org</a>] On Behalf Of Mark Maunder<br></blockquote></blockquote></blockquote>
<blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Sent: Thursday, November 29, 2012 8:23 AM<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">
To: John Sibert; ADMB Developers<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Subject: Re: [Developers] admb threading<br></blockquote></blockquote></blockquote>
<blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">parallel code that is "transparent" to the user<br>
</blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">
-----Original Message-----<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">From: <a href="mailto:developers-bounces@admb-project.org" target="_blank">developers-bounces@admb-project.org</a> [mailto:<a href="mailto:developers-" target="_blank">developers-</a> <br>
</blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><a href="mailto:bounces@admb-project.org" target="_blank">bounces@admb-project.org</a>] On Behalf Of John Sibert<br>
</blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Sent: Wednesday, November 28, 2012 4:30 PM<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">
<blockquote type="cite">To: ADMB Developers<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Subject: [Developers] admb threading<br></blockquote></blockquote>
</blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Johnoel and I need some feedback about how to approach threading. <br>
</blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Dave has provided a nice proof of concept using pthreads to implement <br></blockquote></blockquote></blockquote>
<blockquote type="cite"><blockquote type="cite"><blockquote type="cite">parallel processing on larger chunks of code. This approach is likely <br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">
<blockquote type="cite">to have the biggest performance improvement, but seems application <br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">specific and would require more expertize on the part of users.<br>
</blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">
Alternatively it is possible to implement threading internally in the <br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">ADMB libraries, concentrating on smaller chunks of code, for instance <br>
</blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">the solve(...) function. This approach would probably have smaller <br></blockquote></blockquote></blockquote>
<blockquote type="cite"><blockquote type="cite"><blockquote type="cite">performance payoff in most applications, but would be more transparent to users.<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">
<blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">In principle, the two approaches are not mutually exclusive.<br></blockquote></blockquote>
</blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">So my question to the ADMB Developer group is what did we mean when <br>
</blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">we assigned a high priority to parallelization? Do we want parallel <br></blockquote></blockquote></blockquote>
<blockquote type="cite"><blockquote type="cite"><blockquote type="cite">code that is "transparent" to the user (if so what parts of the would <br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">
<blockquote type="cite">have the highest priority)? Or do we want to develop tools that allow <br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">users to create their on threaded code for specific applications? <br>
</blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">(Don't tell me both.)<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">
<blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Cheers,<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">
<blockquote type="cite">John<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">PS enjoy the attached.<br></blockquote></blockquote></blockquote><blockquote type="cite">
<blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">--<br></blockquote></blockquote></blockquote><blockquote type="cite">
<blockquote type="cite"><blockquote type="cite">John Sibert<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Emeritus Researcher, SOEST<br></blockquote></blockquote>
</blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">University of Hawaii at Manoa<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">
<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Visit the ADMB project <a href="http://admb-project.org/" target="_blank">http://admb-project.org/</a><br>
</blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">
_______________________________________________<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Developers mailing list<br></blockquote></blockquote></blockquote>
<blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><a href="mailto:Developers@admb-project.org" target="_blank">Developers@admb-project.org</a><br></blockquote></blockquote></blockquote><blockquote type="cite">
<blockquote type="cite"><blockquote type="cite"><a href="http://lists.admb-project.org/mailman/listinfo/developers" target="_blank">http://lists.admb-project.org/mailman/listinfo/developers</a><br></blockquote></blockquote>
</blockquote><blockquote type="cite"><blockquote type="cite">_______________________________________________<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Developers mailing list<br></blockquote>
</blockquote><blockquote type="cite"><blockquote type="cite"><a href="mailto:Developers@admb-project.org" target="_blank">Developers@admb-project.org</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">
<a href="http://lists.admb-project.org/mailman/listinfo/developers" target="_blank">http://lists.admb-project.org/mailman/listinfo/developers</a><br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">
_______________________________________________<br></blockquote><blockquote type="cite">Developers mailing list<br></blockquote><blockquote type="cite"><a href="mailto:Developers@admb-project.org" target="_blank">Developers@admb-project.org</a><br>
</blockquote><blockquote type="cite"><a href="http://lists.admb-project.org/mailman/listinfo/developers" target="_blank">http://lists.admb-project.org/mailman/listinfo/developers</a><br></blockquote><blockquote type="cite">
<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">------------------------------<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Message: 2<br></blockquote>
<blockquote type="cite">Date: Thu, 29 Nov 2012 09:53:45 -0800<br></blockquote><blockquote type="cite">From: dave fournier <<a href="mailto:davef@otter-rsch.com" target="_blank">davef@otter-rsch.com</a>><br></blockquote>
<blockquote type="cite">To: Mark Maunder <<a href="mailto:mmaunder@iattc.org" target="_blank">mmaunder@iattc.org</a>><br></blockquote><blockquote type="cite">Cc: "<a href="mailto:developers@admb-project.org" target="_blank">developers@admb-project.org</a>" <<a href="mailto:developers@admb-project.org" target="_blank">developers@admb-project.org</a>><br>
</blockquote><blockquote type="cite">Subject: Re: [Developers] admb threading<br></blockquote><blockquote type="cite">Message-ID: <<a href="mailto:50B7A129.5030200@otter-rsch.com" target="_blank">50B7A129.5030200@otter-rsch.com</a>><br>
</blockquote><blockquote type="cite">Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">On 12-11-29 09:50 AM, Mark Maunder wrote:<br>
</blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">The biggest improvement to the profile likelihood would be to replace <br></blockquote><blockquote type="cite">the current<br></blockquote><blockquote type="cite">
penalty function method with the augmented Lagrangian.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite">What about the calculation of the hessian, which can be quite long on parameter rich models.<br>
</blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Profile likelihoods would also be another easy one<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote>
<blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">-----Original Message-----<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">
From: <a href="mailto:developers-bounces@admb-project.org" target="_blank">developers-bounces@admb-project.org</a> [mailto:<a href="mailto:developers-bounces@admb-project.org" target="_blank">developers-bounces@admb-project.org</a>] On Behalf Of dave fournier<br>
</blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Sent: Thursday, November 29, 2012 9:26 AM<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">To: <a href="mailto:developers@admb-project.org" target="_blank">developers@admb-project.org</a><br>
</blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Subject: Re: [Developers] admb threading<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote>
<blockquote type="cite"><blockquote type="cite">On 12-11-29 09:11 AM, Hans J. Skaug wrote:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite">
<blockquote type="cite">The obvious transparent one is the -ndb (num der blocks) which was already set up for mult-threading, and I recall Derek was doing something with that, but I never heard about it again, and it is not for separable models. For separable models one could split up the separable function calls by different threads in a transparent manner. Both of these involve using the __thread declaration to deal with some global data structures. The real point of my proof of concept example was to demonstrate that this can be done quite easily.<br>
</blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">
<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Both are useful, but currently "transparent to the user" is the most important.<br></blockquote></blockquote>
</blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">hans<br></blockquote>
</blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">
-----Original Message-----<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">From: <a href="mailto:developers-bounces@admb-project.org" target="_blank">developers-bounces@admb-project.org</a> [mailto:<a href="mailto:developers-" target="_blank">developers-</a><br>
</blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><a href="mailto:bounces@admb-project.org" target="_blank">bounces@admb-project.org</a>] On Behalf Of Mark Maunder<br>
</blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Sent: Thursday, November 29, 2012 8:23 AM<br></blockquote></blockquote></blockquote>
</blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">To: John Sibert; ADMB Developers<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite">
<blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Subject: Re: [Developers] admb threading<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">
<blockquote type="cite"><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">parallel code that is "transparent" to the user<br>
</blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite">
<blockquote type="cite"><blockquote type="cite"><blockquote type="cite">-----Original Message-----<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">
<blockquote type="cite">From: <a href="mailto:developers-bounces@admb-project.org" target="_blank">developers-bounces@admb-project.org</a> [mailto:<a href="mailto:developers-" target="_blank">developers-</a><br></blockquote>
</blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><a href="mailto:bounces@admb-project.org" target="_blank">bounces@admb-project.org</a>] On Behalf Of John Sibert<br>
</blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Sent: Wednesday, November 28, 2012 4:30 PM<br></blockquote></blockquote></blockquote>
</blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">To: ADMB Developers<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">
<blockquote type="cite"><blockquote type="cite">Subject: [Developers] admb threading<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">
<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Johnoel and I need some feedback about how to approach threading.<br>
</blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Dave has provided a nice proof of concept using pthreads to implement<br>
</blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">parallel processing on larger chunks of code. This approach is likely<br>
</blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">to have the biggest performance improvement, but seems application<br></blockquote>
</blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">specific and would require more expertize on the part of users.<br></blockquote></blockquote>
</blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">
<blockquote type="cite"><blockquote type="cite">Alternatively it is possible to implement threading internally in the<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">
<blockquote type="cite"><blockquote type="cite">ADMB libraries, concentrating on smaller chunks of code, for instance<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">
<blockquote type="cite"><blockquote type="cite">the solve(...) function. This approach would probably have smaller<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">
<blockquote type="cite">performance payoff in most applications, but would be more transparent to users.<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">
<blockquote type="cite"><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">In principle, the two approaches are not mutually exclusive.<br>
</blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite">
<blockquote type="cite"><blockquote type="cite"><blockquote type="cite">So my question to the ADMB Developer group is what did we mean when<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">
<blockquote type="cite"><blockquote type="cite">we assigned a high priority to parallelization? Do we want parallel<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">
<blockquote type="cite">code that is "transparent" to the user (if so what parts of the would<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">
<blockquote type="cite">have the highest priority)? Or do we want to develop tools that allow<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">
<blockquote type="cite">users to create their on threaded code for specific applications?<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">
(Don't tell me both.)<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote></blockquote>
<blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Cheers,<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">
<blockquote type="cite">John<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">PS enjoy the attached.<br></blockquote></blockquote>
</blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">
<blockquote type="cite"><blockquote type="cite">--<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">John Sibert<br></blockquote>
</blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Emeritus Researcher, SOEST<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite">
<blockquote type="cite"><blockquote type="cite"><blockquote type="cite">University of Hawaii at Manoa<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">
<blockquote type="cite"><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Visit the ADMB project <a href="http://admb-project.org/" target="_blank">http://admb-project.org/</a><br>
</blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite">
<blockquote type="cite"><blockquote type="cite"><blockquote type="cite">_______________________________________________<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">
<blockquote type="cite"><blockquote type="cite">Developers mailing list<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">
<a href="mailto:Developers@admb-project.org" target="_blank">Developers@admb-project.org</a><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">
<a href="http://lists.admb-project.org/mailman/listinfo/developers" target="_blank">http://lists.admb-project.org/mailman/listinfo/developers</a><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite">
<blockquote type="cite"><blockquote type="cite">_______________________________________________<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Developers mailing list<br>
</blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><a href="mailto:Developers@admb-project.org" target="_blank">Developers@admb-project.org</a><br></blockquote></blockquote>
</blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><a href="http://lists.admb-project.org/mailman/listinfo/developers" target="_blank">http://lists.admb-project.org/mailman/listinfo/developers</a><br>
</blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">_______________________________________________<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Developers mailing list<br>
</blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="mailto:Developers@admb-project.org" target="_blank">Developers@admb-project.org</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">
<a href="http://lists.admb-project.org/mailman/listinfo/developers" target="_blank">http://lists.admb-project.org/mailman/listinfo/developers</a><br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">
<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">------------------------------<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">_______________________________________________<br>
</blockquote><blockquote type="cite">Developers mailing list<br></blockquote><blockquote type="cite"><a href="mailto:Developers@admb-project.org" target="_blank">Developers@admb-project.org</a><br></blockquote><blockquote type="cite">
<a href="http://lists.admb-project.org/mailman/listinfo/developers" target="_blank">http://lists.admb-project.org/mailman/listinfo/developers</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">
<br></blockquote><blockquote type="cite">End of Developers Digest, Vol 45, Issue 5<br></blockquote><blockquote type="cite">*****************************************<br></blockquote><br>-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>URL: <<a href="http://lists.admb-project.org/pipermail/developers/attachments/20121203/086c40d2/attachment.html" target="_blank">http://lists.admb-project.org/pipermail/developers/attachments/20121203/086c40d2/attachment.html</a>><br>
-------------- next part --------------<br>A non-text attachment was scrubbed...<br>Name: Threads.hpp<br>Type: application/octet-stream<br>Size: 27706 bytes<br>Desc: not available<br>URL: <<a href="http://lists.admb-project.org/pipermail/developers/attachments/20121203/086c40d2/attachment.obj" target="_blank">http://lists.admb-project.org/pipermail/developers/attachments/20121203/086c40d2/attachment.obj</a>><br>
-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: <<a href="http://lists.admb-project.org/pipermail/developers/attachments/20121203/086c40d2/attachment-0001.html" target="_blank">http://lists.admb-project.org/pipermail/developers/attachments/20121203/086c40d2/attachment-0001.html</a>><br>
<br>------------------------------<br><br>_______________________________________________<br>Developers mailing list<br><a href="mailto:Developers@admb-project.org" target="_blank">Developers@admb-project.org</a><br><a href="http://lists.admb-project.org/mailman/listinfo/developers" target="_blank">http://lists.admb-project.org/mailman/listinfo/developers</a><br>
<br><br>End of Developers Digest, Vol 46, Issue 3<br>*****************************************<br></div></blockquote></div><br></div></blockquote></div><br></div></div></div><br>_______________________________________________<br>
Developers mailing list<br>
<a href="mailto:Developers@admb-project.org">Developers@admb-project.org</a><br>
<a href="http://lists.admb-project.org/mailman/listinfo/developers" target="_blank">http://lists.admb-project.org/mailman/listinfo/developers</a><br>
<br></blockquote></div><br></div>