1 #include "Sender.hpp"
\r
2 #include "PingPongTask.hpp"
\r
4 #include <HostNotFoundException.hpp>
\r
10 const double commSizeLat = 1;
\r
11 const double commSizeBw = 100000000;
\r
13 MSG_IMPLEMENT_DYNAMIC(Sender, Process);
\r
15 int Sender::main(int argc, char** argv)
\r
19 int hostCount = argc;
\r
21 info(TEXT_("Host count : ") + TEXT_(hostCount));
\r
23 Host* hostTable = new Host[hostCount];
\r
25 double computeDuration = 0;
\r
28 for(int pos = 0; pos < argc ; pos++)
\r
32 hostTable[pos] = Host::getByName(argv[pos]);
\r
34 catch(HostNotFoundException e)
\r
36 error(TEXT_(e.toString()) + TEXT_(". Stopping Now!"));
\r
41 for (int pos = 0; pos < hostCount; pos++)
\r
45 info(TEXT_("Sender time : ") + TEXT_(time));
\r
47 task = new PingPongTask("no name",computeDuration,commSizeLat);
\r
48 task->setTime(time);
\r
50 hostTable[pos].put(0,task);
\r