dnlp(1)                    OpenBSD Reference Manual                    dnlp(1)

NAME
     dnlp - distributed Prolog environment

SYNOPSIS
     dnlp [-rpmtT] word1 [...wordN]

DESCRIPTION
     The dnlp utility is a simple tool to distribute a single Prolog predicate
     and input data amongst multiple participating nodes.  The predicate has a
     fixed compile-time name, arity, and argument composition.  Predicate in-
     put is in the form of a sentence (a sequence of word tokens) which is
     permuted into an array of sentence fragments.  dnlp was originally devel-
     oped for natural language processing; although the tool can be used for
     other purposes, we strongly recommend using pl-mpi(1), found at
     apps.lumii.lv, for which dnlp was a prototype.  dnlp must be launched
     within your operating system's MPI environment, likely by means of
     mpirun(1) or similar tool.

     The options are as follows:

     -r   Print per-fragment results, or in Prolog terminology, print the in-
          terpreted output atom of the predicate for each permute index.  See
          the PREDICATE section for more information on input/output terms.

     -p   Print the array of sentence fragments before processing, as well as
          other useful pre-execution statistics.

     -T   Print the total and cumulative (wall-clock) run-time.

     -t   Print the per-fragment (wall-clock) run-time.

     -m   Have the master (MPI rank 0) also participate in the processing.
          This is not recommended, as completed jobs may queue on the master
          node, thus starving other compute nodes.

     The arguments, e.g., ``pa dienu autobuss iet'', are processed into an ar-
     ray of contiguous sub-sentence fragments.  Given the above example, this
     would be ``pa'', ``dienu'', ``autobuss'', ``iet'', ``pa dienu'', ``dienu
     autobuss'', ``pa dienu autobuss,'' ``dienu autobuss iet'', and ``pa dienu
     autobuss iet''.

     Note that in dnlp, the input array is ordered least-greatest by cardinal-
     ity: if there is a significant processing difference in cardinality, this
     may cause the last (greatest-cardinality) fragment to process last, which
     is obviously not optimal.

PREDICATE
     The predicate name is a preprocessor macro fixed at ``dnlp''.  It has an
     arity of 2, with the first term being the predicate input (a sentence
     fragment as defined in the command-line arguments) and the second term
     being an output integer.  This must be an integer term of either 0 or 1,
     corresponding to false and true, respectively.  Predicates generating a
     failure condition will cause the system to abort.

MPI
     The dnlp utility can run on one or more MPI nodes.  We suggest running
     with at least two nodes, or in other words, running dnlp with one extra
     MPI node for ``master'' processing.  One may trigger the master to par-
     ticipate with the -m switch, but this is not optimal as other slaves may
     finish their tokens first while the master is busy, resulting in starva-
     tion.

ENVIRONMENT
     Environment variables are not used by the dnlp utility itself, but your
     MPI or Prolog installations may make use of them.

EXAMPLES
           mpirun -np 10 dnlp pa dienu autobuss iet
           mpirun -np 10 dnlp -tT pa dienu autobuss iet

AUTHORS
     The dnlp utility was developed at the University of Latvia's IMCS by
     Kristaps Dzonsons <kristaps.dzonsons@latnet.lv>.

OBSOLESCENCE
     The dnlp utility has been deprecated in favour of pl-mpi(1).  We strongly
     encourage using pl-mpi(1), which has significantly greater flexibility
     and Prolog intergration.

SEE ALSO
     pl-mpi(1), mpirun(1), pl(1)

OpenBSD 4.0                     January 2, 2007                              2