Parallel Software Products

Why Use CAPLib?

Main Functions

Simplifying Compiling and Running

Guaranteed Portability

Parallel Software Products provide the freely available communications library CAPLib which is used in conjunction with ParaWise. CAPLib is a high level generic communication library developed by Parallel Software Products Ltd. The CAPLib calls map onto the low level communication calls of either machine specific communications such as Cray SHMEM or onto communication libraries such as MPI or PVM. This allows the generated parallel code to be easily (and quickly) ported from one machine or communication library to another simply by linking in the appropriate CAPLib library. CAPLib may also be easily adapted for use with any other communication library or low level communications, that is available now or in the future.

The CAPLib utilities implement many basic requirements of parallel code including:

  • Communications that avoid communicating over the edges of a grid of processors
  • Commutative operations such as (summations or maximums) performed efficiently using a binary tree of processors if possible
  • Commutative operations for maximums/minimums where the location of the selected value in the processor topology is need (e.g. which array index was the maximum)
  • Adding connections determined from inspector loops generated in an unstructured mesh application code to, for example, identify data owned by other processors that are needed
  • Determine an effective unstructured mesh partition that attempts to maximise load balance whilst minimising inter-processor communication

Compiling, configuring and running parallel jobs on parallel systems can be a complex and fraught task. Compilation for parallel execution often requires the passing of additional specific arguments to the compiler and in addition parallel computers may require a complex configuration by the user in order to submit a job. Parallel execution procedures also vary from one system to another and even within different parallel environments on the same system. For example, PVM and MPI use very different methods for job initialization. It is therefore a generally time consuming process learning how to execute and run parallel jobs on different parallel systems. The complexity of the parallel environment can also lead to user mistakes in compilation and job submission, resulting in the user wasting time and effort re-compiling or re-submitting jobs. This can deter users from using parallel systems all together. Users running parallel jobs or developing parallel code, cycling through the edit/compile/run/compare-with-serial development cycle, maybe on several different machines, require a consistent and generic interface to all aspects of using the parallel system. CAPLib provides this functionality and is  freely available from our Downloads page.

CAPLib also seamlessly handles many compile line flags where, for example, real variables are promoted to be double precision.

To guarantee the portability of ParaWise generated parallel code that uses CAPLib utilities, PSP also freely provide the Fortran source code for a simple CAPLib-to-MPI interface so that the parallel code can execute on any system that has MPI.