SearcharxivSearch

arXiv subjects

Gustavo Ramirez-Hidalgo

Publications and source records attributed to Gustavo Ramirez-Hidalgo.

14 recordsLinked to original sources

An Integral-Based Framework for Preconditioning $f(A)b$

The computation of the action of a matrix function on a vector, $f(A)b$, is a major computational bottleneck for large, sparse matrices, particularly when unfavorable spectral distributions cause standard Krylov subspace methods to stagnate. In this work, we propose a unified framework for preconditioning $f(A)b$ based on the Cauchy integral representation of the matrix function. By exploiting shift-invariance properties, we decouple the preconditioner evaluation from the Krylov subspace generation. We develop this framework in two distinct directions. First, for rational shift-and-invert preconditioning, we resolve a fundamental trade-off between optimal spectral compression and finite-precision instability. We achieve this by formulating a closed-form extraction stabilized via Double Modified Gram-Schmidt reorthogonalization, which eliminates the formation of spurious phantom poles. Second, we present a matrix-free polynomial approach. To ensure numerical stability, we isolate the continuous numerical quadrature step using a Schur decomposition of the projected Hessenberg matrix. To further stabilize the integration near contour singularities and accelerate overall convergence, we incorporate an exact LR-deflation scheme targeting the critical low modes of the preconditioned operator. We analyze the asymptotic stability and proximity to singularity of these methods, and present numerical experiments demonstrating their efficiency on the 2D Laplacian with $f=\textrm{exp}$, and a highly ill-conditioned Wilson-Dirac operator from lattice quantum chromodynamics with $f=\textrm{sign}$, although the framework can be in principle used with any $f$ and it is particularly beneficial when applying $f(A)b_{i}$ with many different vectors $b_{i}$.

math.NA

Variance reduction with probing and Multilevel Monte Carlo in Lattice QCD

Trace estimation is central in many lattice QCD computations, but the accuracy of the standard, stochastic Hutchinson method improves only with the square root of the sample size, making precise results expensive. We investigate two complementary variance reduction strategies. First, multigrid multilevel Monte Carlo uses a multigrid hierarchy to construct an unbiased multilevel estimator via recursive coarse grid corrections available from the multigrid hierarchy of the solver. Second, stochastic probing uses distance-$d$ graph colorings; we propose a torus based coloring that requires substantially fewer colors than hierarchical probing at the same distance. We test these approaches on two representative problems: the connected pseudoscalar correlator and disconnected fermion loops. For the connected pseudoscalar two-point function, the multilevel decomposition yields a variance reduction of up to $\mathcal{O}(10^5)$ at large time separations and translates into a clear cost reduction at fixed accuracy, thus confirming earlier results of arXiv:2412.06347. For the disconnected loops, in contrast, the multilevel decomposition provides only moderate gains, whereas probing combined with dilution delivers a substantial cost reduction that improves as the number of probing vectors is increased. Overall, the results highlight a pronounced complementarity: deflation schemes are most effective for observables dominated by long distance propagation, while probing is most effective for localized quantities.

hep-lat

Exploiting Task-Based Parallelism for the Red-Black Gauss-Seidel Method on 2D Grids

Gauss-Seidel is a well-established iterative method for the solution of linear systems, and multicoloring has been widely used to increase parallelism in iterative solution techniques. Implementing multi-color Gauss-Seidel with conventional divide-and-conquer parallelization strategies, however, may be inefficient due to global synchronization requirements and load imbalances. Task-based programming models can mitigate these issues by enabling fine-grained parallelism, removing global barriers and allowing updates of different colors to partially overlap in time. In this work, we implement the red-black Gauss-Seidel method using two task-based programming models and compare them with a classical divide-and-conquer parallel implementation to evaluate the impact of fine-grained parallelism on execution efficiency. The red-black scheme serves as a representative example, as task-based approaches naturally extend to more general multi-color schemes arising from unstructured grids and wider stencils. Using the solve of the 2D Poisson equation as benchmark, our results show that task-based implementations can achieve performance comparable to conventional divide-and-conquer parallelization while providing greater resilience to hardware-level asynchronicity.

cs.DC

Probing and graph coloring techniques for trace estimation in Lattice QCD

The computation of $\mathrm{Tr}[D^{-1}]$, where $D$ is the Wilson-Dirac matrix of Lattice QCD, is a fundamental and computationally demanding task with applications to disconnected hadronic correlation functions. Since $D^{-1}$ is a dense matrix of prohibitive size, its trace cannot be computed exactly, and one must resort to stochastic estimation via the Hutchinson estimator. The variance of the resulting estimation, however, can be large, as it is dominated by the off-diagonal entries of $D^{-1}$. We review the stochastic probing technique, which reduces the variance by constructing structured sampling vectors from distance-$d$ colorings of the graph associated with $D$, exploiting the exponential off-diagonal decay of $D^{-1}$ to eliminate dominant short-range contributions to the variance. We then present a novel multiplier-based coloring scheme, which achieves valid distance-$d$ colorings at arbitrary distances with significantly fewer colors than the established hierarchical probing construction. We prove that at any intermediate coloring falling between two consecutive hierarchical levels, the multiplier-based estimator achieves strictly lower variance than the partial hierarchical estimator, for large enough $d$. This is confirmed by numerical experiments showing that the multiplier-based variance decreases smoothly and monotonically with the number of colors, avoiding the irregular behavior affecting hierarchical probing at intermediate colorings, and achieving a substantial improvement in relative accuracy.

hep-lat

Data-Driven Spectral Prediction for Accelerating Large-Scale Electronic Structure Calculations

Simulating large molecular systems comprising thousands of atoms requires highly scalable methodologies. While modern Density Functional Theory (DFT) codes exhibit linear scaling, solving the associated large, sparse generalized eigenproblems remains a critical computational bottleneck on exascale architectures. In the context of the LimitX project, we propose a data-driven framework to accelerate these calculations. By shifting the machine learning target from discrete eigenvalues to the coefficients of an interpolating Chebyshev polynomial, and by comparing both all-atom and fragment-based structural representations, we successfully overcome the dimensionality constraints of large-scale spectral prediction. We investigate three machine learning models (Kernel Ridge Regression, Graph Neural Networks, and Random Forests) trained on a novel 2 TB dataset of protein dimers. The predicted spectra provide initial guesses that effectively bypass early Self-Consistent Field (SCF) iterations in BigDFT. Ultimately, these spectral predictors will be deployed to dynamically optimize upcoming rational filter-based eigensolvers, such as FrASE, which is currently in initial development.

physics.comp-ph

Revisiting recursive methods for Dyson and Keldysh in NEGF: Part I

The simulation of quantum transport in nanodevices requires the solution of the Dyson and Keldysh equations, a task dominated by the inversion of massive, block-tridiagonal matrices. While the Recursive Green's Function (RGF) method has long been the standard $O(N)$ solver for quasi-1D systems, its formulation has typically been restricted to sequential execution and nearest-neighbor interactions. In this work, we carefully reformulate RGF through the lens of Domain Decomposition and Schur Complement theory. This allows us to extend the recursive formalism to block $n$-diagonal systems (handling higher-order stencils) and to derive a parallel algorithm, Domain-Decomposition based RGF (DDRGF), which stitches macroscopic domains via reduced interface systems. We explore data dependencies in DDRGF in detail, by means of block-sparse structures and tracing back to the desired output as a block tridiagonal approximation, giving a clear, reproducible and extensible formulation. We validate these algorithms using \texttt{LibNEGF.jl}, a Julia-based implementation, demonstrating that the structural insights of domain decomposition provide a robust pathway for high-performance quantum transport simulations on modern multi-core clusters. The theory presented here lays down the base for tackling the Keldysh problem, to be similarly handled in future stages of our work. Although the target here is the acceleration of kernels in the non-equilibrium Green's function method, the algorithms and the implementations presented can be immediately used in any application involving block $n$-diagonal systems.

math.NA

Performance-Portable Optimization and Analysis of Multiple Right-Hand Sides in a Lattice QCD Solver

Managing the high computational cost of iterative solvers for sparse linear systems is a known challenge in scientific computing. Moreover, scientific applications often face memory bandwidth constraints, making it critical to optimize data locality and enhance the efficiency of data transport. We extend the lattice QCD solver DD-$\alpha$AMG to incorporate multiple right-hand sides (rhs) for both the Wilson-Dirac operator evaluation and the GMRES solver, with and without odd-even preconditioning. To optimize auto-vectorization, we introduce a flexible interface that supports various data layouts and implement a new data layout for better SIMD utilization. We evaluate our optimizations on both x86 and Arm clusters, demonstrating performance portability with similar speedups. A key contribution of this work is the performance analysis of our optimizations, which reveals the complexity introduced by architectural constraints and compiler behavior. Additionally, we explore different implementations leveraging a new matrix instruction set for Arm called SME and provide an early assessment of its potential benefits.

cs.DC

Using orthogonal projectors in multigrid multilevel Monte Carlo for trace estimation in lattice QCD

We introduce a multigrid multilevel Monte Carlo method for stochastic trace estimation in lattice QCD based on orthogonal projections. This formulation extends the previously proposed oblique decomposition and it is assessed on three representative problems: the connected pseudoscalar correlator, the trace of the full Dirac operator's inverse $\mathrm{tr}(D^{-1})$, and disconnected fermion loops. For the connected correlator, variance reductions grow systematically with the time separation and lead to cost savings of up to a factor of 30 at large separations, outperforming both the plain Hutchinson's estimator and the oblique formulation. For $\mathrm{tr}(D^{-1})$, reductions are more modest but remain systematic, with stronger effects on more ill-conditioned systems. Disconnected loops show no improvement, since their variance is dominated by local same-slice contributions not targeted by the decomposition.

hep-lat

Extending DD-$\alpha$AMG on heterogeneous machines

Multigrid solvers are the standard in modern scientific computing simulations. Domain Decomposition Aggregation-Based Algebraic Multigrid, also known as the DD-$\alpha$AMG solver, is a successful realization of an algebraic multigrid solver for lattice quantum chromodynamics. Its CPU implementation has made it possible to construct, for some particular discretizations, simulations otherwise computationally unfeasible, and furthermore it has motivated the development and improvement of other algebraic multigrid solvers in the area. From an existing version of DD-$\alpha$AMG already partially ported via CUDA to run some finest-level operations of the multigrid solver on Nvidia GPUs, we translate the CUDA code here by using HIP to run on the ORISE supercomputer. We moreover extend the smoothers available in DD-$\alpha$AMG, paying particular attention to Richardson smoothing, which in our numerical experiments has led to a multigrid solver faster than smoothing with GCR and only 10% slower compared to SAP smoothing. Then we port the odd-even-preconditioned versions of GMRES and Richardson via CUDA. Finally, we extend some computationally intensive coarse-grid operations via advanced vectorization.

hep-lat

Polynomial Preconditioning for the Action of the Matrix Square Root and Inverse Square Root

While preconditioning is a long-standing concept to accelerate iterative methods for linear systems, generalizations to matrix functions are still in their infancy. We go a further step in this direction, introducing polynomial preconditioning for Krylov subspace methods which approximate the action of the matrix square root and inverse square root on a vector. Preconditioning reduces the subspace size and therefore avoids the storage problem together with -- for non-Hermitian matrices -- the increased computational cost per iteration that arises in the unpreconditioned case. Polynomial preconditioning is an attractive alternative to current restarting or sketching approaches since it is simpler and computationally more efficient. We demonstrate this for several numerical examples.

math.NA

Coarsest-level improvements in multigrid for lattice QCD on large-scale computers

Numerical simulations of quantum chromodynamics (QCD) on a lattice require the frequent solution of linear systems of equations with large, sparse and typically ill-conditioned matrices. Algebraic multigrid methods are meanwhile the standard for these difficult solves. Although the linear systems at the coarsest level of the multigrid hierarchy are much smaller than the ones at the finest level, they can be severely ill-conditioned, thus affecting the scalability of the whole solver. In this paper, we investigate different novel ways to enhance the coarsest-level solver and demonstrate their potential using DD-$α$AMG, one of the publicly available algebraic multigrid solvers for lattice QCD. We do this for two lattice discretizations, namely clover-improved Wilson and twisted mass. For both the combination of two of the investigated enhancements, deflation and polynomial preconditioning, yield significant improvements in the regime of small mass parameters. In the clover-improved Wilson case we observe a significantly improved insensitivity of the solver to conditioning, and for twisted mass we are able to get rid of a somewhat artificial increase of the twisted mass parameter on the coarsest level used so far to make the coarsest level solves converge more rapidly.

math.NA

Deflated Multigrid Multilevel Monte Carlo

In lattice QCD, the trace of the inverse of the discretized Dirac operator appears in the disconnected fermion loop contribution to an observable. As simulation methods get more and more precise, these contributions become increasingly important. Hence, we consider here the problem of computing the trace $\mathrm{tr}(D^{-1})$, with $D$ the Dirac operator. The Hutchinson method, which is very frequently used to stochastically estimate the trace of a function of a matrix, approximates the trace as the average over estimates of the form $x^{H} D^{-1} x$, with the entries of the vector $x$ following a certain probability distribution. For $N$ samples, the accuracy is $\mathcal{O}(1/\sqrt{N})$. In recent work, we have introduced multigrid multilevel Monte Carlo: having a multigrid hierarchy with operators $D_{\ell}$, $P_{\ell}$ and $R_{\ell}$, for level $\ell$, we can rewrite the trace $\mathrm{tr}(D^{-1})$ via a telescopic sum with difference-levels, written in terms of the aforementioned operators and with a reduced variance. We have seen significant reductions in the variance and the total work with respect to exactly deflated Hutchinson. In this work, we explore the use of exact deflation in combination with the multigrid multilevel Monte Carlo method, and demonstrate how this leads to both algorithmic and computational gains.

hep-lat

Krylov Subspace Recycling For Matrix Functions

We derive an augmented Krylov subspace method with subspace recycling for computing a sequence of matrix function applications on a set of vectors. The matrix is either fixed or changes as the sequence progresses. We assume consecutive matrices are closely related, but make no assumptions on the relationship between the vectors. We present three versions of the method with different practical implementations. We demonstrate the effectiveness of the method using a range of numerical experiments with a selection of functions and matrices. We primarily focus our attention on the sign function arising in the overlap formalism of lattice QCD.

math.NA

A Multilevel Approach to Variance Reduction in the Stochastic Estimation of the Trace of a Matrix

The trace of a matrix function f(A), most notably of the matrix inverse, can be estimated stochastically using samples< x,f(A)x> if the components of the random vectors x obey an appropriate probability distribution. However such a Monte-Carlo sampling suffers from the fact that the accuracy depends quadratically of the samples to use, thus making higher precision estimation very costly. In this paper we suggest and investigate a multilevel Monte-Carlo approach which uses a multigrid hierarchy to stochastically estimate the trace. This results in a substantial reduction of the variance, so that higher precision can be obtained at much less effort. We illustrate this for the trace of the inverse using three different classes of matrices.

math.NA