# Example of a Structured Dagger Program

## What does it do ?

`main` chare gets created. It then creates a `test` chare. `main` then invokes the sdagentry `teststart`, and sends 1000 messages with appropriate reference number set. the `teststart` entry function of `test` chare waits in forall loop for messages with appropriate reference numbers, and adds the data member of the messages to a member of the chare called `sum`. After all the messages arrive, it prints out the `sum` and exits program.

## Files:

Makefile
main.C
main.h
main.ci
test.sdag
test.C
test.h
test.ci