1. A computer system comprising: a plurality of logical partitions defined on a plurality of nodes; and a dynamic partition manager that manages allocation of a plurality of resources on the plurality of nodes to the plurality of logical partitions, the dynamic partition manager comprising a memory affinity computation mechanism that computes memory affinity for a selected logical partition based on a hardware domain hierarchy in the computer system, the hardware domain hierarchy including at least one primary domain and at least one secondary domain, wherein the memory affinity computation mechanism computes memory affinity for the computer system by computing a raw score for each logical partition based on a spread type related to the hardware domain hierarchy, multiplying the raw score by at least one adjustment factor to generate an adjusted score, and summing the adjusted scores for the plurality of logical partitions.