Mise à jour terminée. Pour connaître les apports de la version 13.8.4 par rapport à notre ancienne version vous pouvez lire les "Release Notes" suivantes :
https://about.gitlab.com/releases/2021/02/11/security-release-gitlab-13-8-4-released/
https://about.gitlab.com/releases/2021/02/05/gitlab-13-8-3-released/

Commit ada14e0a authored by NICLAUSSE Nicolas's avatar NICLAUSSE Nicolas

add composer evaluator tool

parent 972c6e4e
......@@ -13,6 +13,7 @@
### Code:
add_subdirectory(dtkCreator)
add_subdirectory(dtkComposerEvaluator)
add_subdirectory(dtkDistributedServer)
add_subdirectory(dtkDistributedSlave)
add_subdirectory(dtkDistributedDashboard)
......
### CMakeLists.txt ---
##
## Author: Nicolas Niclausse
## Copyright (C) 2012 - Nicolas Niclausse, Inria.
######################################################################
project(dtkComposerEvaluator)
## #################################################################
## Sources
## #################################################################
set(${PROJECT_NAME}_SOURCES
main.cpp)
## #################################################################
## Build rules
## #################################################################
add_executable(${PROJECT_NAME}
${${PROJECT_NAME}_SOURCES})
target_link_libraries(${PROJECT_NAME}
dtkComposer
dtkDistributed
dtkLog
)
qt5_use_modules(${PROJECT_NAME} Core)
qt5_use_modules(${PROJECT_NAME} Concurrent)
qt5_use_modules(${PROJECT_NAME} Network)
## #################################################################
## Source file layout in development environments like Visual Studio
## #################################################################
SOURCE_GROUP("Header Files" REGULAR_EXPRESSION .*\\.h\$)
## #################################################################
## Installation
## #################################################################
install(TARGETS ${PROJECT_NAME}
BUNDLE DESTINATION bin
RUNTIME DESTINATION bin)
/* main.cpp ---
*
* Author: Nicolas Niclausse
* Copyright (C) 2014 - Nicolas Niclausse, Inria.
* Created: 2014/10/28 12:45:34
*/
/* Commentary:
*
*/
/* Change log:
*
*/
#include <dtkComposer>
#include <dtkDistributed>
#include <dtkCore/dtkCore.h>
#include <QtConcurrent>
int main(int argc, char **argv)
{
bool useGUI = false;
QApplication application(argc, argv, useGUI);
application.setApplicationName("dtkComposerEvaluator");
application.setApplicationVersion("1.0.0");
application.setOrganizationName("inria");
application.setOrganizationDomain("fr");
// plugins
dtkDistributedSettings settings;
settings.beginGroup("communicator");
qDebug() << "initialize plugin manager "<< settings.value("plugins").toString();
dtkDistributed::communicator::pluginManager().initialize(settings.value("plugins").toString());
qDebug() << "initialization done ";
settings.endGroup();
qDebug() << dtkDistributed::communicator::pluginManager().plugins();
qDebug() << dtkDistributed::communicator::pluginFactory().keys();
QStringList args = QCoreApplication::arguments();
if(args.count() < 2) {
qDebug() << "argv" << args;
qDebug() << "Usage: " << argv[0] << "--spawn | [-pg] <composition> ";
return 0;
}
// dtkComposerNodeFactory *factory = new dtkComposerNodeFactory;
dtkComposerNodeFactory *factory;
if (args[1] == "--spawn") {
// FIXME: don't hardcode plugin
dtkDistributedPolicy policy;
dtkDistributedWorkerManager manager;
policy.setType("mpi3");
manager.setPolicy(&policy);
dtkComposerEvaluatorProcess p;
qlonglong np;
QStringList hosts;
// dtkDistributedCommunicator *comm = manager.spawn();
dtkDistributedCommunicator *comm ;
manager.spawn();
p.setInternalCommunicator(comm);
p.setParentCommunicator(policy.communicator());
p.setFactory(factory);
p.setApplication("dtkComposerEvaluator");
int value;
do { value = p.exec(); } while (value == 0);
return value;
}
dtkComposerScene *scene = new dtkComposerScene;
dtkComposerStack *stack = new dtkComposerStack;
dtkComposerGraph *graph = new dtkComposerGraph;
dtkComposerEvaluator *evaluator = new dtkComposerEvaluator;;
scene->setFactory(factory);
scene->setStack(stack);
scene->setGraph(graph);
evaluator->setGraph(graph);
dtkComposerReader *reader;
reader = new dtkComposerReader;
reader->setFactory(factory);
reader->setScene(scene);
reader->setGraph(graph);
int index= 1;
if (args[1] == "-pg") {
index = 2;
evaluator->setProfiling(true);
}
if (!reader->read(argv[index])) {
qDebug() << "read failure for " << argv[index];
return 1;
} else {
QObject::connect(evaluator,SIGNAL(evaluationStopped()),&application, SLOT(quit()));
QtConcurrent::run(evaluator, &dtkComposerEvaluator::run_static, false);
application.exec();
// dtkPluginManager::instance()->uninitialize();
}
}
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