2.1 Batch compilation (bsmllibc et bsmllibc.seq)
bsmllibc.mpi and bsmllibc.seq are scripts that calls the
Objective Caml batch compiler ocamlc, which compiles Caml source
files to bytecode object files and link these object files to produce
standalone bytecode executable files with arguments to use the
BSMLlib library.
bsmllibc.mpi produces a parallel version of the program (it also uses
the mpicc command ; the ocamlc command is called
with the -custom flag). To execute such a compiled program use
the mpirun command.
bsmllibc.seq produces a sequential version of the program. It
may be useful if you want to test a program on a sequential machine,
particularly for programs that must be compiled with the -custom
flag.
When you run a program which uses the BSMLlib, the machine's BSP
parameters are read from the file $HOME/.bsmllibrc. Entries in
this file are of the form
number_of_procs,g_parameter,l_parameter
g_parameter and l_parameter must be written as caml float ie, 1 is written 1. or 1.0. The sequential
version of the library reads the first line of the file, the parallel
version reads the line which correspond to the number of processor
available on your machine.
See also the ocamlc command and the mprun command.
2.2 Native-code compilation
bsmllibopt.mpi and bsmllibopt.seq produce
respectively parallel and sequential native code if the ocamlopt
compiler is present on your machine.
See also the ocamlopt command.
2.3 The toplevel system (bsmllib)
bsmllib permits interactive use of the Objective Caml system
with the BSMLlib library through a read-eval-print loop. In this
mode, the system repeatedly reads Caml phrases from the input, then
typechecks, compiles and evaluates them, then prints the inferred type
and result value, if any. The system prints a # (sharp) prompt before
reading each phrase. The evaluation is done sequentially. If you use the
pure functional subset of Ocaml the result will be exactly the same as
in the parallel case (Even if you use imperative features the result
may be the same).
See also the ocaml command.