Does MPI use ASIO?
Hello everyone, Does the new MPI Library use ASIO for its network ops? Thanks, Jeff
Hi Jeff, On Apr 1, 2008, at 4:46 PM, Jeff wrote:
Does the new MPI Library use ASIO for its network ops?
No, Boost.Mpi requires the use of an MPI implementation such as Openmpi, Lam, Mpich and will not work without one. Note that ASIO has no mechanism to communicate across box (this is what MPI does), ASIO handles asynchronous communication within a box. -- Noel
On Tue, 01 Apr 2008 17:05:17 -0600, K. Noel Belcourt wrote:
Note that ASIO has no mechanism to communicate across box (this is what MPI does), ASIO handles asynchronous communication within a box.
Really? This is news to me... Has ASIO changed after inclusion into Boost? I used it to implement a prototype distributed computing system... Or maybe I misunderstand "within/across a box". -- Sohail Somani http://uint32t.blogspot.com
On Apr 1, 2008, at 6:18 PM, Sohail Somani wrote:
On Tue, 01 Apr 2008 17:05:17 -0600, K. Noel Belcourt wrote:
Note that ASIO has no mechanism to communicate across box (this is what MPI does), ASIO handles asynchronous communication within a box.
Really? This is news to me... Has ASIO changed after inclusion into Boost? I used it to implement a prototype distributed computing system...
Or maybe I misunderstand "within/across a box".
Oh, I'm probably wrong. I understood ASIO to provide asychronous IO but now that I look more closely at the documentation, I see this. Portable networking, including sockets, timers, hostname resolution and socket iostreams. So it appears you could implement MPI on top of ASIO. My bad. -- Noel
On Wed, 02 Apr 2008 03:39:31 +0200, K. Noel Belcourt <kbelco@sandia.gov> wrote:
[...]Oh, I'm probably wrong. I understood ASIO to provide asychronous IO but now that I look more closely at the documentation, I see this.
Portable networking, including sockets, timers, hostname resolution and socket iostreams.
So it appears you could implement MPI on top of ASIO. My bad.
I don't know MPI but indeed Boost.Asio is extensible: You can create services and add them to the core I/O service object in Boost.Asio. There is not really a step-by-step tutorial how to do this but with some trial and error and looking at existing source code (in Boost.Asio and examples) it works. In fact it would be nice if these services are collected somewhere (but then again I don't kow if there are so many services developed anyway). Boris
[...]Oh, I'm probably wrong. I understood ASIO to provide asychronous IO but now that I look more closely at the documentation, I see this.
Portable networking, including sockets, timers, hostname resolution and socket iostreams.
So it appears you could implement MPI on top of ASIO. My bad.
I don't know MPI but indeed Boost.Asio is extensible: You can create services and add them to the core I/O service object in Boost.Asio. There is not really a step-by-step tutorial how to do this but with some trial and error and looking at existing source code (in Boost.Asio and examples) it works. In fact it would be nice if these services are collected somewhere (but then again I don't kow if there are so many services developed anyway).
I'ld rather like to see Asio implemented on top of MPI. Regards Hartmut
Hartmut Kaiser wrote:
[...]Oh, I'm probably wrong. I understood ASIO to provide asychronous IO but now that I look more closely at the documentation, I see this.
Portable networking, including sockets, timers, hostname resolution and socket iostreams.
So it appears you could implement MPI on top of ASIO. My bad.
I don't know MPI but indeed Boost.Asio is extensible: You can create services and add them to the core I/O service object in Boost.Asio. There is not really a step-by-step tutorial how to do this but with some trial and error and looking at existing source code (in Boost.Asio and examples) it works. In fact it would be nice if these services are collected somewhere (but then again I don't kow if there are so many services developed anyway).
I'ld rather like to see Asio implemented on top of MPI.
How would that be? It seems that Asio is more low-level and generic and MPI, so implementing Asio on top of MPI is not possible. - Volodya
Volodya,
I'ld rather like to see Asio implemented on top of MPI.
How would that be? It seems that Asio is more low-level and generic and MPI, so implementing Asio on top of MPI is not possible.
What I meant is to implement Asio on top of the (highly efficient) MPI transport layer. Asio currently supports the IP protocol only, where MPI gives you access to a whole bunch of different network implementations (Myrinet etc.). Do I misunderstand something? Regards Hartmut
On Wed, 02 Apr 2008 15:35:26 +0200, Hartmut Kaiser <hartmut.kaiser@gmail.com> wrote:
Volodya,
I'ld rather like to see Asio implemented on top of MPI.
How would that be? It seems that Asio is more low-level and generic and MPI, so implementing Asio on top of MPI is not possible.
What I meant is to implement Asio on top of the (highly efficient) MPI transport layer. Asio currently supports the IP protocol only, where MPI gives you access to a whole bunch of different network implementations (Myrinet etc.). Do I misunderstand something?
Boost.Asio currently supports only network I/O out of the box. However it can be extended to support any asynchronous I/O operations. For example I have created a file monitor which I can plug into a Boost.Asio I/O core service. If a file changes then a handler is called. Thus it's the same concept as used by the network services (which are really the only services provided by Boost.Asio today and which made me also wonder some time ago why this library isn't simply called Boost.Net). Boris
"Boris" <boriss@web.de> wrote in message news:op.t8zlazpz9dsao3@burk...
Boost.Asio currently supports only network I/O out of the box. However it can be extended to support any asynchronous I/O operations. For example I have created a file monitor which I can plug into a Boost.Asio I/O core service. If a file changes then a handler is called. Thus it's the same concept as used by the network services (which are really the only services provided by Boost.Asio today and which made me also wonder some time ago why this library isn't simply called Boost.Net).
Boris
Hello Boris, I am very interested in the file monitor you have created. Would you mind sharing it as an advanced usage example of Asio? Maybe I have misunderstood something, but it looks to me as if Asio contains an asynchronous event model that can be used for *any* type of event. Not just IO-based. Can you say that this is the case? -- Daniel
On Wed, Apr 2, 2008 at 4:53 PM, Daniel Lidström <daniel.lidstrom@sbg.se> wrote:
Hello Boris,
I am very interested in the file monitor you have created. Would you mind sharing it as an advanced usage example of Asio?
Is the file monitor a wrapper for inotify (in Linux) ? Daniel, I asked Boris for it but got no reply. regards jose
On Thu, 03 Apr 2008 15:22:50 +0200, Jose <jmalv04@gmail.com> wrote:
On Wed, Apr 2, 2008 at 4:53 PM, Daniel Lidström <daniel.lidstrom@sbg.se> wrote:
Hello Boris,
I am very interested in the file monitor you have created. Would you mind sharing it as an advanced usage example of Asio?
Is the file monitor a wrapper for inotify (in Linux) ?
The file monitor only works on Windows currently. I only created the file monitor for testing purposes as I'm more interested in other I/O operations. The service implementation (in a file called file_monitor_impl.hpp) can be ported though to another operation system. There is currently only Windows code (and even this is rather rudimentary; I didn't bother about the file monitor anymore once I had learned how to plug it into Boost.Asio). Boris
Hello, This is kind of newbie question. Any help would be greatly appreciated :). I'd like to map (SourceClass_i) list to (DestClass_i) list in the way that for any instance of SourceClass_i passed to the mapping expression, an instance of DestClass_i will be created and the result of the expression would be of type DestClass_i. I defined the mapping as follows: typedef mpl::map< mpl::pair<SourceClass1, DestClass1>, mpl::pair<SourceClass2, DestClass2> //, etc...> source2dest; Now I guess I have to take the result of mpl::at<source2dest, SourceClass> and apply kind of: template<typename DestClass> struct Creator{ static DestClass create() { return *new DestClass; } }; ...but unfortunately the things don't come together. Thank you in advance! _________________________________________________________________ Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us
AMDG Igor Rubinov wrote:
Hello,
This is kind of newbie question. Any help would be greatly appreciated :).
I'd like to map (SourceClass_i) list to (DestClass_i) list in the way that for any instance of SourceClass_i passed to the mapping expression, an instance of DestClass_i will be created and the result of the expression would be of type DestClass_i.
I defined the mapping as follows:
typedef mpl::map< mpl::pair<SourceClass1, DestClass1>, mpl::pair<SourceClass2, DestClass2> //, etc...
source2dest;
Now I guess I have to take the result of mpl::at<source2dest, SourceClass> and apply kind of:
template<typename DestClass> struct Creator { static DestClass create() { return *new DestClass; } };
...but unfortunately the things don't come together.
Thank you in advance!
How do you intend to use this. Creator<mpl::at<source2dest, SourceClass1>::type>::create()? Can you be more specific about the problem. What you have ought to work (Almost. create should say return DestClass(), otherwise you have a memory leak) In Christ, Steven Watanabe
Steven Watanabe wrote:
How do you intend to use this.> > Creator<mpl::at<source2dest, SourceClass1>::type>::create()?
Well, actually it was based on this discussion: http://lists.boost.org/Archives/boost/2003/11/55640.php It seems that the thing I'm trying to elaborate is a bit similar to what was done there.
Can you be more specific about the problem. What you have ought to work
Some objects in my program exchange "message" objects. Some of such message receivers are state-machines (based on Boost.Statechart) which states should be affected by the messages. For this purpose I'd like these messages to be "converted" to (or "wrapped" by) event objects...
(Almost. create should say return DestClass(), otherwise you have a memory leak)
yes, sure! just forgot to modify the copy&pasted text from the above example :) _________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE
On Wed, 02 Apr 2008 16:53:09 +0200, Daniel Lidström <daniel.lidstrom@sbg.se> wrote: Daniel,
[...]I am very interested in the file monitor you have created. Would you mind sharing it as an advanced usage example of Asio?
Maybe I have misunderstood something, but it looks to me as if Asio contains an asynchronous event model that can be used for *any* type of event. Not just IO-based. Can you say that this is the case?
yes, this is true! There is not much documentation though to learn how to create services for Boost.Asio. I got some help from Christoph and tried to understand the code in Boost.Asio. I didn't want to create a file monitor originally but as it's a rather simple service it was a good test to see if I understood everything. :) As it is a rather simple service it might be a good reference implementation for others though. I uploaded the file monitor now to http://www.highscore.de/boost/file_monitor.zip The zip archive contains a README file where I wrote down everything I learned about Boost.Asio services and what might be helpful for others to know when they start to create their own services. Hope it helps, Boris
Christopher, If it is not too much to ask, it might be a good idea to add this to your "examples" section. If it is somehow not desirable for copyright or whatever other reason, you could create "contrib" folder where stuff like this would be going, and so it will not be lost in the long run. Alternatively (but, imho, much less desirable) is to have link to this file from documentation, so people will have some sort of reference without need to dig through mail archive. just my 2 cents (cad) Best regards, Andrey On Thu, 03 Apr 2008 08:32:28 -0600, Boris <boriss@web.de> wrote:
On Wed, 02 Apr 2008 16:53:09 +0200, Daniel Lidström <daniel.lidstrom@sbg.se> wrote:
Daniel,
[...]I am very interested in the file monitor you have created. Would you mind sharing it as an advanced usage example of Asio?
Maybe I have misunderstood something, but it looks to me as if Asio contains an asynchronous event model that can be used for *any* typeof event. Not just IO-based. Can you say that this is the case?
yes, this is true! There is not much documentation though to learn how to create services for Boost.Asio. I got some help from Christoph and tried to understand the code in Boost.Asio. I didn't want to create a file monitor originally but as it's a rather simple service it was a good test to see if I understood everything. :) As it is a rather simple service it might be a good reference implementation for others though.
I uploaded the file monitor now to http://www.highscore.de/boost/file_monitor.zip
The zip archive contains a README file where I wrote down everything I learned about Boost.Asio services and what might be helpful for others to know when they start to create their own services.
Hope it helps, Boris
"Boris" <boriss@web.de> wrote...
yes, this is true! There is not much documentation though to learn how to create services for Boost.Asio. I got some help from Christoph and tried to understand the code in Boost.Asio. I didn't want to create a file monitor originally but as it's a rather simple service it was a good test to see if I understood everything. :) As it is a rather simple service it might be a good reference implementation for others though.
I uploaded the file monitor now to http://www.highscore.de/boost/file_monitor.zip
The zip archive contains a README file where I wrote down everything I learned about Boost.Asio services and what might be helpful for others to know when they start to create their own services.
Thanks a lot Boris! -- Daniel
Hartmut Kaiser wrote:
Volodya,
I'ld rather like to see Asio implemented on top of MPI.
How would that be? It seems that Asio is more low-level and generic and MPI, so implementing Asio on top of MPI is not possible.
What I meant is to implement Asio on top of the (highly efficient) MPI transport layer. Asio currently supports the IP protocol only, where MPI gives you access to a whole bunch of different network implementations (Myrinet etc.). Do I misunderstand something?
It seems to me that Asio is a general framework for all things async, with TCP being the only concrete thing implemented right now. Then, unless MPI has an comparable framework, you cannot implement Asio on top of MPI. Unless "implement Asio on top of MPI" means "add support for Myrinet in Asio" :-) - Volodya
Hartmut Kaiser [hartmut.kaiser@gmail.com] wrote:
What I meant is to implement Asio on top of the (highly efficient) MPI transport layer. Asio currently supports the IP protocol only, where MPI gives you access to a whole bunch of different network implementations (Myrinet etc.). Do I misunderstand something?
Regards Hartmut
ASIO provides low-level access to the network. You can implement any TCP/IP or UDP/IP protocol using ASIO. You could, for example, write a web browser or ftp client that uses ASIO for its network communications. In fact, I seem to recall a library that does exactly that. MPI is a protocol. Specifically, it provides message passing for distributed computing. Because of MPI's structure, it is not possible to implement an arbitrary protocol like HTTP or FTP using MPI.
participants (13)
-
Andrew Holden
-
Andrey Tcherepanov
-
Boris
-
Daniel Lidström
-
Hartmut Kaiser
-
Igor R.
-
Igor Rubinov
-
Jeff
-
Jose
-
K. Noel Belcourt
-
Sohail Somani
-
Steven Watanabe
-
Vladimir Prus