Abstract : We consider a multiple access relay channel (MARC), in which a relay, based on the recently proposed compute-and-forward protocol, helps two transmitters to communicate with a common destination. The relay decodes a linear combination of the received symbols instead of the individual symbols then forwards the new symbol to the destination. The destination recovers two linear equations from the decoded signals. The two equations relate the transmitted symbols with integer coefficients at different computational rates. We propose an iterative algorithm to optimize the integer coefficients and the power allocation at the transmitters alternatively, so that the sum-rate is maximized. In each iteration, the integer coefficients are updated by solving a mixed-integer quadratic programming (MIQP) problem with quadratic constraints, while the power allocation is updated by solving a series of geometric programs using a successive convex approximation method. The simulation results show that the compute-and-forward strategy and the proposed optimization method can offer substantial gain over the standard amplify-and-forward and decode-and-forward protocols for this model.