Assign thread ID to each node in list

We now assign thread ID to each node in list for the 1D partitioning
solution.