[Developers] multi-threaded derivative stuff
Hans J. Skaug
Hans.Skaug at math.uib.no
Tue Jul 24 06:21:08 PDT 2012
Dave,
Can you repeat some of the basics here, before going in technical detail?
What I recall from discussion in Santa Barbara (and afterwards) is that
OpenMP uses multi-threading but we faced difficulties for the reasons
you mention. For this reason, and the fact that we wanted to run
on clusters, we went for MPI (under which we have a working prototype).
Hans
>-----Original Message-----
>From: developers-bounces at admb-project.org [mailto:developers-
>bounces at admb-project.org] On Behalf Of dave fournier
>Sent: Sunday, July 22, 2012 7:49 PM
>To: developers at admb-project.org
>Subject: [Developers] multi-threaded derivative stuff
>
>Hi All,
>
>I recall that at the developers conference over a year ago there was a
>lot of
>interest in multi-threading so long as no one actually had to produce
>anything.
>It appeared that global variables might be a problem. I thought it
>might be
>of value to produce a proof of concept example with multi-threading for
>dvariable types. The code runs without any reported errors
>(by valgrind) so I think I am getting close. There are also some
>strange mysteries.
>
>If I write the code as
>
> master()
> {
> // stuff
> gradient_structure gs(10000)
> // stuff
>
>
> }
>
> slave()
> {
> // stuff
> gradient_structure gs(10000)
> // stuff
>
> }
>
>There are some obvious problems when the destructor for gs gets called.
>But if I write the code as
>
>master()
> {
> // stuff
> gradient_structure * pgs = new gradient_structure(10000)
> // stuff
> delete pgs;
> pgs=0;
>
> }
>
> slave()
> {
> // stuff
> gradient_structure * pgs = new gradient_structure(10000)
> // stuff
> delete pgs;
> pgs=0;
> }
>
>all is OK. So obviously there is something I don't understand or still
>an error in the code.
>If anyone is interested I am happy to share the code and the problem.
>I'll hold my
>breath.
>
> Dave
>
>_______________________________________________
>Developers mailing list
>Developers at admb-project.org
>http://lists.admb-project.org/mailman/listinfo/developers
More information about the Developers
mailing list