Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

Subject: Re: [OMPI devel] event library
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2009-04-03 09:10:27


Correct. We use the event library (a customized drop of libevent) for
three main things:

1. monitoring file descriptors
2. scheduling timed callbacks (i.e., you can set a callback to fire at
some point in the future)
3. monitoring signals

You can register a callback to occur when these events happen. For
signals, your callback will be called in regular context, not signal
context.

Orte uses #2 heavily, for example, to "schedule" things to happen
outside of the current context. E.g., a message just arrived. But we
don't want to process it in the middle of a callback from the fd read
event, so ORTE will schedule an event 0 seconds from now. That
callback will then occur from the "top level" and not create a nasty
daisy chain of callbacks invoking callbacks. And so on.

Make sense?

On Apr 3, 2009, at 6:36 AM, Timothy Hayes wrote:

> Do you mean the code in OPAL/event? If so, it's a customised
> libevent. I've seen it used in OpenMPI to poll/select open sockets,
> it allows the programmer register their own callback functions for
> when this happens. Just ignore me if this wasn't what you were
> asking about though :-)
>
> Tim
>
> 2009/4/3 Eugene Loh <Eugene.Loh_at_[hidden]>
> What is the purpose of the event library? I'd happily RTFM if
> someone could point me in that direction! :^)
>
> I'm guessing it's to check occasionally for "unexpected events", but
> if someone could confirm/deny and flesh that picture out a little,
> I'd appreciate it.
> _______________________________________________
> devel mailing list
> devel_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/devel
>
>
> _______________________________________________
> devel mailing list
> devel_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/devel

-- 
Jeff Squyres
Cisco Systems