Elamur Research

Design and Optimization of OpenFOAM-based CFD Applications for Hybrid and Heterogeneous HPC Platforms

Paper · 2015 · Amani AlOnazi, David Keyes, Alexey Lastovetsky et al.

Summary

A scientific program can use a powerful graphics processor and still spend much of its time waiting. Data must reach the processor, neighboring pieces of a calculation must exchange information, and some operations cannot continue until every participant has contributed. Amani AlOnazi and colleagues examine this problem in OpenFOAM, a software framework for numerical simulation. Their central question is how to make applications use a machine containing both conventional processors and graphics processors effectively, instead of treating acceleration as a matter of moving an existing calculation onto a GPU.

The paper studies two applications. icoFoam simulates incompressible laminar flow, while laplacianFoam handles a scalar diffusion problem. Both repeatedly solve large, sparse systems of linear equations. The authors concentrate on conjugate gradient, an iterative procedure used within these applications, and develop a hybrid implementation that distributes its work across CPUs and GPUs. They combine this implementation with pipelining, which reduces the frequency of global coordination, and with a mesh-partitioning procedure that assigns different amounts of work to devices according to measured performance. These are complementary changes: one expands the resources doing useful computation, another changes the communication schedule, and the third adjusts the division of work.

The reported results show improvements at several levels. Against the existing Cufflink GPU implementation, the hybrid solvers give approximately 2x acceleration for the complete icoFoam calculation in the reported strong-scaling experiments. For laplacianFoam, the authors report about 7x for the smaller problem and 3.5x for the larger one. A separate comparison finds around 20% improvement in average iteration time when a CPU–GPU calculation uses a performance-weighted partition rather than an equal partition. These results have different baselines and experimental conditions; they describe related benefits rather than a sequence of gains that can be multiplied together.

The strongest lesson concerns the limits of acceleration. The authors find that memory traffic and transfers across the CPU–GPU connection restrict performance even after computation has been distributed. They also show that improving a linear solver does not remove the cost of untouched application stages. The contribution is therefore a coordinated approach to GPU and parallel computing: organize computation, communication, and data placement together, then measure both the numerical kernel and the application that depends on it. The paper presents a useful implementation and a diagnosis of its remaining obstacles, while leaving broader tuning and large-scale deployment questions open.

Interesting ideas

Measure the work that the application actually performs. A device’s general reputation or advertised arithmetic capability does not determine how quickly it executes a particular numerical kernel. The authors estimate device speed by running the relevant calculation and measuring its time. This makes the allocation reflect the application’s sparse operations and data movement. The same principle applies to document processing, database queries, graph traversal, and other workloads whose limiting resource may differ from the machine’s most prominent specification.

Balance completion time rather than input size. Equal pieces of a problem are appropriate only when the workers process those pieces at comparable rates. On a heterogeneous machine, a larger share for a faster device can produce a more balanced execution. The paper turns measured relative speeds into partition weights and passes those weights to a graph partitioner. This separates the question of how much work each worker should receive from the question of which connected pieces it should receive.

Treat synchronization as part of the algorithm. The pipelined solver changes the order and structure of computation so that a global reduction can overlap useful work. It accepts additional arithmetic in exchange for fewer exposed coordination delays. This idea extends beyond numerical simulation: a workflow may become faster by reorganizing dependencies, even when it performs more local operations. The relevant comparison is the complete schedule, including waiting, rather than the count of arithmetic instructions alone.

Distinguish arithmetic limits from data-movement limits. The paper uses the earlier Roofline study to relate attainable performance to bandwidth and the amount of computation associated with transferred data. Its conjugate-gradient kernels perform relatively little arithmetic for their memory traffic. That makes memory organization and transfers central optimization targets. Elsewhere, this reasoning helps avoid spending effort on computation that is already cheaper than obtaining its inputs.

Evaluate the enclosing application. A faster internal routine is useful only to the extent that it reduces the time of the workflow that calls it. icoFoam gains less than laplacianFoam because the optimized pressure calculation is only part of its work. Measuring both levels exposes the difference between a successful component optimization and a large application-level improvement. This applies wherever a specialized accelerator, parser, index, or solver sits inside a larger pipeline.

Report numerical effort alongside execution time. The preconditioning experiments compare iteration counts as well as runtime. Some GPU configurations require more iterations than the CPU configuration yet still finish sooner. Conversely, a cheap iteration does not establish that an entire solve is cheap. Recording both measures helps distinguish changes in implementation efficiency from changes in convergence behavior, a distinction that also matters in search, iterative inference, and repeated refinement.

Inspect the boundary between software components. The authors identify the interface between OpenFOAM’s structures and CUDA computation as an important obstacle. An accelerated routine can inherit expensive access patterns and transfers from the surrounding framework. Their proposed response includes revisiting storage organization, instead of optimizing GPU instructions in isolation. The broader lesson is to inspect the representation changes, copies, and coordination that occur whenever work crosses a component boundary.

Deep dive: Design and Optimization of OpenFOAM-based CFD Applications for Hybrid and Heterogeneous HPC Platforms

How hybrid CPU–GPU solvers, pipelined conjugate gradient, and measured mesh partitioning accelerate OpenFOAM fluid simulations. · about 36 minutes to read

How Mova uses it

Mova is a transparent language system written in Rust. Its native readers, explicit rules, knowledge structures, and bounded workers differ substantially from a fluid simulation. The connections below concern engineering methods that could transfer across that difference. The available development evidence establishes several related mechanisms, but it does not establish an application of this paper or a measured benefit from these proposals. The status marks describe proposed relationships to existing work, rather than verified outcomes.

Idea: Benchmark the actual operation before assigning resources. Where: Section 4.2, the measurement procedure preceding equations (5)–(8). Area: performance evaluation. Mova: частково є (tools/twin, which records predicted costs, measured runs, and calibration). Mova could estimate throughput separately for parsing, dictionary retrieval, graph reading, and compression before assigning a batch to a worker. The paper supports measuring the relevant kernel, instead of borrowing a generic hardware score. Why Mova: operation-specific measurements could make resource estimates useful for its varied Rust tools. Whether the current measurements support this exact scheduling use is unknown.

Idea: Allocate work according to expected finishing time. Where: Section 4.2, equations (6)–(8). Area: scheduling. Mova: нове, as a proposed device-weighted allocation rule; implementation status beyond the digest is unknown. A bounded corpus job could give larger batches to workers with higher measured throughput while preserving source and batch boundaries. This would transfer the allocation principle, without assuming that text workloads have the same cost structure as mesh cells. Why Mova: a worker that finishes early while another remains overloaded wastes available capacity. Any benefit would require measurements on representative document sizes and operations.

Idea: Reorganize dependencies to overlap waiting with useful work. Where: Section 4.1, the pipelined conjugate-gradient discussion. Area: execution scheduling. Mova: частково є (tools/cycle, whose training activity can proceed asynchronously). Mova could examine whether an independent parsing, checking, or packaging step can run while another stage waits for a permitted external operation. The numerical recurrence itself does not transfer; the useful idea is to identify work whose inputs are already available. Why Mova: bounded overlap could reduce idle time in long processing runs, provided that review and admission dependencies remain explicit.

Idea: Diagnose bandwidth before optimizing arithmetic. Where: Figure 1 and the discussion around Table 1. Area: storage and performance analysis. Mova: частково є (pack and tools/dictindex, which use prepared, compressed representations). Mova could measure bytes decoded, copied, and traversed for frequent operations before changing its rule evaluation. The CFD findings suggest a diagnostic question, not evidence that Mova has the same bottleneck. Why Mova: dictionary and graph workloads may spend substantial effort obtaining data, so an arithmetic optimization could miss the dominant cost.

Idea: Measure the complete workflow after improving a component. Where: Figures 6 and 7 and their application-level discussion. Area: evaluation. Mova: частково є (the digest describes component checks, application benchmarks, and retained-school assessment). A parser improvement could be accompanied by timing and outcome measurements for the reader that consumes its trees. Similarly, a faster index query could be evaluated inside dictionary preparation. Why Mova: a local speed gain can have little effect when another stage dominates, and an application measurement reveals whether the change matters to actual tasks.

Idea: Separate iteration cost from total work to completion. Where: Figure 9 and Table 2. Area: iterative evaluation. Mova: частково є (retention/mice.rs, whose epochs stop after stability or a hard cap). Mova could report time per epoch, epochs completed, and final answer quality separately for bounded study. The analogy concerns measurement rather than numerical convergence. Why Mova: cheaper passes could still require more passes, while a more expensive observation might reduce later work. No such tradeoff is measured by this paper for Mova.

Idea: Profile representation boundaries. Where: Section 5, the discussion of CUDA integration and lduMatrix. Area: data representation. Mova: частково є (tools/lobster, whose interchange diagnostics track information loss between layers). Mova could add timing and byte counts around transitions from dependency trees to frames, retained graphs, and compressed records. Existing semantic diagnostics do not establish the cost of those transitions. Why Mova: representation conversion can consume resources even when each individual component is efficient, and locating that cost makes optimization more concrete.

Idea: Use a work proxy that matches the operation. Where: Section 4.2, equation (5). Area: mathematical cost estimation. Mova: частково є (tools/twin and tools/jobs, which retain estimates and actual resource use). The paper counts sparse non-zero entries because they reflect the numerical kernel’s work. Mova could compare document bytes, token counts, dependency edges, or visited postings as predictors for different operations. Why Mova: a single proxy such as document count can conceal large cost differences. The best proxy for each Mova operation remains an empirical question.

Idea: Keep workload quantity separate from workload topology. Where: Section 4.2, the combination of performance weights with MeTiS or SCOTCH. Area: graph processing and scheduling. Mova: нове, as a proposed partitioning criterion; broader implementation status is unknown. When partitioning a graph-backed task, Mova could distinguish the desired work share from the cost of references that cross worker boundaries. Why Mova: evenly timed batches may still cause excessive communication or repeated graph access. The CFD approach suggests considering both objectives without claiming that its partitioner directly fits Mova’s graphs.

Idea: Account for local exchanges and global barriers separately. Where: Section 2.1 and Section 4.1. Area: execution analysis. Mova: частково є (worker protocols and the shared-graph mouse team expose different communication boundaries). Mova could report peer requests separately from operations that wait for an entire batch or team. The paper shows why these costs deserve different explanations and remedies. Why Mova: eliminating a global wait and reducing a local lookup are different interventions, and separating them would make performance reports easier to interpret.

Idea: Make cost estimates sensitive to problem size. Where: Equation (5), where measured speed depends on the assigned cell count, and Figure 8. Area: performance statistics. Mova: частково є (tools/twin, with online calibration). A throughput estimate for short sentences should not automatically govern large documents, nor should a frequent-lemma retrieval estimate govern a rare selector. Why Mova: fixed estimates can become misleading when batching, storage access, or memory requirements change with size. The appropriate size ranges and predictive accuracy would need dedicated evaluation.

Idea: Validate static balancing before adding dynamic scheduling. Where: Section 4.2 and the conclusion. Area: bounded execution design. Mova: частково є (configured worker capabilities and explicit execution bounds). Mova could first test a reproducible, measured batch allocation and record its failures before introducing runtime reassignment. The authors implement a static partition and identify more adaptive scheduling as further work. Why Mova: a simple allocation can establish a clear baseline, while the additional complexity of moving work should be justified by observed imbalance.

Idea: Tune for multiple kernels instead of one representative stage. Where: Section 5, the discussion following Figure 5. Area: pipeline cost estimation. Mova: нове, as a proposed multi-stage allocation policy; implementation status is unknown. A batch that is convenient for parsing may be poor for dictionary indexing or compression. Mova could record a cost profile across stages and assess the whole sequence before choosing a partition. Why Mova: its pipelines combine operations with different resource demands, so optimizing one stage could relocate the bottleneck.

Idea: Group compatible operations to reduce repeated data access. Where: Section 5, the vector-operation discussion following Table 1. Area: data processing. Mova: частково є (pack groups prepared records, while the mouse team shares a document parse and retained graph). Mova could examine whether several deterministic observations can reuse a decoded record or graph traversal. This proposal concerns a measured implementation choice, not permission to merge distinct kinds of evidence. Why Mova: shared access may save decoding and traversal work while preserving separate outputs and reasons.

Idea: Preserve specialized treatment for operations with different dependencies. Where: Section 5, the contrast between vector updates and reductions. Area: algorithm design. Mova: частково є (typed interfaces distinguish receipts, reviewed proposals, proofs, and admitted knowledge). The paper does not treat every vector operation as equally fusible. Mova could likewise distinguish independent local observations from operations requiring complete evidence before combining processing steps. Why Mova: grouping everything into a single pass can obscure a dependency or cause a decision to occur before its required checks have finished.

Idea: Evaluate acceleration against more than one baseline. Where: Figures 4, 6, 7, and 9. Area: comparative evaluation. Mova: частково є (the digest describes CPU references, measured GPU agreement, and assessment controls). A performance report could distinguish improvement over the native reference from improvement over an existing accelerated route. Why Mova: beating a slow reference does not establish an advantage over the strongest available implementation. Any comparison should retain identical task scope and make differences in settings explicit.

Idea: Hold the stopping requirement visible in every comparison. Where: Figure 4 and Figures 6–9, whose captions state convergence tolerances. Area: evaluation conditions. Mova: частково є (retention/mice.rs records bounded stopping behavior, and benchmarks use declared assessment protocols). Mova could include stopping criteria, budgets, and failure handling beside every timing result for iterative study or task execution. Why Mova: a shorter run may reflect an easier termination rule rather than better execution. Matching conditions is necessary before interpreting a speed difference.

Idea: Compare alternative supporting algorithms explicitly. Where: Figure 9, where the CPU and GPU routes use different multigrid components. Area: evaluation and causal interpretation. Mova: частково є (CPU and GPU parsing paths are distinguished, and approximant agreement is measured). If an accelerated route also changes parsing or graph-reading behavior, Mova should report that change separately from its hardware placement. Why Mova: implementation speed and altered decision behavior can both affect the final result, and a single runtime number cannot identify their contributions.

Idea: Optimize the most consequential stage first. Where: Section 5, the discussion of optimizing pressure solution within icoFoam. Area: engineering prioritization. Mova: частково є (tools/twin and profiling output in tools/enrich). Mova could rank candidate optimizations by the time their stages consume in a complete supported task, then verify whether the predicted application benefit appears. Why Mova: the clearest internal hotspot is not always the largest end-to-end opportunity, particularly when waiting, storage, or other stages remain unchanged.

Idea: Use shared infrastructure through a narrow integration boundary. Where: Section 4.1, where the solvers are integrated as a dynamic library. Area: software architecture. Mova: вже є (configured native adapters and the Domain interface in layers, within their documented limits). New execution strategies could remain behind explicit interfaces rather than requiring every caller to understand their implementation. Why Mova: its logical-module direction benefits from components whose inputs, outcomes, and failure behavior remain inspectable. This is an architectural correspondence, not evidence of a dependency on the paper.

Idea: Record resource utilization as well as acceleration. Where: Section 4, the motivation to use allocated resources effectively. Area: operational evaluation. Mova: частково є (tools/jobs, which records estimates and actual use). Mova could accompany completion time with evidence about which assigned workers performed useful work and which waited. Why Mova: a fast run may still reserve resources that contribute little, and a slower worker may become useful under a better allocation. The paper supplies the motivation, but no direct Mova utilization result.

Idea: Distinguish current fixes from structural redesign. Where: Section 5, the proposed revision of OpenFOAM storage, and Section 6. Area: engineering evidence. Mova: вже є (the hybrid-system and architecture descriptions distinguish implemented mechanisms from direction). Mova can retain the same separation when reporting a measured local optimization alongside a proposed representation or scheduler change. Why Mova: a diagnosis of remaining cost is valuable, but it should not be counted as an implemented remedy or an achieved performance improvement.

Idea: Keep deployment scope attached to performance claims. Where: Section 5, the node descriptions, and Section 6, the unresolved scaling questions. Area: evaluation provenance. Mova: частково є (dictindex measurements identify indexed prefixes and cache scope; GPU behavior has a separate execution contract). Mova could consistently bind every timing claim to hardware, input coverage, execution mode, and retained state. Why Mova: a bounded probe does not establish whole-corpus throughput, just as a single-node CFD result does not establish distributed scaling.

Idea: Consider memory-aware reassignment only as a tested extension. Where: Section 6, the discussion of dynamic balancing and work stealing. Area: future scheduling. Mova: нове, as a proposed policy instead of an established feature; implementation status beyond the digest is unknown. A future worker scheduler could avoid moving tasks when their retained state is expensive to transfer or duplicate. Why Mova: moving computation without accounting for its data can replace an imbalance with a larger transfer cost. The CFD paper proposes this direction but does not validate it experimentally.

The problem and its context

Why a GPU is not a complete solution

The paper begins from a mismatch between software organization and machine organization. Many computational-fluid-dynamics programs distribute a calculation among processes using MPI, the Message Passing Interface. Each process receives a piece of the physical domain, performs local work, and exchanges information with other processes where necessary. On a machine whose processors have similar capabilities, giving these processes comparable portions of the problem can work well.

A node containing conventional processors and GPUs changes that assumption. The devices can execute the same conceptual work at different rates, and reaching a GPU requires an additional data path. A process associated with a GPU may benefit from CUDA acceleration, while another process performs its calculation on the CPU. Equal input sizes can therefore produce unequal finishing times. Furthermore, even a fast GPU calculation can be slowed by transferring the information needed for communication.

The authors frame this as a problem of using the complete node. Their objective is not merely to demonstrate that a GPU can execute conjugate-gradient kernels. Existing software already offered GPU execution. The question is whether coordinated CPU and GPU participation, a better communication schedule, and a more appropriate partition can improve the application as a whole.

Why linear-system solution matters

OpenFOAM provides infrastructure for representing a mesh, discretizing equations, managing fields, and solving the resulting algebraic problems. A mesh divides a spatial domain into cells. After discretization, quantities such as pressure or temperature are represented by values associated with those cells, and relationships between neighboring cells become entries in a matrix.

These matrices are sparse: most entries are absent or zero because each cell interacts directly with only a limited neighborhood. Their sparsity makes specialized storage and computation important. It also means that runtime depends heavily on moving values and indices through memory, rather than simply performing dense arithmetic.

The paper identifies sparse linear algebra as a major cost in the selected applications. This makes the linear solver an attractive intervention point. Improving it can benefit existing application code without replacing the physical simulation or the overall framework. However, its importance differs between applications, which later explains why their complete-run speedups differ.

Conjugate gradient is especially relevant because both applications use it. In icoFoam, pressure solution uses CG, while the velocity calculation uses BiCGSTAB. In laplacianFoam, the temperature-related system is solved with CG. The optimization therefore reaches a shared numerical component while leaving some application-specific work untouched.

The communication hidden inside an iteration

An iterative solver repeatedly improves an approximate solution. In the CG calculation described by the authors, an iteration includes multiplication of a sparse matrix by a vector, vector updates, and inner products. These operations have different communication requirements once the problem is distributed.

Sparse multiplication needs values from neighboring subdomains. A local process cannot evaluate every contribution at its boundary using only values stored strictly inside its own region. OpenFOAM addresses this with halo information: boundary-adjacent data are duplicated and refreshed through communication.

Inner products create a different dependency. Each process can calculate its local contribution to a scalar result, but the complete scalar requires combining contributions from every participant. This is a global reduction. The original CG organization discussed in the paper involves three such global communications during an iteration.

These two communication patterns create different obstacles. Neighbor exchanges depend on the partition boundaries and their size. Global reductions depend on collective participation and synchronization. A partitioning improvement can reduce one kind of cost without eliminating the other. The paper’s combined approach follows directly from this distinction.

What earlier approaches contributed

The related-work discussion describes several routes towards more effective parallel CFD. Earlier work on heterogeneous oil-extraction simulation used measured performance and partitioning informed by that performance. This provides a precedent for adapting the domain division to unequal computing resources.

Other work examined hybrid MPI and OpenMP execution. The authors discuss studies of implicit CFD and the TAU solver as examples of combining process-level communication with shared-memory parallelism. These approaches address efficient use of multicore resources, but the present paper focuses on a node that also contains GPUs.

GPU-oriented numerical libraries provide another starting point. Cufflink extends OpenFOAM with CUDA-based linear solvers, making it a particularly relevant baseline. CUSP and Thrust supply computational building blocks used in the authors’ implementation. The paper positions its contribution beyond straightforward use of an existing GPU solver by coordinating additional resources and changing the execution schedule.

The authors also discuss task-based alternatives. They describe runtime migration in work by Papadrakakis and colleagues and heterogeneous scheduling through StarPU. Their own demonstrated decomposition is instead established before the main run, using measured device behavior to guide the initial allocation.

OP2 is presented as an approach to supporting unstructured-mesh applications on different hardware. The authors identify limitations relative to their OpenFOAM setting, including the treatment of decomposition and the GPU scope available in the work they discuss. These statements describe the comparison made in the paper; they do not establish the later capabilities of those projects.

The context is therefore a field with relevant ingredients already available: GPU kernels, hybrid programming, graph partitioners, and communication-reducing iterative methods. The contribution lies in combining those ingredients within OpenFOAM and measuring the resulting behavior.

The method, step by step

The method has three connected parts. First, the authors build a CG implementation whose processes may execute on CPUs or use GPUs. Second, they implement a pipelined form that changes when global communication occurs. Third, they measure the devices and use those measurements to choose unequal subdomain sizes. These changes operate within OpenFOAM’s existing application structure.

From simulation mesh to a balanced hybrid solve

The steps in order.

From simulation mesh to a balanced hybrid solveStep 1: Divide the mesh into initial subdomains1. Divide the mesh into initial subdomainsStep 2: Run the numerical kernel on assigned devices2. Run the numerical kernel on assigned devicesStep 3: Measure device throughput3. Measure device throughputStep 4: Convert throughput into partition weights4. Convert throughput into partition weightsStep 5: Repartition while controlling boundary communication5. Repartition while controlling boundary communicationStep 6: Execute CPU and GPU solver work6. Execute CPU and GPU solver workStep 7: Overlap reductions with available computation7. Overlap reductions with available computationStep 8: Measure complete application execution8. Measure complete application execution

Start with the governing equations

For icoFoam, the physical setting is incompressible laminar flow. The continuity condition is:

∇ · u = 0

Here u is the velocity vector, and ∇ · denotes divergence. The equation expresses the incompressibility constraint used by the application. The solver must obtain a velocity field consistent with this condition, rather than merely update each velocity value independently.

The momentum equation is:

∂u/∂t + ∇ · (uu) − ∇ · (ν∇u) = −∇p

The symbol t denotes time, ν is kinematic viscosity, and p is pressure. The product uu appears in the transport term. The gradient operator is written ∇, and its combination with divergence describes the spatial terms in the equation. Together with the continuity condition, this equation defines the flow problem addressed by icoFoam.

The application uses PISO, expanded by the authors as Pressure Implicit with Splitting of Operators. Its first stage predicts momentum using an initial or previously available pressure field. This produces a velocity estimate that approximately satisfies momentum but does not yet satisfy the divergence constraint.

The pressure stage follows. Finally, the velocity is corrected explicitly using the resulting pressure distribution. This sequence matters to the optimization because the authors accelerate the pressure-solving stage. They do not replace every stage of the application with a hybrid counterpart.

For laplacianFoam, the paper presents a time-dependent equation for a passive scalar:

∂T/∂t − ∇(D_T · T) = 0

Here T is the scalar field, with temperature given as an example, and t again denotes time. The notation D_T belongs to the diffusion term. The displayed equation leaves the operator structure of that term less explicit than the accompanying description of a Laplacian or diffusion calculation. It should therefore be read with that notation issue in view, rather than silently expanded into a different displayed equation.

The implementation forms an implicit algebraic system from the discretized problem. The optimization addresses the solution of that system, so its central computational interface is the same even though the applications represent different physical quantities.

Turn the discretization into a sparse system

The linear problem is written:

Ax = b

The matrix A contains the discretized relationships between unknowns. The vector x contains the unknown values, and b contains the corresponding right-hand-side values. The number of entries in x follows the number of computational cells. The authors describe the matrix in their CG setting as square, symmetric, and positive definite or semidefinite.

An individual CG iteration combines sparse multiplication, an optional preconditioner, scalar products, and vector operations. A preconditioner changes the computational route used to obtain convergence. Its quality and cost therefore matter alongside the implementation of CG itself.

The authors do not introduce a new learning procedure or a training dataset. The empirical preparation is a performance measurement: execute the numerical kernel on an initial distribution, observe its timing, and use that observation to alter the partition.

Distribute the mesh and retain neighbor information

OpenFOAM’s decomposition facility partitions the mesh into subdomains. A process handles each assigned region and the corresponding local algebraic work. The local matrix dimensions follow the number of cells in that subdomain, rather than the size of the entire mesh.

The partition also determines which processes must exchange values. Cells near a shared interface require information from the neighboring region. Halo updates make those values available locally after communication. A good partition must therefore address more than the count of cells assigned to each process.

The authors use MeTiS or SCOTCH to carry out graph-based decomposition. These libraries can accept weights indicating the desired work allocation. They do not, in the account given here, determine the appropriate relative computing capacity of each device. That capacity estimate is the additional input supplied by the paper’s measurement procedure.

Figures 2 and 3 illustrate the distinction. Both concern a 128 × 128 × 128 mesh divided into 16 subdomains. The equal decomposition gives comparable regions, whereas the heterogeneous example assigns visibly larger regions to GPU-associated work on a machine described with 16 cores and 2 GPUs. The illustration explains the allocation principle; it is not itself a timing result.

Execute CPU and GPU work within the same solver

The hybrid solver retains MPI as the process-level coordination mechanism. A process associated with a GPU uses CUDA routines for its accelerated computation. A process without that association executes locally on the CPU. The purpose is to let both kinds of resource contribute rather than leave the conventional processors outside the main numerical work.

The implementation uses CUSP and Thrust for CUDA operations. Its matrix representation supports CSR, or compressed sparse row storage. CSR organizes sparse entries by row so that the matrix need not store every possible position in a dense square array.

The original hybrid CG retains the communication structure of conventional CG. During an iteration it needs neighbor communication for sparse multiplication and global reductions for the scalar calculations. Moving computation onto heterogeneous devices does not remove these algorithmic dependencies.

Transfers between host and device become part of the coordination path. A value produced on a GPU may need to participate in communication managed through the surrounding application. The benefit of a fast kernel therefore depends on how much additional movement is exposed at these boundaries.

All the solver variants are connected to OpenFOAM through a dynamic library. This is an important part of the engineering contribution: the work is evaluated inside the applications that call the linear solver, rather than only as a detached numerical benchmark.

Change the communication schedule with pipelining

The pipelined implementation follows the algorithm of Ghysels and Vanroose. The paper relates that algorithm to the earlier s-step work of Chronopoulos and Gear. Its purpose is to reduce the coordination cost associated with repeated scalar reductions.

The conventional organization discussed here requires three global communications in an iteration. The pipelined organization uses one collective communication in the loop body. This does not mean that all communication disappears: sparse multiplication still needs neighboring data.

The more important scheduling change is that the global reduction can be asynchronous. While it progresses, the solver can perform work associated with sparse multiplication. The authors contrast this with trying to hide the delay behind a vector update, whose runtime may be too short to cover the communication latency.

This rearrangement adds computational steps. The paper treats those extra operations as a potentially favorable exchange for less exposed synchronization. The claim is consequently about elapsed execution time under a particular hardware balance, rather than a reduction in the arithmetic performed by every iteration.

The authors implement pipelined versions for CPU execution using MPI, for CUDA execution, and for a hybrid arrangement. This permits comparisons that address both algorithm organization and placement of numerical work.

The paper explains the scheduling principle but does not print a complete set of recurrence equations for the pipelined method. A reader should therefore distinguish the implemented algorithm, attributed to earlier work, from the equations the paper itself develops for partitioning.

Estimate the speed of each participant

The heterogeneous decomposition begins with an evenly divided problem. The kernel runs on that initial assignment, and the execution time is measured for each participant.

For a local matrix, the authors express the number of non-zero entries as nᵢ + 2oᵢ. Here nᵢ is the number of cells assigned to participant pᵢ, while oᵢ counts the relevant off-diagonal entries from the upper part of the local matrix. The factor 2 accounts for the corresponding off-diagonal contribution in the full sparse representation described by the authors.

The resulting speed estimate is:

sᵢ(nᵢ) = (nᵢ + 2oᵢ) / T(nᵢ)

The function sᵢ(nᵢ) is the measured speed for participant pᵢ at allocation size nᵢ. The denominator T(nᵢ) is its time per iteration. The numerator represents sparse work through the number of non-zero entries.

This is a throughput measure tied to the numerical kernel. It does not assume that the device’s advertised arithmetic rate predicts application performance. It also makes the dependence on the local problem size visible.

The paper motivates the work count through the relationship between CG iteration cost and sparse non-zero count. This approximation is useful for the selected kernel, but it does not automatically describe all other stages in a CFD application.

Normalize the measured speeds

The measured speeds are converted into relative shares:

rᵢ(nᵢ) = sᵢ(nᵢ) / Σⱼ sⱼ(nⱼ)

The quantity rᵢ(nᵢ) is the fraction of total measured speed associated with participant pᵢ. The summation in the denominator covers all participating processors or device-associated processes. Each term uses the speed measured at that participant’s initial allocation.

The equation captures the intended balancing rule. A participant that processes the kernel more quickly receives a larger desired fraction of the work. Equal input sizes are replaced by shares derived from observed execution.

The total cell count obeys:

N = Σᵢ nᵢ

Here N is the cell count for the complete domain, while the sum combines the allocations of all participants. The equation states that partitioning distributes the existing domain; it does not create extra physical cells.

The new target allocation is:

nᵢ,new = N × rᵢ(nᵢ)

The symbol nᵢ,new denotes the desired cell allocation after weighting. It is obtained from the complete problem size N and the relative measured speed rᵢ(nᵢ).

These values provide the desired computational shares to the partitioning library. The graph partitioner then chooses subdomains while attempting to control communication. Desired workload fractions and actual geometric boundaries are therefore related but distinct parts of the procedure.

The procedure is empirical and static in the implementation described. It measures an initial distribution and uses that evidence to repartition. The paper does not demonstrate a continuously adapting runtime controller that repeatedly reallocates every changing kernel.

Add preconditioning as a separate numerical choice

The final experimental extension applies algebraic multigrid, abbreviated AMG, as a preconditioner. The GPU-related configurations use the aggregation-based implementation available through CUSP. It performs a V-cycle and uses weighted Jacobi smoothing.

The reported smoothing weight is:

ω = 3/4

The symbol ω is the Jacobi weight. It controls the weighted smoothing operation within the multigrid procedure described by the authors.

OpenFOAM’s comparison route uses an agglomeration-based multigrid construction and diagonal incomplete-Cholesky smoothing. Consequently, the CPU and GPU preconditioned configurations differ in more than the processor executing them. This difference becomes essential when interpreting their iteration counts.

Experiments and results

Platforms and numerical problems

The implementation is written in CUDA, C, and C++ and integrated into OpenFOAM-ext1.6. The experiments use separate nodes representing different CPU–GPU combinations.

The Tesla platform contains two NUMA sockets, each connected to a Tesla C2050. The paper describes a socket with 6 Intel Xeon X5670 cores running at 2.93GHz. The TITAN platform also has two NUMA sockets and uses two GeForce GTX TITAN devices. Its socket description specifies 8 Intel Xeon E5-2650 cores at 2.00GHz.

These details matter because the tested configuration combines multiple performance characteristics. CPU capability, GPU generation, host-device communication, and the number of available participants all affect the result. A comparison across these nodes cannot isolate a single hardware feature.

The flow benchmark is a lid-driven cavity. The domain is a cube whose upper wall moves in the x direction while the other walls remain stationary. icoFoam computes the resulting laminar, isothermal, incompressible flow.

The diffusion benchmark uses a heat equation in a cube with Dirichlet boundary conditions. laplacianFoam solves the corresponding scalar problem. Separate numerical-kernel experiments use a 7-point Laplacian, allowing the authors to study solver behavior apart from all the other operations in a complete application.

The principal performance measures are execution time, time per iteration, speedup relative to a stated baseline, and achieved arithmetic throughput. The preconditioned comparisons additionally report iteration counts. These measures answer different questions and should not be substituted for one another.

Establishing the existing GPU baseline

Figure 4 compares the original OpenFOAM CG route on a CPU with Cufflink CG on a Tesla C2050. The domain is 100 × 100 × 100, and the convergence tolerance is 10⁻⁶.

The authors measure execution for a step of each selected application. They report that Cufflink reduces execution time by approximately 40% compared with the original OpenFOAM CG route.

This establishes that the comparison begins from an already useful GPU implementation. The later hybrid results are not simply GPU-versus-CPU demonstrations. Their purpose is to improve on an accelerated reference by using the node more comprehensively and altering the solver organization.

The text does not provide exact per-application timing coordinates for Figure 4. The reported percentage supports the authors’ general observation, but it does not justify inventing precise CPU and GPU timings or attributing an identical exact reduction to every plotted case.

Measuring the effect of heterogeneous decomposition

Figure 5 compares equal MeTiS partitioning with the performance-weighted decomposition. The calculation is a 7-point Laplacian on a three-dimensional slab containing a million cells. The reported domain size is 100 × 100 × 100.

The problem is split into two subdomains. One executes on the Tesla C2050 and the other on the CPU. This creates a direct test of the premise that equal allocation may be inappropriate when the participants differ.

The paper reports an improvement of around 20% in average iteration time with heterogeneous decomposition. This is evidence for the allocation change under the selected hybrid setting. It does not establish the same percentage for every problem size or for a complete simulation.

The comparison also has a useful methodological role. It evaluates partitioning separately from the broad claim that hybrid execution helps. Since both settings use the hybrid solvers, the reported result is more specifically connected to the work distribution than an application-level CPU-versus-GPU comparison would be.

Complete-application strong scaling

Figures 6 and 7 study strong scaling on the Tesla node. Strong scaling holds the numerical problem fixed while changing the parallel execution. The baseline is the application using Cufflink CG on a GPU, and the reported tolerance is 10⁻⁶.

For icoFoam, the experiments cover 100,000 control volumes and 1 million control volumes. The authors report approximately 2x acceleration for the complete application using the hybrid solvers.

They attribute the limited scaling to the rest of PISO. Their implementation improves pressure solution, but the momentum prediction and other untouched work remain in the application. This result is particularly informative because it exposes the application-level ceiling of the chosen intervention.

For laplacianFoam, the corresponding reported speedups are about 7x for the smaller case and 3.5x for the larger one. The authors associate these results with the heat-equation benchmark.

These values should retain their problem-size labels. The larger speedup is not a universal property of the solver, nor is the smaller one evidence that the method fails at larger inputs. They describe how the complete tested applications behave at the particular sizes and configurations examined.

The application figures provide stronger practical evidence than a detached kernel timing, but they also contain more interacting factors. The prose does not fully enumerate every plotted configuration numerically, so the headline values should not be expanded into a detailed scaling series that the text does not supply.

Solver behavior on TITAN

Figure 8 examines time per iteration as mesh size changes on a socket connected to a GeForce GTX TITAN. The numerical problem is again a 7-point Laplacian in a three-dimensional slab, with tolerance 10⁻⁶.

There is an ambiguity in the paper’s labeling. The figure caption describes MPI-only pipelined CG and hybrid variants. The surrounding prose instead describes CPU pipelined CG, GPU CG, and GPU pipelined CG. Both accounts concern comparative solver timing, but they do not provide a perfectly consistent naming scheme.

The authors’ qualitative observation is that CPU iteration time increases more steeply with mesh size than the GPU alternatives. The text does not give exact coordinates from which to reconstruct a numerical chart for those curves.

The achieved performance is reported as around 800 MFLOPs/s on Fermi and 2 GFLOPs/s on TITAN. These are observations on different platforms, rather than a controlled comparison that changes only one variable.

The authors interpret the results through bandwidth limits. They conclude that transfers over PCIe constrain the current implementation, while device-memory traffic also matters. This explains why greater arithmetic capacity does not translate directly into comparable solver throughput.

Arithmetic intensity explains the diagnosis

Table 1 gives arithmetic intensity for the main CG kernels. Arithmetic intensity relates arithmetic work to transferred data; a small value indicates that bandwidth may limit performance before arithmetic execution becomes the dominant constraint.

For CSR sparse multiplication, the table reports 14N floating-point operations, 112N bytes, and intensity 0.125. For a vector update, it reports 2 × N operations, 24 × N bytes, and 0.083. For an inner product, it gives 2 × N operations, 16 × N bytes, and 0.125.

These are the paper’s tabulated quantities, not new measurements computed from the runtime plots. They support the explanation that the kernels demand substantial data traffic relative to their arithmetic.

The table caption contains a notation inconsistency involving N and NNZ. It defines them as row count and non-zero count but writes their approximate relationship in a direction that is difficult to reconcile with the sparse stencil description. The interpretation should therefore rest on the clearly stated operation, byte, and intensity entries rather than on an unexamined reading of that caption.

The discussion emphasizes vector reductions and interface updates. Reductions require scalar communication, while sparse multiplication needs values crossing subdomain boundaries. Both can trigger movement between host and device, making the CPU–GPU interface part of the performance problem.

Iteration counts without preconditioning

Table 2 records how many iterations are needed for a steady-state Laplacian problem in a cube with Dirichlet boundary conditions. These tests use tolerance 10⁻⁸ on the TITAN setup.

For the mesh with N=64, ordinary OpenFOAM CG requires 346 iterations, GPU CG requires 325, and GPU pipelined CG requires 157. The corresponding comparison for N=128 appears below.

Unpreconditioned Laplacian solve, N=128, iteration count at tolerance 10⁻⁸

The GPU pipelined configuration has the smallest reported iteration count in this comparison.

Unpreconditioned Laplacian solve, N=128, iteration count at tolerance 10⁻⁸OpenFOAM CG: 695OpenFOAM CG695GPU CG: 636GPU CG636GPU Pipe CG (this paper): 297GPU Pipe CG (this paper)297
The numbers
System or settingiterations
OpenFOAM CG695
GPU CG636
GPU Pipe CG (this paper)297

These results show that the configurations do not merely have different iteration costs; they also terminate after different amounts of iterative work. The paper reports the differences but does not provide a detailed numerical analysis explaining the lower count of the pipelined configuration.

That distinction matters. A runtime advantage can reflect both faster iterations and fewer iterations. The table alone cannot separate those contributions, and it should not be read as proof that pipelining universally improves convergence.

Iteration counts with multigrid preconditioning

For N=64, the preconditioned OpenFOAM route requires 7 iterations. GPU AMG-CG and GPU AMG-PipeCG each require 28, while CUSP AMG-CG requires 32.

The N=128 results show the same broad pattern: the OpenFOAM configuration uses fewer iterations, while the GPU-related configurations differ among themselves.

AMG-preconditioned Laplacian solve, N=128, iteration count at tolerance 10⁻⁸

OpenFOAM uses fewer iterations, while the authors report faster execution for their GPU solvers.

AMG-preconditioned Laplacian solve, N=128, iteration count at tolerance 10⁻⁸OpenFOAM AMG-CG: 10OpenFOAM AMG-CG10GPU AMG-CG (this paper): 32GPU AMG-CG (this paper)32GPU AMG-PipeCG: 32GPU AMG-PipeCG32CUSP AMG-CG: 37CUSP AMG-CG37
The numbers
System or settingiterations
OpenFOAM AMG-CG10
GPU AMG-CG (this paper)32
GPU AMG-PipeCG32
CUSP AMG-CG37

The authors connect the increased GPU iteration counts to differences in aggregation, smoothing, and multigrid hierarchy construction. The GPU aggregation procedure uses a distance-2 maximal-independent-set approach, and the resulting aggregates may be irregularly shaped.

In spite of requiring more iterations than the OpenFOAM AMG route, the authors report that their solvers finish faster. They also report better performance than CUSP AMG-CG for their GPU AMG-CG implementation.

Figure 9 presents total execution time and iteration time, but the prose does not supply exact timing values. The justified conclusion is therefore qualitative: the reported runtime ordering favors the authors’ GPU implementations under these conditions, while the iteration table demonstrates that runtime and convergence effort do not have the same ordering.

What the ablations show

The paper does not present a complete factorial ablation that independently toggles every optimization, but it offers controlled comparisons of partitioning, execution strategy, application scope, and preconditioning.

Partitioning has an identifiable contribution

The clearest isolated comparison is heterogeneous decomposition against an equal MeTiS decomposition. Both operate within the hybrid setting on the specified Laplacian problem, and the difference concerns how much work reaches the CPU and GPU.

The reported iteration-time improvement supports the claim that work allocation matters independently of having a GPU available. This is a stronger inference than one could draw from comparing a CPU-only application with a fully changed hybrid application.

Its scope remains narrow. The experiment does not establish that the initial measurement gives an optimal allocation for every later phase. The authors themselves note that applications may contain kernels with different performance characteristics and therefore need further tuning.

Application measurements expose the untouched work

The contrast between icoFoam and laplacianFoam is an analysis of where an optimization can have an effect. Both use the improved numerical machinery, but icoFoam retains substantial work outside the optimized pressure stage.

The authors use this to explain its limited strong scaling. The result demonstrates a boundary of the intervention: a successful solver improvement cannot directly accelerate stages that do not use that solver.

This comparison does not quantify every PISO component separately. It provides an application-level explanation rather than a detailed breakdown proving the exact contribution of each untouched stage.

Pipelining is examined, but its causes are not fully isolated

The solver comparisons include pipelined and conventional organizations. They support the practical relevance of changing the communication schedule, especially when global coordination would otherwise be exposed.

However, the paper’s plots and iteration table do not isolate every contributing mechanism. Pipelining changes arithmetic work, dependency structure, and the observed number of iterations. Hardware placement and hybrid participation may also differ across plotted settings.

A careful interpretation therefore distinguishes the algorithmic rationale from the measured aggregate result. The rationale is reduced global synchronization with an opportunity for overlap. The measurements show the behavior of implemented configurations, without fully attributing every timing difference to a single cause.

Preconditioning reveals a convergence–execution trade-off

The multigrid comparison is valuable precisely because iteration count and runtime point in different directions. The CPU route needs fewer iterations, yet the authors report shorter execution for their GPU solvers.

The comparison also changes the multigrid machinery. Smoothing and hierarchy construction differ, so it cannot be treated as a pure hardware ablation. It demonstrates the performance of complete numerical configurations.

This analysis encourages reporting both numerical work and execution cost. Otherwise, a faster implementation could be mistaken for a stronger preconditioner, or a smaller iteration count could be mistaken for a faster solve.

Bandwidth analysis supports a structural explanation

The roofline discussion, measured throughput, and arithmetic-intensity table jointly support the authors’ bandwidth diagnosis. They explain why arithmetic optimization alone is unlikely to remove the main restriction.

The storage redesign suggested for OpenFOAM is not tested as an implemented ablation. The paper identifies a plausible cause and a possible remedy, but it does not report a before-and-after experiment on the proposed contiguous-block representation.

Limitations

Limits explicitly identified by the authors

The authors describe the implementation as an intermediate step towards more effective heterogeneous CFD. They leave attainable per-node performance and scaling across multiple nodes as unresolved questions. The reported experiments therefore should not be treated as evidence that the approach already uses a large distributed system efficiently.

They also identify a limitation in their balancing procedure. The measured allocation targets the dominant computational kernel, but a complete application may contain several kernels whose preferred work distributions differ. Further automatic tuning is proposed to account for that variation.

The conclusion points toward dynamic scheduling and memory-aware work stealing. These are future directions in the paper, rather than demonstrated capabilities of the implementation. The distinction is substantial: runtime reassignment requires deciding when to move work and accounting for the data associated with that movement.

Another explicit restriction is the interface between CUDA execution and OpenFOAM’s existing data structures. The authors suggest revising structures such as lduMatrix so that small groups of scalar values occupy contiguous, cache-friendly storage. They expect this to reduce harmful access behavior, but do not validate that redesign experimentally.

Finally, icoFoam’s remaining stages restrict its application-level scaling. The authors optimize pressure solution while other PISO work remains. Their result therefore establishes a benefit for a partial application intervention, with the corresponding ceiling still visible.

Limits visible in the experimental design

The hardware coverage is specific. The experiments use the described Tesla and TITAN nodes, and several comparisons operate on a socket or a single node. These configurations support claims about those runs, not a universal ranking across heterogeneous machines.

The numerical workloads are also selected. A lid-driven cavity, a cubic heat problem, and structured Laplacian tests provide useful evidence for the targeted solvers. They do not establish the same behavior for every OpenFOAM application, mesh geometry, or physical regime.

There is no reported uncertainty analysis for runtime. The paper does not provide intervals, repeated-run variation, or a statistical treatment of timing noise. Its results can still identify substantial observed differences, but they do not quantify how stable every reported timing relationship is across repetitions.

Several figures are described through approximate speedups or qualitative trends rather than complete numerical coordinates. This limits how precisely a reader can reconstruct scaling curves, compare neighboring settings, or evaluate the size of smaller effects.

The preconditioned experiments change more than implementation placement. Different aggregation and smoothing choices influence convergence. Consequently, the iteration and runtime comparisons evaluate complete configurations instead of identifying the independent causal contribution of CPU or GPU execution.

What the numerical results do not establish

The paper’s iteration counts show different termination behavior across solver variants. They do not supply a detailed residual-history analysis explaining those differences, nor do they establish a general numerical advantage for the pipelined method.

The reported tolerances make the stopping conditions visible, which is necessary for interpretation. However, the article does not present a separate error study demonstrating how every configuration’s final solution compares with an independent reference.

Similarly, the bandwidth explanation is persuasive within the reported measurements, but it does not prove that every remaining cost comes from one transfer path. Data structures, boundary exchanges, reductions, and device-memory access all participate in the observed behavior.

The static decomposition also relies on measurements from an initial allocation. If throughput changes with subdomain size, the first measured rate may not perfectly predict the final allocation. The equations expose that size dependence, but the paper does not provide a broad validation of allocation accuracy across changing sizes and mixed kernels.

These qualifications do not erase the contribution. They define it: an implemented hybrid solver strategy, a practical measured allocation procedure, and evidence of improved execution for selected OpenFOAM workloads, accompanied by a clear account of obstacles that remain.

What came after

No later citing work is identified in the available record, so a documented account of subsequent extensions cannot be established.

The paper itself sets out a concrete continuation. One direction is broader tuning across the different kernels of an application, rather than selecting a partition from the dominant solver alone. Another is runtime balancing that adapts as work changes, with memory-aware movement intended to prevent reassignment from becoming a transfer bottleneck.

A further direction concerns representation inside OpenFOAM. The authors argue that more suitable storage could improve the interface to accelerated computation. Their analysis makes this a structural question: the next improvement may require changing how the surrounding framework organizes data, as well as how the numerical routine executes.

Those proposals follow directly from the measured limits. They remain proposals here. The lasting contribution supported by the paper is the demonstrated value of treating device participation, communication scheduling, partitioning, and application-level evaluation as connected engineering decisions.

Cite

Cite as Amani AlOnazi, David Keyes, Alexey Lastovetsky and Vladimir Rychkov. 2015. Design and Optimization of OpenFOAM-based CFD Applications for Hybrid and Heterogeneous HPC Platforms. arXiv:1505.07630.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.48550/arxiv.1505.07630 · arXiv 1505.07630

@misc{alonazi2015design,
  title = {{Design and Optimization of OpenFOAM-based CFD Applications for Hybrid and Heterogeneous HPC Platforms}},
  author = {Amani AlOnazi, David Keyes, Alexey Lastovetsky and Vladimir Rychkov},
  year = {2015},
  doi = {10.48550/arxiv.1505.07630},
  eprint = {1505.07630},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.1505.07630}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/alonazi-2015-design-optimization-openfoam-based-cfd/