The problem of phase-noise compensation for correlated phase noise in coded multichannel optical transmission is investigated. To that end, a simple multichannel phase-noise model is considered and the maximum a posteriori detector for this model is approximated using two frameworks, namely factor graphs (FGs) combined with the sum-product algorithm (SPA), and a variational Bayesian (VB) inference method. The resulting pilot-aided algorithms perform iterative phase-noise compensation in cooperation with a decoder, using extended Kalman smoothing to estimate the a posteriori phase-noise distribution jointly for all channels. The system model and the proposed algorithms are verified using experimental data obtained from space-division multiplexed multicore-fiber transmission. Through Monte Carlo simulations, the algorithms are further evaluated in terms of phase-noise tolerance for coded transmission. It is observed that they significantly outperform the conventional approach to phase-noise compensation in the optical literature. Moreover, the FG/SPA framework performs similarly or better than the VB framework in terms of phase-noise tolerance of the resulting algorithms, for a slightly higher computational complexity.