changed metrics

This commit is contained in:
robert
2014-04-20 17:28:05 +02:00
parent c501985573
commit 354c871047
12 changed files with 206 additions and 80 deletions

View File

@@ -35,16 +35,12 @@ void SimulationManager::loadSimulationsFromXML(string uri)
cout << "\t-> parsing simulation objects .." << endl;
for (XMLElement* element = doc.FirstChildElement("simulation"); element != NULL;
element = element->NextSiblingElement("simulation"))
{
parseSimulationBatch(element);
}
cout << "\t-> checking paths .." << endl;
checkPaths();
@@ -61,14 +57,16 @@ void SimulationManager::runSimulations()
system(string("rm -rf " + exportPath).c_str());
for (auto& batch : simulationsBatches)
{
system(string("mkdir -p " + exportPath + "/"+batch.simulationName).c_str());
system(string("mkdir -p " + exportPath + "/" + batch.simulationName).c_str());
for (auto& dramSetup : batch.dramSetups)
{
string memconfig = getFileName(dramSetup.memconfig);
string memspec = getFileName(dramSetup.memspec);
for (auto& traceSetup : batch.traceSetups)
{
runSimulation(exportPath + "/" + batch.simulationName + "/" + memconfig + "-" + traceSetup.first + ".tdb",
runSimulation(exportPath + "/" + batch.simulationName + "/" + traceSetup.first + "-" + memconfig + "-" + memspec + ".tdb",
dramSetup, traceSetup.second);
}
}
@@ -80,13 +78,20 @@ void SimulationManager::parseSimulationBatch(XMLElement* simulation)
SimulationBatch batch;
batch.simulationName = simulation->Attribute("id");
string memspecUri = simulation->FirstChildElement("memspec")->GetText();
string memspecUri;
string addressmappingUri = simulation->FirstChildElement("addressmapping")->GetText();
for (XMLElement* element = simulation->FirstChildElement("memconfigs")->FirstChildElement("memconfig"); element != NULL;
element = element->NextSiblingElement("memconfig"))
for (XMLElement* element = simulation->FirstChildElement("memspec"); element != NULL;
element = element->NextSiblingElement("memspec"))
{
batch.dramSetups.push_back(DramSetup(element->GetText(), memspecUri, addressmappingUri));
memspecUri = element->GetText();
for (XMLElement* element = simulation->FirstChildElement("memconfigs")->FirstChildElement("memconfig"); element != NULL;
element = element->NextSiblingElement("memconfig"))
{
batch.dramSetups.push_back(DramSetup(element->GetText(), memspecUri, addressmappingUri));
}
}
for (XMLElement* element = simulation->FirstChildElement("trace-setups")->FirstChildElement("trace-setup"); element != NULL;
@@ -96,6 +101,7 @@ void SimulationManager::parseSimulationBatch(XMLElement* simulation)
}
simulationsBatches.push_back(batch);
}
void SimulationManager::checkPaths()
@@ -122,7 +128,7 @@ void SimulationManager::startTraceAnalyzer()
{
string p = getenv("trace");
string run_tpr = p + " -f ";
for(auto batch : simulationsBatches)
for (auto batch : simulationsBatches)
{
run_tpr += exportPath + "/" + batch.simulationName + " ";