A cloud for heterogeneous architectures:
- Executor - uses performance data to determine a Resource to run an implementaiton on.,
src/executor
- Scheduler - a job scheduler,
src/scheduler
- Dispatcher - a job executor,
src/dispatcher
- The client API - available in
src/client/
.
The startup action sequence is:
- start dispatcher (
./build/dispatcher <dispPort>
) - start scheduler (
./build/scheduler <schedPort> <dispPort>
) - start executor (
./build/executor -c <client_id> -p <schedPort> -n <schedHostname>
) - run a client application (which submits jobs to the executor service,
e.g.
./build/MovingAverageOneDfe
)
Note For client applications the environmental variable CLIENT_ID
must match that of the paramater passed into the executor service with the -c
flag
so the startup command for a client application becomes:
CLIENT_ID=${YOUR_ID_HERE} ./build/MOvingAverageOneDfe
If the variable is set on the machine the executor is running on, the executor will ignore the -c
flag.
Note To enable DFE implementations, the dispatcher must be started on a machine with DFEs and Hardware MaxelerOS installed. The hardware MaxelerOS library must be preloaded, so the startup command for the dispatcher becomes:
LD_PRELOAD=/opt/maxeler/maxeleros/lib/libmaxeleros.so ./dispatcher 8111
Run cmake, which will create a Makefile:
mkdir build && cd build && cmake ..
Then use makefile targets:
make
make test
Note You will want to start the servers locally before running ```make test``.
A bitstream (.max) is a compiled dataflow design which can run on DFEs. We store bitstreams in a separate submodule, to avoid cluttering up the main repository.
If you intend to run DFE designs you should get the bitstream submodule with
git submodule init && git submodule update
The resulting directory should look like this:
src/bitstreams/
DfeLib.hpp
MovingAverage/
MovingAverage.hpp
MovingAverage.c
MovingAverage.max
MovingAverageMaxfiles.h
MovingAverageMaxfiles_dfe.o
.....
DfeLib.hpp is a convenience header with all the functions exposed by the various maxfiles.
Each bitstream exposes a set of functions for the Dispatcher to call when running on a machine with access to DFEs.
NOTE Compiling the CPU code for bitstreams requires the MaxelerOS library and headers.
From the user perspective, a sample program will look like:
#include <client_api.hpp>
int main() {
int data[] = {1, 2, 3, 4};
movingAverage(4, data);
}
This requests a moving average task to be performed. The sequence of actions would then be:
- client API (on behalf of user program) creates a client to connect to the executor
- client API sends job description and data to the executor.
- Executor determines an efficent resource to run the job on using a heuristic.
- Executor sends the job description to the scheduler.
- scheduler sends job description to the dispatcher
- dispatcher executes job and sends result to scheduler
- scheduler sends result to the executor
- executor sends result to the client
- client closes executor connection