Une nouvelle version du portail de gestion des comptes externes sera mise en production lundi 09 août. Elle permettra d'allonger la validité d'un compte externe jusqu'à 3 ans. Pour plus de détails sur cette version consulter : https://doc-si.inria.fr/x/FCeS

Commit 852999c1 authored by EYRAUD-DUBOIS Lionel's avatar EYRAUD-DUBOIS Lionel
Browse files

pmtool: add a 'share' option for all algorithms

parent 816ffd3e
...@@ -317,6 +317,11 @@ int main(int argc, char** argv) { ...@@ -317,6 +317,11 @@ int main(int argc, char** argv) {
seq.add(localExport); seq.add(localExport);
} }
InternalShare* share = NULL;
if(opts.isPresent("share")) {
share = new InternalShare(opts.asString("share"), &instance);
seq.add(share);
}
string name = buildName(it->first->name(), outputNamesRaw, optionKeys, it->second); string name = buildName(it->first->name(), outputNamesRaw, optionKeys, it->second);
...@@ -352,6 +357,11 @@ int main(int argc, char** argv) { ...@@ -352,6 +357,11 @@ int main(int argc, char** argv) {
seq.remove(localExport); seq.remove(localExport);
free(localExport); free(localExport);
} }
if(share) {
share->finish();
seq.remove(share);
free(share);
}
} }
if(globalExport) free(globalExport); if(globalExport) free(globalExport);
......
...@@ -99,3 +99,19 @@ void UtilAnalysis::write(string prefix) { ...@@ -99,3 +99,19 @@ void UtilAnalysis::write(string prefix) {
} }
reset(); reset();
} }
InternalShare::InternalShare(string name, Instance* ins) :
shareName(name), instance(ins), allocation(ins->nbTasks, -1),
startTimes(ins->nbTasks, -1) {
}
void InternalShare::onSchedule(int i, int w, double s, double f) {
allocation[i] = instance->getType(w);
startTimes[i] = s;
}
void InternalShare::finish() {
instance->extraData[shareName + "[alloc]"] = (allocation);
instance->extraData[shareName + "[start]"] = (startTimes);
}
...@@ -50,5 +50,17 @@ class UtilAnalysis : public SchedAction { ...@@ -50,5 +50,17 @@ class UtilAnalysis : public SchedAction {
void write(std::string prefix); void write(std::string prefix);
}; };
class InternalShare : public SchedAction {
std::string shareName;
Instance* instance;
std::vector<double> allocation;
std::vector<double> startTimes;
public:
InternalShare(std::string shareName, Instance* ins);
void onSchedule(int i, int w, double s, double f);
void finish();
};
#endif #endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment