How to Use and Develop with Acquire
Acquire is written using C++/Siren, with a C++/Siren API provided to simplify the writing and development of new types of WorkPacket. When a new type of WorkPacket has been developed, it must be packaged into a single executable (WorkPacketApp) and installed on all of the resources on which it will be run. This can be via either a code-signed and verified WorkPacketApp repository (HPC AppStore) or it can be transmitted and installed on the compute resource during initialisation of the WorkQueue that manages that resource. Note that installation is dynamic, meaning that if the required WorkPacketApp is not available on the compute resource, then it is downloaded either from an HPC AppStore, or from the parent WorkQueue during WorkQueue initialisation. Note that many HPC compute resources will only allow running and installation of WorkPackets that have been downloaded from trusted, code-signed HPC AppStores.
The C++/Siren API is designed to simplify using Acquire with existing projects. Three templates and tutorials are provided that show the three different levels of using Acquire with existing projects;
Level 1: Wrapping an existing code
Each WorkPacket contains a single invocation of an existing program. This could be, for example, a shell script, a molecular dynamics program, a quantum chemical program etc. This allows multiple programs to be glued together into a single ensemble computing calculation. The WorkPacket could contain the executable of the program, together with the input files and command-line options, or it could contain just the input files and command-line options. Note that if the executable is not contained in the WorkPacket, then the WorkPacket must specify the name and compatible version(s) of the program required, and the WorkQueue would then be limited to running the WorkPacket on only resources that had the desired version of the program installed.
A simple template is provided with Acquire to allow for the easy development of these types of WorkPacket.
Level 2: Integration into an exisiting code
Each WorkPacket contains function calls that use functionality of an existing program. Acquire can be linked to the existing program, and a simple C++/Siren API used to call functions from that existing program. Initially, the existing program may be written in C++, C, Objective-C or Fortran. Note that the WorkPacketApp must contain the existing program (link to that program). The user will also have to provide their own code that would save the state of the program (e.g. the data to pass to the computation, and the results returned), so that it can be serialised and transmitted between compute resources.
Simple C++, C, Objective-C and Fortran templates are provided with Acquire to allow of the easy development of these types of WorkPacket.
Level 3: Development of a new code
The tightest level of integration is to use Acquire with a new C++/Siren program. C++/Siren provides a runtime library and subset of C++ that allows for automatic serialisation of objects and program state. This allows the burden of saving and restoring state to be handled automatically by the compiler, freeing the developer to concentrate on the design of their algorithm. As Acquire is written using C++/Siren, it is trivial to integrate Acquire into an existing C++/Siren code.
A simple C++/Siren example program and template is provided with Acquire to allow for the easy development of these types of WorkPacket.
Note that these levels are not exclusive. It is likely that programs will be developed that contain mixtures of level of WorkPacket, or that a new C++/Siren code may itself link with an existing Fortran code.