Orthogonal frequency division multiplexing (OFDM) with dynamic resource allocation is widely considered to be a key component of most emerging broadband wireless access networks. However, resource allocation in an OFDM system is complicated, especially in the uplink due to the heterogeneity of the users' subchannel conditions, individual resource constraints and application requirements. We formulate the resource allocation problem as a convex optimization problem, which has a unique optimal objective value but might have multiple corresponding optimal solutions. We then present a primal-dual based algorithm that is distributed, low complexity, and is provably global convergent to the optimal solutions. The convergence and optimality of the algorithm is studied through a realistic OFDM simulator.