Loading...
Searching...
No Matches
37. TCP/IP Support

# TCP/IP Master Slave Support

StarPU provides a transparent way to execute applications across many nodes. The Master Slave support permits to use remote cores without thinking about data distribution. This support can be activated with the `configure` option --enable-tcpip-master-slave.

The existing kernels for CPU devices can be used as such. They only have to be exposed through the name of the function in the starpu_codelet::cpu_funcs_name field. Functions have to be globally-visible (i.e. not static) for StarPU to be able to look them up, and `-rdynamic` must be passed to gcc (or `-export-dynamic` to ld) so that symbols of the main program are visible.

By default, one core is dedicated on the master node to manage the entire set of slaves.

Choosing the number of cores on each slave device is done by setting the environment variable STARPU_NTCPIPMSTHREADS=<number> with `<number>` being the requested number of cores. By default, all the slave's cores are used.

The master should be given the number of slaves that are expected to be run with the STARPU_TCPIP_MS_SLAVES environment variable.

The slaves should then be started, and their number also should be given with the STARPU_TCPIP_MS_SLAVES environment variable. They should additionally be given the IP address of the master with the STARPU_TCPIP_MS_MASTER environment variable.

For simple local checks, one can use the `starpu_tcpipexec` tool, which just starts the application several times. Setting the number of slaves nodes is done by changing the `-np` parameter.