int main(int argc, char* argv[]) { logger_id = "forker"; qInstallMessageHandler(qtMessageLogger); COMMAND_LINE_PARSER_CHECK(CommandLineHelper, "tideForker"); { auto worldComm = MPICommunicator{argc, argv}; if (worldComm.getSize() < 2) { std::cerr << "MPI group size < 2 detected. Use tide script or check" " MPI parameters." << std::endl; return EXIT_FAILURE; } // Init communicators: all MPI processes must follow the same steps auto masterForkerComm = MPICommunicator{worldComm, 0}; auto wallSwapSyncComm = MPICommunicator{worldComm, 0}; auto masterWallComm = MPICommunicator{worldComm, 0}; auto wallMasterComm = MPICommunicator{worldComm, 0}; Q_UNUSED(wallSwapSyncComm); Q_UNUSED(masterWallComm); Q_UNUSED(wallMasterComm); ProcessForker{masterForkerComm}.run(); } // close MPI connections print_log(LOG_DEBUG, LOG_GENERAL, "done."); return EXIT_SUCCESS; }
int main(int argc, char* argv[]) { logger_id = "forker"; qInstallMessageHandler(qtMessageLogger); COMMAND_LINE_PARSER_CHECK(CommandLineHelper, "tideForker"); { MPIChannelPtr worldChannel(new MPIChannel(argc, argv)); const int rank = worldChannel->getRank(); MPIChannelPtr localChannel(new MPIChannel(*worldChannel, 0, rank)); MPIChannelPtr mainChannel(new MPIChannel(*worldChannel, 0, rank)); ProcessForker(localChannel).run(); } print_log(LOG_DEBUG, LOG_GENERAL, "done."); return EXIT_SUCCESS; }
int main( int argc, char** argv ) { logger_id = "launcher"; qInstallMessageHandler( qtMessageLogger ); COMMAND_LINE_PARSER_CHECK( CommandLineOptions, "tideLauncher" ); // Load virtualkeyboard input context plugin qputenv( "QT_IM_MODULE", QByteArray( "virtualkeyboard" )); std::unique_ptr<Launcher> launcher; try { launcher.reset( new Launcher( argc, argv )); } catch( const std::runtime_error& exception ) { put_flog( LOG_ERROR, "failed to start: %s", exception.what( )); return EXIT_FAILURE; } return launcher->exec(); }
int main(int argc, char** argv) { logger_id = "whiteboard"; qInstallMessageHandler(qtMessageLogger); COMMAND_LINE_PARSER_CHECK(CommandLineOptions, "tideWhiteboard"); // Load virtualkeyboard input context plugin qputenv("QT_IM_MODULE", QByteArray("virtualkeyboard")); std::unique_ptr<Whiteboard> whiteboard; try { whiteboard.reset(new Whiteboard(argc, argv)); } catch (const std::exception& e) { print_log(LOG_FATAL, LOG_GENERAL, "failed to start: %s", e.what()); return EXIT_FAILURE; } return whiteboard->exec(); }