Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: [OMPI devel] Manipulating OPAL event system
From: Timothy Hayes (hayesti_at_[hidden])
Date: 2009-03-11 20:31:36

Hi everyone,

I'm currently writing my own BTL component that utilises a lightweight Linux
socket module. It wouldn't have nearly as much functionality as a TCP/IP
socket but it does the job and I managed to add a simple polling function
into the module, it sleeps for whatever amount of time is entered in user
space then checks various things (if any messages have come in) and returns
the mask. It's simple and probably not the best, but it works for the
moment. :-)

I'm curious as to how I can can get this into the OPAL event system. I see
it's based on libevent and after reading through the documentation I can see
what it does but now how to make it work in my circumstance. It says it
supports select(2) and poll(2) but when calling event_set() the only
parameter I seem to be able to set is EV_READ or EV_WRITE, there's nothing
further to indicate I want to poll the file descriptor (as opposed to
calling select on it). Maybe I'm missing something without realising, but
should my socket module be implementing some function to reveal what ways it
can be queried for the presence of information? If not, maybe somebody has
an idea of how I can make it work with the OPAL event system.

Any advice or information would be greatly appreciated.

Kind regards
Tim Hayes