Software and algorithms for large-scale seismic inverse problems