Loci: Logic Programming for Parallel Computational Field Simulations

The Loci Framework

The Loci framework was originally developed in the late 1990s with support from the NSF ERC for Computational Field Simulations to simplify the development of complex numerical models that can take advantage of massively parallel high end computing systems. The framework provides a rule-based programming model whereby an application is described in terms of a collection of simple computational kernels. A key feature of the Loci framework are that these computational kernels are documented such that the data-flow between kernels can be extracted using relational annotations that are provided by the rules. In this system the given data is provided as a set of facts (relations). The application is then given in the form of a collection of transformation rules. Finally, the user makes a query (e.g. what is the heat flux at this surface?) From this the scheduler provided by the Loci framework provide a composition of the provided transformations that will answer the query. The effect of the programming model is to place numerical programming in a sphere similar to one of information management using relation databases where problems are solved using powerful relational queries.

The advantage of the Loci framework is that it views the data-structures of a scientific computation abstractly as a relation. Computational kernels then read and write data using relational queries. Relations provide a mechanism for abstracting the data-structure from the computations. In consideration of performance most data-structures in Loci are implemented using distributed arrays, but the model does not preclude alternative implementations such as hashed containers. This separation of concerns gives the Loci programming model an ability to morph an application onto a wide variety of architectural configurations.

To facilitate flexible scheduling of computations, the majority of computational transformations described by Loci rules have single-assignment semantics and are referentially transparent. Loci takes advantage of these features in order to optimize the scheduling of computations in order to factor in non-uniform cost structures presented by modern high end computing systems. For example, Loci provides a work replication optimization that replicates computations on remote processors in order to reduce inter-processor bandwidth requirements. These optimization have been shown to improve application scalability on clusters that use low-cost and subsequently low-bandwidth interconnect. Optimizations that change the order of computations in order to enhance locality have also been implemented and shown to improve application performance.

Why is the system called Loci?

The name of this system, Loci, is the plural of locus. The meaning of locus that is implied here is the set of points that satisfy some given set of rules. For example, a circle is the the locus of points that are equidistant from a given center point. The Loci system derives the control structure by finding the set of "entities" that satisfy the rules given to the system. Thus, in a discrete sense, the program control structure in the Loci system is derived by computing a set of locus. From this the process the Loci system borrows its name.

Source Code

Latest Stable Loci Release: Loci-3.3-p4.tgz

Representative Papers

A Candidate Application: Chem a Finite-Rate Chemistry Solver

The Loci/CHEM code, originally developed as a technology demonstrator for the Loci framework, has become a well developed and mature simulation code for complex multiphysics simulations. The solver that forms the central core of the code is based on high-resolution Godonov methods implemented for multicomponent flows using an implicit time integration scheme that makes the code effective for high Reynolds number flows at high speeds. The core algorithims have been extended to accurately model flows at low speeds through the use of PDE preconditioning techniques.

Since the original development in 1999, the Loci/CHEM code has been significantly extended under support from NASA Marshall Space Flight Center in order to simulate cryogenics, high pressure combustion, multiphase flows, coupled non-gray radiation effects. More recently support from the Air Force, Department of Homeland Security and US Army are extending the capabilities of this mature production code into areas of hypersonic flows and blast simulations. Although the first version of the code was released in 1999, by 2006 the Loci/CHEM code was among the top 30 in CPU hours requested on the DoD MSRC centers. Today it is used widely by NASA and industry predominately in the simulation of aerospace related problems. Notably it has been used extensively as the reference model in external aerodynamics simulations for the ARES I. More information about the CHEM code can be found here .