Abstract-We study how to appropriately match users for two-user cooperative-diversity (CD) systems deploying an optimal-power-allocation (OPA) strategy, considering both the amplify and forward and the regenerate and forward CD schemes. The OPA strategies, which can minimize the total energy consumption for the cooperating pair, are derived for both CD schemes. Then, we study the location of the optimal partner for a user and develop a novel nonbipartite stable matching algorithm with a performance that is very close to the optimal maximum weighted (MW) matching algorithm. The proposed matching algorithm is simple to implement, and its computational complexity is one order lower than that of the optimal MW matching algorithm. Numerical results show that with the OPA and the proposed matching algorithm, a 9∼10 dB CD gain can be achieved, which is equivalent to prolonging the cell-phone-battery recharge time by about ten times.Index Terms-Cooperative diversity (CD), matching algorithm, partner selection, power allocation, wireless networks.