DL-FIND is a geometry optimisation library [5,6] that is included in the ChemShell distribution as the standard optimisation driver. ChemShell and DL-FIND communicate via a well-defined interface which is used for passing options, geometries, energies and gradients between the two codes.
DL-FIND has its own implementation of task-farming parallelism . The parallel facilities consist of a collection of wrapper functions around MPI library calls to share data between processors and a parallel interface to pass details of the task farm to or from the calling program. Two parallel strategies have been implemented: in the first, the calling program sets up the task farm and passes the setup information and MPI communicators to DL-FIND, while in the second DL-FIND sets up the task farm and passes the setup information in the opposite direction.
MPI_COMM_COUNTERPARTSis used for this purpose, which groups together the master nodes.
To make the ChemShell environment accessible to DL-FIND, interface subroutines were added to ChemShell to provide the required information about the task farm setup:
dlf_get_params: additional parameters
glob%ntasks(number of workgroups) and
tldf_farm(=0 to indicate that ChemShell sets up the task farm).
dlf_get_procinfo: supplies the number of processors, node ID and the
dlf_get_taskfarm: supplies the number of workgroups, number of processors per workgroup, the rank of the current processor in the workgroup, the rank of the workgroup and two MPI communicators:
Two other interface routines (
dlf_put_taskfarm) are only
used when DL-FIND sets up the taskfarm and are therefore not required for the ChemShell interface.
A number of ChemShell
routines were written to expose the above information to the interface.
There is a subtle difference between the ChemShell and DL-FIND task-farming environments which
has to be reconciled by the interface. On the ChemShell side only the master nodes (one per workgroup)
execute ChemShell commands such as DL-FIND calls. However, the DL-FIND parallel routines assume that
they are running on all processors. To work around this ChemShell only provides information on the
master nodes to DL-FIND so that DL-FIND sees only one node per workgroup. DL-FIND's
parallel algorithms can then run unchanged in the ChemShell environment.
In practice this means that the `world' communicator passed to DL-FIND is actually
MPI_COMM_COUNTERPARTS, the total number of processors is set equal to the number
of workgroups and the number of processors per workgroup is set equal to 1. A dummy value can then be sent
Tom Keal 2010-06-29