Open Scientific Software

OP2 and OPS: Performance-Portable DSL Frameworks

Our software ecosystem enables domain scientists to express numerical methods once and run efficiently on multi-core CPUs, GPUs, and clusters without maintaining architecture-specific code forks.

Framework Overview

OP2 (Unstructured Meshes)

Embedded DSL for finite-volume and finite-element style applications on unstructured meshes. Developers define sets, maps, and data access patterns; OP2 handles backend-specific scheduling and execution.

  • Backends: OpenMP, CUDA, HIP/SYCL, MPI
  • Applications: HYDRA, VOLNA, BASEMENT
  • Focus: abstraction without performance loss

OPS (Structured Multi-block Grids)

Structured-grid DSL with code generation and runtime loop tiling for bandwidth-limited stencil codes, aimed at predictable performance portability.

  • Backends: OpenMP, CUDA, HIP/SYCL, MPI + hybrid strategies
  • Applications: OpenSBLI, SENGA2, DNS pipelines
  • Focus: memory movement optimization

Quick Start Concepts

Typical workflow: define iteration spaces and data dependencies in high-level kernels, then select target backends at build time or runtime.

OP2 Kernel Sketch

// Conceptual pseudo-code
op_set cells = op_decl_set(nCells, "cells");
op_map c2n = op_decl_map(cells, nodes, 4, c2n_idx, "c2n");
op_par_loop(update_flux, "update_flux", cells,
  op_arg_dat(pressure, -1, OP_ID, 1, "double", OP_READ),
  op_arg_dat(residual, 0, c2n, 1, "double", OP_INC));

OPS Stencil Sketch

// Conceptual pseudo-code
ops_block block = ops_decl_block(3, "fluid");
ops_dat rho = ops_decl_dat(block, 1, size, base, d_m, d_p,
  rho_data, "double", "rho");
ops_par_loop(step_kernel, "step_kernel", block, 3, range,
  ops_arg_dat(rho, 1, S3D_000, "double", OPS_RW));

Download and Documentation

Project Code Repository Documentation Status
OP2 GitHub / OP2-Common Documentation Active
OPS GitHub / OPS Documentation Active

Need a Research Collaboration?

We collaborate on integrating OP2/OPS-style abstractions into new domains and custom performance analysis pipelines.