Running the Server
This page describes how to setup and start the STREAM server. For
illustration, we assume that the server binary, net_server,
was installed in /home/user/stream/bin/ and the stream library,
in /home/user/stream/lib/, as described in the
installation step.
net_server dynamically loads the STREAM library, so
LD_LIBRARY_PATH should be set to include the path to the
STREAM library. Optionally, you might want to update PATH
to include the path to STREAM binaries:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/user/stream/lib/
export PATH=$PATH:/home/user/stream/bin/
The usage syntax for the net_server program is:
net_server -l [log-file-prefix] -c [config-file] -p [port-no]
- [log-file-prefix] is the prefix of the files used by the
server to write its execution logs. The server spawns off several threads
during execution, and each thread uses a different log file generated from
the prefix.
- [config-file] is a configuration file that specifies
various server parameters (e.g., the memory available to the server). See
here for an example configuration file. This file
also explains the meaning of all the configuration parameters. The only
parameter that you need to change is the CPU_SPEED - this has to be set
to the CPU clock speed of the machine on which the net_server is being run -
all the other paremeters can be left unchanged.
- [port-no] is the port on which the server listens for client
connections. (The server talks to the client through a network connection.)
The following is an example sequence of steps to start the server on port 9000:
- download this file to a local file called
config. Edit the last line of config and change the
value 2000 to the speed of your machine in MHz, rounded to the nearest integer.
mkdir logs
net_server -c config -l logs/log -p 9000