+++ /dev/null
-#include "Sender.hpp"\r
-#include "PingPongTask.hpp"\r
-#include <Host.hpp>\r
-#include <HostNotFoundException.hpp>\r
-#include <Msg.hpp>\r
-\r
-#include <Msg.hpp>\r
-using namespace std;\r
-\r
-const double commSizeLat = 1;\r
-const double commSizeBw = 100000000;\r
-\r
-MSG_IMPLEMENT_DYNAMIC(Sender, Process);\r
-\r
-int Sender::main(int argc, char** argv)\r
-{\r
- info("Hello");\r
- \r
- int hostCount = argc;\r
- \r
- info(TEXT_("Host count : ") + TEXT_(hostCount));\r
- \r
- Host* hostTable = new Host[hostCount]; \r
- double time;\r
- double computeDuration = 0;\r
- PingPongTask* task;\r
- \r
- for(int pos = 0; pos < argc ; pos++) \r
- {\r
- try \r
- {\r
- hostTable[pos] = Host::getByName(argv[pos]);\r
- } \r
- catch(HostNotFoundException e) \r
- {\r
- error(TEXT_(e.toString()) + TEXT_(". Stopping Now!"));\r
- exit(1);\r
- }\r
- }\r
- \r
- for (int pos = 0; pos < hostCount; pos++) \r
- { \r
- time = getClock(); \r
- \r
- info(TEXT_("Sender time : ") + TEXT_(time));\r
- \r
- task = new PingPongTask("no name",computeDuration,commSizeLat);\r
- task->setTime(time);\r
- \r
- hostTable[pos].put(0,task);\r
- } \r
- \r
- info("Goodbye!");\r
-\r
- \r
- delete[] hostTable;\r
-\r
- delete this;\r
-\r
- return 0;\r
- \r
-}
\ No newline at end of file