Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] Replacing poll()
From: Alex Margolin (alex.margolin_at_[hidden])
Date: 2012-03-02 14:22:09


On 03/02/2012 04:33 PM, Jeffrey Squyres wrote:
> Note that the OMPI 1.4.x series is about to be retired. If you're doing new stuff, I'd advise you to be working with the Open MPI SVN trunk. In the trunk, we've changed how we build libevent, so if you're adding to it, you probably want to be working there for max forward-compatibility.
>
> That being said:
>
>> I know trying to replace poll() seems like I'm doing something very wrong, but I want to poll on events without a valid linux file descriptor (and existing events, specifically sockets, at the same time), and I see no other way. Obviously, my poll2 calls the linux poll in most cases.
> What exactly are you trying to do? OMPI has some internal hooks for non-fd-or-event-based progress. Indeed, libevent is typically called with fairly low frequency (e.g., if you're running with OpenFabrics or some other high-speed/not-fd-based networking interconnect).
I'm trying to create a new btl module. I've written an adapter from my
library to TCP, so I've implemented socket/connect/accept/send/recv...
now I've taken the TCP BTL module and cloned it - replacing the relevant
calls with mine. My only problem is with poll, which is not in the MCA
(at least in 1.4.x).
I've implemented poll() and select() but it's not that good, because my
events are not based on valid linux file descriptors, but I can poll all
my events at the same time (but not in conjunction with real FDs,
unfortunatly).
Can you give me some pointers as to where to look in the MPI (1.5?)
source code to implement it properly?

Thanks,
Alex