Parallel hierarchical linear solvers and fast multipole methods with applications