C++ DCI implementation of Monte Carlo techniques

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

C++ DCI implementation of Monte Carlo techniques

Gleb Averchuk
Hello.

This spring, I've met with the paradigm of DCI, after reading http://www.artima.com/articles/dci_vision.html article, as well as saw some presentations, and code examples. I really liked this new approach. As far as I understand, one of DCI features - what you can first write the serial algorithm (which is expressed in the Roles are used) and then write new Roles using the technology of parallel programming. However, the code will be clear and clean...

I tried to apply the DCI, when I started working on some project. The purpose of my project - modeling of chemical processes on the catalyst surface. Modeling is carried out using the Monte Carlo method, implemented by various existing algorithms of this method in order to compare their performance. My result can be found here: https://github.com/newmen/monte-carlo_techs. I think that I got is not very good because a lot of logic is concentrated in the Contexts of modeling, and code uses very little Roles. Correct implementation of existing Roles - is questionable, since I sometimes use a partial template specification.
At the moment there is only a serial version of the program. I want to use OpenMP for parallelize my program, and to compare the performance of existing algorithms working in parallel. But unfortunately, I do not know how to implement it in terms of DCI. I would be very grateful if you could look at what I got, and advised me how to improve the code, more correctly applying the paradigm of DCI.

Thanks for your attention. %)

--
Regards, Gleb Averchuk

Reply | Threaded
Open this post in threaded view
|

Re: C++ DCI implementation of Monte Carlo techniques

Sean P. DeNigris
Administrator
Gleb Averchuk wrote
My result can be found here:
https://github.com/newmen/monte-carlo_techs.
Hi Gleb. This mailing list is for developers of Squeak Smalltalk. Is there a connection between Squeak and your project? Or perhaps this is the wrong list...

Cheers,
Sean
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: C++ DCI implementation of Monte Carlo techniques

Hannes Hirzel
Sean,

the very interesting article
http://www.artima.com/articles/dci_vision.html Gleb mentions BabyIDE,
a demonstration of the DCI architecture
(http://en.wikipedia.org/wiki/Data,_Context,_and_Interaction) done in
Squeak by  Trygve Reenskaug, the father of MVC.

(recent post https://groups.google.com/forum/?fromgroups#!topic/object-composition/sKnGrkYz3Mk[1-25]
)

The question raised is on the design level and as such does not have
to do with Smalltalk coding only, e.g.
http://www.fulloo.info/Examples/

So maybe the question may be put that way how to apply the DCI
approach  (http://heim.ifi.uio.no/~trygver/themes/babyide/baby-documents.html
) successfully be it in Smalltalk/Squeak or another OO language?

Any contributions?

--Hannes

On 8/13/12, Sean P. DeNigris <[hidden email]> wrote:

>
> Gleb Averchuk wrote
>>
>> My result can be found here:
>> https://github.com/newmen/monte-carlo_techs.
>
> Hi Gleb. This mailing list is for developers of Squeak Smalltalk. Is there
> a
> connection between Squeak and your project? Or perhaps this is the wrong
> list...
>
> Cheers,
> Sean
>
>
>
> --
> View this message in context:
> http://forum.world.st/C-DCI-implementation-of-Monte-Carlo-techniques-tp4643879p4643952.html
> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>
>

Reply | Threaded
Open this post in threaded view
|

Re: C++ DCI implementation of Monte Carlo techniques

Hannes Hirzel
P.S.
 the article states
"but in spite of capturing structure, OO fails to capture behavior"

--HJH

On 8/13/12, H. Hirzel <[hidden email]> wrote:

> Sean,
>
> the very interesting article
> http://www.artima.com/articles/dci_vision.html Gleb mentions BabyIDE,
> a demonstration of the DCI architecture
> (http://en.wikipedia.org/wiki/Data,_Context,_and_Interaction) done in
> Squeak by  Trygve Reenskaug, the father of MVC.
>
> (recent post
> https://groups.google.com/forum/?fromgroups#!topic/object-composition/sKnGrkYz3Mk[1-25]
> )
>
> The question raised is on the design level and as such does not have
> to do with Smalltalk coding only, e.g.
> http://www.fulloo.info/Examples/
>
> So maybe the question may be put that way how to apply the DCI
> approach
> (http://heim.ifi.uio.no/~trygver/themes/babyide/baby-documents.html
> ) successfully be it in Smalltalk/Squeak or another OO language?
>
> Any contributions?
>
> --Hannes
>
> On 8/13/12, Sean P. DeNigris <[hidden email]> wrote:
>>
>> Gleb Averchuk wrote
>>>
>>> My result can be found here:
>>> https://github.com/newmen/monte-carlo_techs.
>>
>> Hi Gleb. This mailing list is for developers of Squeak Smalltalk. Is
>> there
>> a
>> connection between Squeak and your project? Or perhaps this is the wrong
>> list...
>>
>> Cheers,
>> Sean
>>
>>
>>
>> --
>> View this message in context:
>> http://forum.world.st/C-DCI-implementation-of-Monte-Carlo-techniques-tp4643879p4643952.html
>> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: C++ DCI implementation of Monte Carlo techniques

Gleb Averchuk
In reply to this post by Sean P. DeNigris
Hello again.

Hannes right.
I've written here, because on the page of the great Trygve M.H. Reenskaug (http://folk.uio.no/trygver/) says about this community, and that this community talking about DCI. I decided to write here because I don't known another communities where people know how to use DCI approach.

понедельник, 13 августа 2012 г. пользователь Sean P. DeNigris писал:

Gleb Averchuk wrote
>
> My result can be found here:
> https://github.com/newmen/monte-carlo_techs.

Hi Gleb. This mailing list is for developers of Squeak Smalltalk. Is there a
connection between Squeak and your project? Or perhaps this is the wrong
list...

Cheers,
Sean



--
View this message in context: http://forum.world.st/C-DCI-implementation-of-Monte-Carlo-techniques-tp4643879p4643952.html
Sent from the Squeak - Dev mailing list archive at Nabble.com.



Reply | Threaded
Open this post in threaded view
|

Re: C++ DCI implementation of Monte Carlo techniques

Sean P. DeNigris
Administrator
Gleb Averchuk wrote
I've written here, because on the page of the great Trygve M.H. Reenskaug (
http://folk.uio.no/trygver/) says about this community, and that this
community talking about DCI. I decided to write here because I don't known
another communities where people know how to use DCI approach.
Great, thanks for the clarification.
Cheers,
Sean