For network of workstations, the list of machines to run the program can be specified in a file. Without a nodelist file, CHARM++ runs the program only on the local machine.
The format of this file allows you to define groups of machines, giving each group a name. Each line of the nodes file is a command. The most important command is:
which specifies a host. The other commands are qualifiers: they modify the properties of all hosts that follow them. The qualifiers are:
group <groupname> - subsequent hosts are members of specified group
login <login> - subsequent hosts use the specified login
shell <shell> - subsequent hosts use the specified remote shell
setup <cmd> - subsequent hosts should execute cmd
pathfix <dir1> <dir2> - subsequent hosts should replace dir1 with dir2 in the program path
cpus <n> - subsequent hosts should use N light-weight processes
speed <s> - subsequent hosts have relative speed rating
ext <extn> - subsequent hosts should append extn to the pgm name
Note: By default, charmrun uses a remote shell ``rsh'' to spawn node processes on the remote hosts. The shell qualifier can be used to override it with say, ``ssh''. One can set the CONV_RSH environment variable or use charmrun option ++remote-shell to override the default remote shell for all hosts with unspecified shell qualifier.
All qualifiers accept ``*'' as an argument, this resets the modifier to its default value. Note that currently, the passwd, cpus, and speed factors are ignored. Inline qualifiers are also allowed:
Except for ``group'', every other qualifier can be inlined, with the restriction that if the ``setup'' qualifier is inlined, it should be the last qualifier on the ``host'' or ``group'' statement line.
Here is a simple nodes file:
This defines three groups of machines: group kale-sun, group kale-sol, and group main. The ++nodegroup option is used to specify which group of machines to use. Note that there is wraparound: if you specify more nodes than there are hosts in the group, it will reuse hosts. Thus,
uses hosts (charm, dp, grace, dagger, charm, dp) respectively as nodes (0, 1, 2, 3, 4, 5).
If you don't specify a ++nodegroup, the default is ++nodegroup main. Thus, if one specifies
it will use ``localhost'' four times. ``localhost'' is a Unix trick; it always find a name for whatever machine you're on.
The user is required to set up remote login permissions on all nodes using the ``.rhosts'' file in the home directory if ``rsh'' is used for remote login into the hosts. If ``ssh'' is used, the user will have to setup password-less login to remote hosts using RSA authentication based on a key-pair and adding public keys to ``.ssh/authorized_keys'' file. See ``ssh'' documentation for more information.
In a network environment, charmrun must be able to locate the directory of the executable. If all workstations share a common file name space this is trivial. If they don't, charmrun will attempt to find the executable in a directory with the same path from the $HOME directory. Pathname resolution is performed as follows:
April 10, 2012
Charm Homepage