Sensitivity analysis plays an important role in searching for constitutive parameters (e.g. permeability) subsurface flow simulations. The mathematics behind is to solve a dynamic constrained optimization problem. Traditional methods like finite difference and forward sensitivity analysis require computational cost that increases linearly with the number of parameters times number of cost functions. Discrete adjoint sensitivity analysis (SA) is gaining popularity due to its computational efficiency. This algorithm requires a forward run followed by a backward run who involves integrating adjoint equation backward in time. This was done by doing one forward solve and store the snapshot by checkpointing. Using the checkpoint data, the adjoint equation is numerically integrated. The computational cost of this algorithm only depends on the number of cost functions and does not depend on the number of parameters. The algorithm is highly powerful when the parameter space is large, and in our case of heterogeneous permeability the number of parameters is proportional to the number of grid cells. The aim of this project is to implement the discrete sensitivity analysis method in parallel to solve realistic subsurface problems. To achieve this goal, we propose to implement the algorithm in parallel using data structures such as TSAdjoint and TAO. This paper dealt with large-scale subsurface flow inversion problem with discrete adjoint method. This method can effectively reduce the computational cost in sensitivity analysis.