Remove PCA_QUIET
[alexxy/gromacs.git] / src / gromacs / commandline / cmdlinemodulemanager.cpp
index b88a3d3312dda96a92ef349c54b05e56a9a0018d..826d96fd9d9c24d86f7cc12764588dc3ccaef022 100644 (file)
@@ -515,7 +515,9 @@ void CommandLineModuleManager::addHelpTopic(HelpTopicPointer topic)
 int CommandLineModuleManager::run(int argc, char *argv[])
 {
     CommandLineModuleInterface    *module;
-    const bool                     bMaster = (gmx_node_rank() == 0);
+    // TODO: With thread-MPI, gmx_node_rank() returns random stuff here, so we
+    // need the first check.
+    const bool                     bMaster = (!gmx_mpi_initialized() || gmx_node_rank() == 0);
     bool                           bQuiet  = impl_->bQuiet_ || !bMaster;
     CommandLineCommonOptionsHolder optionsHolder;
     try
@@ -558,7 +560,11 @@ int CommandLineModuleManager::run(int argc, char *argv[])
         fprintf(stderr, "Will write debug log file: %s\n", filename.c_str());
         gmx_init_debug(optionsHolder.debugLevel(), filename.c_str());
     }
-    int rc = module->run(argc, argv);
+    int rc = 0;
+    if (!(module == impl_->helpModule_ && !bMaster))
+    {
+        rc = module->run(argc, argv);
+    }
     if (!bQuiet)
     {
         gmx_thanx(stderr);