ofiwg/libfabric — pull request #454 by sayantansur (2014-12-22 21:17:05+00:00)
Title: fabric: shared ctx across processes and threads

Apps may want to use shared contexts across processes within
a node, when number of processes > number contexts available.

Add a fi_sctx_attr structure (modeled after fi_av_attr) that allows the
processes to specify the name of a shared context and endpoints in the
node that might want to share the context. This will allow the provider
to size up the shared context appropriately.

Add a flag FI_SCTX_EXCL that allows a shared context to be created such
that multiple endpoints within a calling process may use the context. This
allows the provider to utilize the declared threading model to determine
where the serialization occurs. i.e. a shared context within a process
does not need provider level locking if FI_THREAD_PROGRESS (or
FI_THREAD_DOMAIN) is used.

Signed-off-by: Sayantan Sur