Commit 6f7ed83f authored by NICLAUSSE Nicolas's avatar NICLAUSSE Nicolas

don't use dtkDistributed when no policy is set

parent cd9fe7ac
......@@ -62,20 +62,6 @@ int main(int argc, char **argv)
dtkComposer::node::initialize();
dtkComposerNodeFactory *factory = &(dtkComposer::node::factory());
// if (args[1] == "--spawn") {
// dtkComposerEvaluatorProcess p;
// // p.setInternalCommunicator(comm);
// p.setParentCommunicator(policy.communicator());
// p.setFactory(factory);
// p.setApplication("dtkComposerEvaluator");
// int value;
// do { value = p.exec(); } while (value == 0);
// return value;
// }
if (parser->isSet(slaveOption)) {
dtkComposerEvaluatorSlave *slave = new dtkComposerEvaluatorSlave;
......@@ -86,14 +72,14 @@ int main(int argc, char **argv)
slave->setServer(parser->value(serverOption));
slave->setFactory(factory);
application->spawn();
do {
application->exec(slave);
} while (slave->status() == 0);
application->unspawn();
QCommandLineOption policyOption("policy", "dtkDistributed policy (default is qthread)", "qthread|mpi|mpi3");
if (parser->isSet(policyOption)) {
application->spawn();
do { application->exec(slave); } while (slave->status() == 0);
application->unspawn();
} else {
do { slave->run(); } while (slave->status() == 0);
}
} else {
dtkComposerGraph *graph = new dtkComposerGraph;
......
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