This paper addresses the problem of gravity inversion to determine the 3D basement relief of sedimentary basins. It is a nonlinear optimization problem where the gravity anomalies attributable to basement interfaces above which the density contrast varies continuosly with the depth are analyzed. We use the Levenberg-Marquardt (LM) algorithm which needs a key input parameter called the regularization parameter λ to deal with the singularity of the normal equation matrix in the linearized problem at each iteration. The generalized cross-validation (GCV) and Regińska’s methods for estimating the optimal regularization parameter are tested through numerical experiments on a synthetic data set. Also, we implemented the LM algorithm with a hybrid message passing interface (MPI) and Open Multi-Processing (OpenMP) approach to avoid the high proccesing time. This lead to a fast and reliable algorithm, which produced satisfactory results in mapping the basement topography.