Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: [OMPI devel] Thread/Process affinity for Mac OS X
From: Tim Mattox (timattox_at_[hidden])
Date: 2008-12-12 11:21:17

I just ran across this document from Apple that describes
the Thread affinity scheme that was added in Leopard.

In its current form, and how orteds start the MPI ranks with exec,
we can't use this, AFAIK. However, if someone cares, there
might be a path for doing MPI process affinity on Mac OS X
with quite a bit of work. Let me know if you have the
time & interest, and I can explain my idea on how to do it.

For the curious, here is the key text extracted from that document:
"Generally, the affinity tag namespace is private to one task
(process). However, a child process forked after its parent has made a
THREAD_AFFINITY_POLICY call will share the affinity namespace of the
parent process. This enables a family of forked processes to share an
affinity namespace despite comprising separate tasks. Moreover, the
forked child inherits the affinity tag of its parent. Hence, a parent
can seed a number of child processes within an arbitrary organization
of shared affinity sets. Note: affinity namespace inheritance is
destroyed by the exec(3) system call, however."

It's that last sentence about exec(3) that makes things (very) difficult
for us.

Tim Mattox, Ph.D. -
 tmattox_at_[hidden] || timattox_at_[hidden]
    I'm a bright...