The scripts describes below are used for pure BIP programs as well as for MPI programs, when using the MPI-BIP implementation.
As BIP relies on direct access to the hardware, bugs in either the BIP library or in programs using BIP may crash the system, corrupt the system memory, so use BIP at your own risk. We have tried to design BIP so that these problems are very unlikely to occur by accident, but as the Copyright says: the software is provided as-is, without any express or implied warranty. In no event will the author be held liable for any damages.
But still note we are confident enough to run regularly BIP programs on a machine that is the Web and mail server for our team, and have never experiment any crash.
To use BIP you must ensure the Myricom IP driver (or the BIP IP
driver) has been shutdown (with ifconfig myri0 down
for
instance, it must still be present so do not ``rmmod'' it). This must
be done on all nodes you want to use for BIP, but BIP will work with no
problem with other nodes running the IP driver on the same Myrinet
network.
The scripts bipload
, biproute
, bipconf
can be run
from any machine even one that does not have a Myrinet board, but you
must be sure that you can ``rsh'' from this machine to every BIP node.
So you should have another network under IP in addition to the
Myrinet network on the BIP nodes. Check either you have a suited
/etc/hosts.equiv
file or adapt your .rhosts
file.
All Myrinet and BIP software should be available at the same location on every machine (for instance by NFS). The scripts also assume you have the same NFS home directory mounted on every machine accessible by the same path.
The Myrinet board used by BIP should be the unit 0 (so in fact the
first /dev/mlanaix
on which the user has permissions access).
If any one on these conditions are not fulfilled, look at the following section 5 to see how to configure and start a BIP application manually.
To use BIP successfully, you just need to ensure that the directory of
Myricom programs (probably something like
.../myrinet/bin/intel_linux
), and the directory with BIP
scripts utilities (something like .../bip/bin
) are in your
PATH
environment variable.
Eventually you can try to define the MYRI_HOME
environment
variable to the toplevel Myricom software directory if BIP scripts
cannot find automatically the Myricom utilities and libraries, but
this is normally not required.
The structure of the BIP distribution should not be changed, so that the scripts are able to find the files they need.
The first time you want to use BIP or each time the Myrinet network
topology change you have to run the program biproute
passing as
arguments the names of the machines you may want to use,
biproute
will determine the Myrinet network sub-topology
consisting of the machines you want to use as BIP nodes in an
application (note that biproute
relies on the Myricom tool
print_routes
and the Myricom MCP to accomplish this task).
The results of biproute
will be stored in the file
$HOME/.bip/bipdatabase
.
Example: % biproute lhpca lhpcb lhpcc lhpcd lhpcg lhpch
Before running a BIP application, you need to specify a set of
machines on which to run it with bipconf
. This will create a
configuration file read at run-time by each node. Just pass as
arguments the names of the machines to use. The order of the arguments
will determine the numbering of the processes in the BIP application.
Example: %bipconf lhpca lhpcd
bipconf
store the configuration info in
$HOME/.bip/bipconf
, you can use the option -f <file>
to
store the information in an another file (in this latter case you will
then have to pass the same option to bipload
also, the
rationale is to be able to keep some often used configuration files).
The simplest way to compile an application is to use bipcc
,
which is a script that will take care of adding the appropriate
``include'' directory, library directory in the search path as well as
adding all BIP and Myrinet libraries required, all arguments are
passed as is to the real compiler.
For instance in the bip/test
directory:
bipcc jeton.c -o jeton
will create the executable jeton
.
For MPI programs, just add -lmpi
at the end of the compilation
line at link time.
If you want to use directly the normal C compiler,
.../bip/include
directory to the include search path (option -I
).
.../bip/lib
directory to the library search path (option -L
)
myrinet/lib/intel_linux
directory to the library
search path (option -L
)
-lbip
, -ldio
,
-lLanaiDevice
.
Syntax: bipload [-sz <n> ] [ -f <configfile> ] [ -q ] prog [args] ...
.
To start an application, use the script bipload
, pass to it the
name of the executable and the application arguments. If you want to
use a different executable for each BIP node, you will have to start
them manually on each machine in the configuration.
The option -sz <n>
of bipload
means the use of only the
n first machines of the configuration defined with bipconf
, so
n must be less or equal to the number of machines specified with
bipconf
. The option -q
means to suppress a few messages
that are normally written at initialization and termination by the BIP
library. The option -f <file>
allows to specify explicitly the
file describing the configuration of BIP nodes to use for the run
instead of using the default file creating by bipconf
:
$HOME/.bip/bipconf
.
When starting an application manually the effect of the option
-q
and -sz
can be achieved by setting the environment
variable BIP_OPTS
. For instance BIP_OPTS=n5q
is
equivalent to having the option -q
and -sz 5
. The option
-f
is replaced with the environment variable BIPCONF
.