Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] about btl/scif thread cancellation (#4616 / r31738)
From: Gilles Gouaillardet (gilles.gouaillardet_at_[hidden])
Date: 2014-05-14 11:03:53


Nathan,

> Looks like this is a scif bug. From the documentation:

and from the source code, scif_poll(...) simply calls poll(...)

at least in MPSS 2.1

> Since that is not the case I will look through the documentation and see

if there is a way other than pthread_cancel.

what about :

- use a global variable (a boolean called "close_requested")

- update the scif thread so it checks close_requested after each scif_poll,

and exits if true

- when closing btl/scif :

 * set close_requested to true

 * scif_connect to myself

 * close this connection

 * pthread_join(...)

that's a bit heavyweight, but it does the job

( and we keep an infinite timeout for scif_poll() so overhead at runtime is
null)

i can test this approach from tomorrow if needed

Gilles