affinity Simple C++ function for determining Linux thread affinity. There are examples for OpenMP and MPI+OpenMP.