Commit 7253d105 authored by Utkarsh Ayachit's avatar Utkarsh Ayachit

integrate logging support in ParaView.

Adding support for logging using vtkLogger in ParaView.

* command line options (-v) enable users to specify log verbosity for
  messages shown on stderr by default.
* command line options (-l) allow users to request multiple log files with
  different verbosities.
* vtkPVLogger implements a category-based logging framework that allows
  users to elevate log levels for predefined categories at runtime using
  environment variables.
* proxies support a logname attribute that gets set with user
  friendly name to make it easier to interpret log messages.
parent 7485070a
......@@ -154,6 +154,8 @@ option(PARAVIEW_BUILD_QT_GUI "Enable ParaView Qt-based client" ON)
option(PARAVIEW_USE_MPI "Enable MPI support for parallel computing" OFF)
option(PARAVIEW_USE_VTKM "Enable VTK-m accelerated algorithms" ON)
option(PARAVIEW_USE_OSPRAY "Build ParaView with OSPRay Ray Traced rendering" OFF)
option(PARAVIEW_ENABLE_LOGGING "Enable logging support." ON)
mark_as_advanced(PARAVIEW_ENABLE_LOGGING)
set(paraview_web_default ON)
if (PARAVIEW_ENABLE_PYTHON AND WIN32)
......@@ -704,6 +706,12 @@ else ()
# Forward Python option to VTK.
set(VTK_WRAP_PYTHON "${PARAVIEW_ENABLE_PYTHON}")
# Forward logging option to VTK.
set(VTK_ENABLE_LOGGING "${PARAVIEW_ENABLE_LOGGING}")
if (PARAVIEW_ENABLE_LOGGING)
list(APPEND vtk_requested_modules VTK::loguru)
endif()
vtk_module_find_modules(vtk_module_files "${CMAKE_CURRENT_SOURCE_DIR}/VTK")
vtk_module_find_kits(vtk_kit_files "${CMAKE_CURRENT_SOURCE_DIR}/VTK")
vtk_module_scan(
......
......@@ -19,6 +19,7 @@ void vtkPVInitializePythonModules();
}
#include "vtkInitializationHelper.h"
#include "vtkLogger.h"
#include "vtkMultiProcessController.h"
#include "vtkPVPythonOptions.h"
#include "vtkProcessModule.h"
......@@ -101,12 +102,20 @@ int Run(int processType, int argc, char* argv[])
std::vector<char*> pythonArgs;
ProcessArgsForPython(
pythonArgs, options->GetPythonScriptName(), remaining_argc, remaining_argv);
pythonArgs.push_back(nullptr);
// if user specified verbosity option on command line, then we make vtkPythonInterpreter post
// log information as INFO, otherwise we leave it at default which is TRACE.
vtkPythonInterpreter::SetLogVerbosity(
options->GetLogStdErrVerbosity() != vtkLogger::VERBOSITY_INVALID
? vtkLogger::VERBOSITY_INFO
: vtkLogger::VERBOSITY_TRACE);
// Start interpretor
vtkPythonInterpreter::Initialize();
ret_val =
vtkPythonInterpreter::PyMain(static_cast<int>(pythonArgs.size()), &*pythonArgs.begin());
vtkPythonInterpreter::PyMain(static_cast<int>(pythonArgs.size()) - 1, &*pythonArgs.begin());
// Free python args
std::vector<char*>::iterator it = pythonArgs.begin();
......
# Generating warning/information/error logs
ParaView now supports generating logs with varying levels of verbosity to help
debug and track down performance bottlenecks.
When logging messages, they are logged at varying verbosity levels. To make
ParaView show log messages at all levels lower than a specific value in the
range [-2, 9], use the `-v=[level]` command line option, where -2 is used for
errors, -1 for warnings, 0 for info, and 9 for trace.
One can request log messages to be logged to files instead using
`-l=<filename>,<verbosity>` command line option. Multiple `-l` options can be
provided to generate multiple log files with different verbosities, if needed.
When logging messages, ParaView logs then using categories with ability for user
to elevate the logging level for any specific category using environment
variables. By elevating the level for a specific category, e.g.
`PARAVIEW_LOG_RENDERING_VERBOSITY` to 0 or INFO, one can start seeing those
messages on the terminal by default without having to change the stderr verbosity thus
causing the terminal to be clobbered with all other log messages not related to
the chosen category.
......@@ -13,10 +13,10 @@
=========================================================================*/
#include "vtkPVOptions.h"
#include "vtkLogger.h"
#include "vtkObjectFactory.h"
#include "vtkPVOptionsXMLParser.h"
#include "vtkProcessModule.h"
// #include "vtkPVView.h"
#include <vtksys/CommandLineArguments.hxx>
#include <vtksys/SystemInformation.hxx>
......@@ -79,6 +79,7 @@ vtkPVOptions::vtkPVOptions()
this->ForceOffscreenRendering = 0;
this->ForceOnscreenRendering = 0;
this->CatalystLivePort = -1;
this->LogStdErrVerbosity = vtkLogger::VERBOSITY_INVALID;
if (this->XMLParser)
{
......@@ -131,6 +132,19 @@ void vtkPVOptions::Initialize()
break;
}
this->AddCallback("--verbosity", "-v", &vtkPVOptions::VerbosityArgumentHandler, this,
"Log verbosity on stderr as an integer in range [-9, 9] "
"or INFO, WARNING, ERROR, or OFF. Defaults to INFO(0).",
vtkPVOptions::PVCLIENT | vtkPVOptions::PVSERVER | vtkPVOptions::PVDATA_SERVER |
vtkPVOptions::PVRENDER_SERVER);
this->AddCallback("--log", "-l", &vtkPVOptions::LogArgumentHandler, this,
"Addition log files to generate. Can be specified multiple times. "
"By default, log verbosity is set to INFO(0) and may be "
"overridden per file by adding suffix `,verbosity` where verbosity values "
"are same as those accepted for `--verbosity` argument.",
vtkPVOptions::ALLPROCESS);
// On occasion, one would want to force the hostname used by a particular
// process (overriding the default detected by making System calls). This
// option makes it possible).
......@@ -312,8 +326,121 @@ void vtkPVOptions::Initialize()
}
//----------------------------------------------------------------------------
int vtkPVOptions::PostProcess(int, const char* const*)
int vtkPVOptions::LogArgumentHandler(
const char* vtkNotUsed(argument), const char* cvalue, void* call_data)
{
if (cvalue == nullptr)
{
return 0;
}
std::string value(cvalue);
auto verbosity = vtkLogger::VERBOSITY_INFO;
auto separator = value.find_last_of(',');
if (separator != std::string::npos)
{
verbosity = vtkLogger::ConvertToVerbosity(value.substr(separator + 1).c_str());
if (verbosity == vtkLogger::VERBOSITY_INVALID)
{
// invalid verbosity specified.
return 0;
}
// remove the ",..." part from filename.
value = value.substr(0, separator);
}
auto pm = vtkProcessModule::GetProcessModule();
if (pm->GetNumberOfLocalPartitions() > 1)
{
value += "." + std::to_string(pm->GetPartitionId());
}
auto self = reinterpret_cast<vtkPVOptions*>(call_data);
self->LogFiles.push_back(std::make_pair(value, verbosity));
return 1;
}
//----------------------------------------------------------------------------
int vtkPVOptions::VerbosityArgumentHandler(
const char* vtkNotUsed(argument), const char* value, void* call_data)
{
if (value != nullptr)
{
auto self = reinterpret_cast<vtkPVOptions*>(call_data);
self->LogStdErrVerbosity = vtkLogger::ConvertToVerbosity(value);
return (self->LogStdErrVerbosity != vtkLogger::VERBOSITY_INVALID);
}
return 0;
}
namespace
{
static void OnAtExit()
{
vtkLogger::SetStderrVerbosity(vtkLogger::VERBOSITY_WARNING);
}
static void UpdateThreadName()
{
// set thread name based on application.
auto pm = vtkProcessModule::GetProcessModule();
std::string tname_suffix;
if (pm->GetNumberOfLocalPartitions() > 1)
{
tname_suffix = "." + std::to_string(pm->GetPartitionId());
}
switch (vtkProcessModule::GetProcessType())
{
case vtkProcessModule::PROCESS_CLIENT:
vtkLogger::SetThreadName("paraview" + tname_suffix);
break;
case vtkProcessModule::PROCESS_SERVER:
vtkLogger::SetThreadName("pvserver" + tname_suffix);
break;
case vtkProcessModule::PROCESS_DATA_SERVER:
vtkLogger::SetThreadName("pvdatserver" + tname_suffix);
break;
case vtkProcessModule::PROCESS_RENDER_SERVER:
vtkLogger::SetThreadName("pvrenderserver" + tname_suffix);
break;
case vtkProcessModule::PROCESS_BATCH:
vtkLogger::SetThreadName("pvbatch" + tname_suffix);
break;
default:
break;
}
}
}
//----------------------------------------------------------------------------
int vtkPVOptions::PostProcess(int argc, const char* const* argv)
{
if (this->LogStdErrVerbosity == vtkLogger::VERBOSITY_INVALID)
{
// to avoid posting preamble in init, we do this trick.
vtkLogger::SetStderrVerbosity(vtkLogger::VERBOSITY_WARNING);
vtkLogger::Init(argc, const_cast<char**>(argv), nullptr);
vtkLogger::SetStderrVerbosity(vtkLogger::VERBOSITY_INFO);
// this helps use avoid showing the "atexit" INFO message generated by
// loguru when exiting the app unless verbosity was explicitly specified on
// the command line.
atexit(OnAtExit);
}
else
{
vtkLogger::SetStderrVerbosity(static_cast<vtkLogger::Verbosity>(this->LogStdErrVerbosity));
vtkLogger::Init(argc, const_cast<char**>(argv), nullptr);
}
for (const auto& log_pair : this->LogFiles)
{
vtkLogger::LogToFile(log_pair.first.c_str(), vtkLogger::TRUNCATE,
static_cast<vtkLogger::Verbosity>(log_pair.second));
}
UpdateThreadName();
switch (this->GetProcessType())
{
case vtkPVOptions::PVCLIENT:
......
......@@ -28,6 +28,9 @@
#include "vtkCommandOptions.h"
#include "vtkPVClientServerCoreCoreModule.h" //needed for exports
#include <utility> // needed for pair
#include <vector> // needed for vector
class vtkPVOptionsInternal;
class VTKPVCLIENTSERVERCORECORE_EXPORT vtkPVOptions : public vtkCommandOptions
......@@ -257,6 +260,14 @@ public:
vtkBooleanMacro(ForceMPIInitOnClient, int);
//@}
//@{
/**
* Returns the verbosity level for stderr output chosen.
* Is set to vtkLogger::VERBOSITY_INVALID if not specified.
*/
vtkGetMacro(LogStdErrVerbosity, int);
//@}
enum ProcessTypeEnum
{
PARAVIEW = 0x2,
......@@ -362,6 +373,12 @@ private:
vtkSetStringMacro(HostName);
char* HostName;
int LogStdErrVerbosity;
std::vector<std::pair<std::string, int> > LogFiles;
static int VerbosityArgumentHandler(const char* argument, const char* value, void* call_data);
static int LogArgumentHandler(const char* argument, const char* value, void* call_data);
};
#endif
......@@ -14,6 +14,7 @@
=========================================================================*/
#include "vtkPVPlugin.h"
#include "vtkPVLogger.h"
#include "vtkPVPluginTracker.h"
#include "vtkProcessModule.h"
#include <vtksys/SystemTools.hxx>
......@@ -26,7 +27,6 @@ vtkPVPlugin::EULAConfirmationCallback vtkPVPlugin::EULAConfirmationCallbackPtr =
//-----------------------------------------------------------------------------
bool vtkPVPlugin::ImportPlugin(vtkPVPlugin* plugin)
{
static bool printDebugInfo = (vtksys::SystemTools::GetEnv("PV_PLUGIN_DEBUG") != nullptr);
std::ostringstream msg;
bool status = false;
if (plugin)
......@@ -57,12 +57,9 @@ bool vtkPVPlugin::ImportPlugin(vtkPVPlugin* plugin)
msg << " Plugin has EULA and was not accepted. Plugin won't be imported." << endl;
}
}
if (printDebugInfo && msg.str().size())
{
msg << "Import status: " << status << endl;
vtkOutputWindowDisplayText(msg.str().c_str());
}
vtkVLogIfF(PARAVIEW_LOG_PLUGIN_VERBOSITY(), (msg.str().size() > 0), "Import status: %s \n%s",
(status ? "success" : "failure"), msg.str().c_str());
return status;
}
......
......@@ -21,10 +21,12 @@
* The header file also defines few import macros that are required for
* exporting/importing plugins.
*
* When debugging issues with plugins try setting the PV_PLUGIN_DEBUG
* environment variable on all the processes where you are trying to load the
* plugin. That will print extra information as the plugin is being loaded.
*/
* When debugging issues with plugins try setting the
* `PARAVIEW_LOG_PLUGIN_VERBOSITY=<level>` environment variable on all the processes
* where you are trying to load the plugin. That will print extra information as
* the plugin is being loaded. See `vtkPVLogger::SetPluginVerbosity` for
* details.
*/
#ifndef vtkPVPlugin_h
#define vtkPVPlugin_h
......
......@@ -17,12 +17,17 @@
* @brief Used to load ParaView plugins.
*
* vtkPVPluginLoader can be used to load plugins for ParaView. vtkPVPluginLoader
* loads the plugin on the local process. For verbose details during the process
* of loading the plugin, try setting the environment variable PV_PLUGIN_DEBUG.
* loads the plugin on the local process.
*
* vtkPVPluginLoader logs plugin related messages using at
* `PARAVIEW_LOG_PLUGIN_VERBOSITY` level. See `vtkPVLogger::SetPluginVerbosity`
* for information on using environment variables to override or elevate the
* verbosity level.
*
* This class only needed when loading plugins from shared libraries
* dynamically. For statically importing plugins, one directly uses
* PV_PLUGIN_IMPORT() macro defined in vtkPVPlugin.h.
*/
*/
#ifndef vtkPVPluginLoader_h
#define vtkPVPluginLoader_h
......@@ -167,7 +172,6 @@ protected:
char* PluginVersion;
char* FileName;
char* SearchPaths;
bool DebugPlugin;
bool Loaded;
private:
......
......@@ -20,6 +20,7 @@
#include "vtkPResourceFileLocator.h"
#include "vtkPSystemTools.h"
#include "vtkPVConfig.h"
#include "vtkPVLogger.h"
#include "vtkPVOptions.h"
#include "vtkPVPlugin.h"
#include "vtkPVPluginLoader.h"
......@@ -46,18 +47,9 @@
#define VTKSTRNCASECMP strncasecmp
#endif
#define vtkPVPluginTrackerDebugMacro(x) \
{ \
if (debug_plugin) \
{ \
std::ostringstream vtkerror; \
vtkerror << x << endl; \
vtkOutputWindowDisplayText(vtkerror.str().c_str()); \
} \
}
namespace
{
class vtkItem
{
public:
......@@ -94,11 +86,14 @@ std::string vtkGetPluginFileNameFromName(const std::string& pluginname)
std::string vtkLocatePluginOrConfigFile(
const char* plugin, bool isPlugin, vtkPluginSearchFunction searchFunction)
{
vtkVLogScopeF(PARAVIEW_LOG_PLUGIN_VERBOSITY(), "looking for plugin '%s'", plugin);
(void)searchFunction;
auto pm = vtkProcessModule::GetProcessModule();
// Make sure we can get the options before going further
if (pm == NULL)
{
vtkLogF(ERROR, "vtkProcessModule does not exist!");
return std::string();
}
......@@ -106,17 +101,23 @@ std::string vtkLocatePluginOrConfigFile(
bool debug_plugin = vtksys::SystemTools::GetEnv("PV_PLUGIN_DEBUG") != NULL;
if (isPlugin)
{
vtkPVPluginTrackerDebugMacro("Looking for static plugin \'" << plugin << "\'");
if (searchFunction && searchFunction(plugin))
{
vtkPVPluginTrackerDebugMacro("Found static plugin \'" << plugin << "\'");
vtkVLogF(PARAVIEW_LOG_PLUGIN_VERBOSITY(),
"looking for static plugin since `BUILD_SHARED_LIBS` is OFF -- success!");
return plugin;
}
else
{
vtkVLogF(PARAVIEW_LOG_PLUGIN_VERBOSITY(),
"looking for static plugin since `BUILD_SHARED_LIBS` is OFF -- failed!");
}
}
#endif
const std::string exe_dir = pm->GetSelfDir();
const std::string vtklib = vtkGetLibraryPathForSymbol(GetVTKVersion);
vtkVLogF(PARAVIEW_LOG_PLUGIN_VERBOSITY(), "VTK libraries location is '%s'", vtklib.c_str());
std::vector<std::string> prefixes = {
#if defined(BUILD_SHARED_LIBS)
......@@ -142,11 +143,13 @@ std::string vtkLocatePluginOrConfigFile(
const std::string landmark = isPlugin ? vtkGetPluginFileNameFromName(plugin) : plugin;
vtkNew<vtkPResourceFileLocator> locator;
locator->SetLogVerbosity(PARAVIEW_LOG_PLUGIN_VERBOSITY());
// First try the test plugin path, if it exists.
vtkPVOptions* options = pm->GetOptions();
if (options->GetTestPluginPath() && strlen(options->GetTestPluginPath()) > 0)
{
vtkVLogF(PARAVIEW_LOG_PLUGIN_VERBOSITY(), "check `test-plugin-path` first.");
auto path = locator->Locate(options->GetTestPluginPath(), landmark);
if (!path.empty())
{
......@@ -154,9 +157,10 @@ std::string vtkLocatePluginOrConfigFile(
}
}
// Now, try the prefixes we so careful put together.
// Now, try the prefixes we so carefully put together.
if (!vtklib.empty())
{
vtkVLogF(PARAVIEW_LOG_PLUGIN_VERBOSITY(), "check various prefixes relative to VTK libraries");
auto pluginpath =
locator->Locate(vtksys::SystemTools::GetFilenamePath(vtklib), prefixes, landmark);
if (!pluginpath.empty())
......@@ -166,6 +170,8 @@ std::string vtkLocatePluginOrConfigFile(
}
if (!exe_dir.empty())
{
vtkVLogF(PARAVIEW_LOG_PLUGIN_VERBOSITY(),
"check various prefixes relative to executable location: `%s`", exe_dir.c_str());
auto pluginpath = locator->Locate(exe_dir, prefixes, landmark);
if (!pluginpath.empty())
{
......@@ -173,6 +179,7 @@ std::string vtkLocatePluginOrConfigFile(
}
}
vtkVLogF(PARAVIEW_LOG_PLUGIN_VERBOSITY(), "failed!!!");
return std::string();
}
......@@ -226,6 +233,12 @@ vtkStandardNewMacro(vtkPVPluginTracker);
vtkPVPluginTracker::vtkPVPluginTracker()
{
this->PluginsList = new vtkPluginsList();
if (vtksys::SystemTools::GetEnv("PV_PLUGIN_DEBUG") != nullptr)
{
vtkWarningMacro("`PV_PLUGIN_DEBUG` environment variable has been deprecated. "
"Please use `PARAVIEW_LOG_PIPELINE_VERBOSITY=INFO` instead.");
vtkPVLogger::SetPluginVerbosity(vtkLogger::VERBOSITY_INFO);
}
}
//----------------------------------------------------------------------------
......@@ -245,8 +258,8 @@ vtkPVPluginTracker* vtkPVPluginTracker::GetInstance()
Instance = mgr;
mgr->FastDelete();
bool debug_plugin = vtksys::SystemTools::GetEnv("PV_PLUGIN_DEBUG") != NULL;
vtkPVPluginTrackerDebugMacro("Locate and load distributed plugin list.");
vtkVLogF(PARAVIEW_LOG_PLUGIN_VERBOSITY(),
"Locate and load distributed plugin list when creating vtkPVPluginTracker.");
// Locate ".plugins" file and process it.
// This will setup the distributed-list of plugins. Also it will load any
......@@ -259,10 +272,10 @@ vtkPVPluginTracker* vtkPVPluginTracker::GetInstance()
}
else
{
vtkPVPluginTrackerDebugMacro("Could not find .plugins file for distributed plugins");
vtkVLogF(
PARAVIEW_LOG_PLUGIN_VERBOSITY(), "Could not find `.plugins` file for distributed plugins.");
}
}
return Instance;
}
......@@ -275,13 +288,10 @@ void vtkPVPluginTracker::PrintSelf(ostream& os, vtkIndent indent)
//----------------------------------------------------------------------------
void vtkPVPluginTracker::LoadPluginConfigurationXML(const char* filename, bool forceLoad)
{
bool debug_plugin = vtksys::SystemTools::GetEnv("PV_PLUGIN_DEBUG") != NULL;
vtkPVPluginTrackerDebugMacro("Loading plugin configuration xml: " << filename);
if (!vtkPSystemTools::FileExists(filename, true))
{
vtkPVPluginTrackerDebugMacro(
"Failed to located configuration xml. "
"Could not populate the list of plugins distributed with application.");
vtkVLogF(PARAVIEW_LOG_PLUGIN_VERBOSITY(),
"Loading plugin configuration xml `%s` -- failed, not found!", filename);
return;
}
......@@ -290,10 +300,12 @@ void vtkPVPluginTracker::LoadPluginConfigurationXML(const char* filename, bool f
parser->SuppressErrorMessagesOn();
if (!parser->Parse())
{
vtkPVPluginTrackerDebugMacro("Configuration file not a valid xml.");
vtkVLogF(PARAVIEW_LOG_PLUGIN_VERBOSITY(),
"Loading plugin configuration xml `%s` -- failed, invalid XML!", filename);
return;
}
vtkVLogF(PARAVIEW_LOG_PLUGIN_VERBOSITY(), "Loading plugin configuration xml `%s`.", filename);
this->LoadPluginConfigurationXML(parser->GetRootElement(), forceLoad);
}
......@@ -301,12 +313,11 @@ void vtkPVPluginTracker::LoadPluginConfigurationXML(const char* filename, bool f
void vtkPVPluginTracker::LoadPluginConfigurationXMLFromString(
const char* xmlcontents, bool forceLoad)
{
bool debug_plugin = vtksys::SystemTools::GetEnv("PV_PLUGIN_DEBUG") != NULL;
vtkSmartPointer<vtkPVXMLParser> parser = vtkSmartPointer<vtkPVXMLParser>::New();
parser->SuppressErrorMessagesOn();
if (!parser->Parse(xmlcontents))
{
vtkPVPluginTrackerDebugMacro("Configuration file not a valid xml.");
vtkVLogF(PARAVIEW_LOG_PLUGIN_VERBOSITY(), "string not a valid xml -- failed!");
return;
}
......@@ -321,12 +332,10 @@ void vtkPVPluginTracker::LoadPluginConfigurationXML(vtkPVXMLElement* root, bool
return;
}
bool debug_plugin = vtksys::SystemTools::GetEnv("PV_PLUGIN_DEBUG") != NULL;
if (strcmp(root->GetName(), "Plugins") != 0)
{
vtkPVPluginTrackerDebugMacro("Root element in the xml must be <Plugins/>. "
"Got "
<< root->GetName());
vtkVLogF(PARAVIEW_LOG_PLUGIN_VERBOSITY(),
"Root element in the xml must be `<Plugins/>`, got `%s` -- failed!", root->GetName());
return;
}
......@@ -340,10 +349,12 @@ void vtkPVPluginTracker::LoadPluginConfigurationXML(vtkPVXMLElement* root, bool
child->GetScalarAttribute("auto_load", &auto_load);
if (name.empty())
{
vtkPVPluginTrackerDebugMacro("Missing required attribute name. Skipping element.");
vtkVLogF(
PARAVIEW_LOG_PLUGIN_VERBOSITY(), "Missing required attribute name. Skipping element.");
continue;
}
vtkPVPluginTrackerDebugMacro("Trying to locate plugin with name: " << name.c_str());
vtkVLogF(
PARAVIEW_LOG_PLUGIN_VERBOSITY(), "Trying to locate plugin with name `%s`", name.c_str());
std::string plugin_filename;
if (child->GetAttribute("filename") &&
vtkPSystemTools::FileExists(child->GetAttribute("filename"), true))
......@@ -365,10 +376,11 @@ void vtkPVPluginTracker::LoadPluginConfigurationXML(vtkPVXMLElement* root, bool
<< name.c_str() << "\n"
"Application may not work exactly as expected.");
}
vtkPVPluginTrackerDebugMacro("Failed to locate file plugin: " << name.c_str());
vtkVLogF(
PARAVIEW_LOG_PLUGIN_VERBOSITY(), "Failed to locate file plugin `%s`", name.c_str());
continue;
}
vtkPVPluginTrackerDebugMacro("--- Found " << plugin_filename);
vtkVLogF(PARAVIEW_LOG_PLUGIN_VERBOSITY(), "found `%s`", plugin_filename.c_str());
unsigned int index = this->RegisterAvailablePlugin(plugin_filename.c_str());
if ((auto_load || forceLoad) && !this->GetPluginLoaded(index))
{
......
......@@ -79,7 +79,6 @@ void vtkChartRepresentation::SetSelectionRepresentation(vtkChartSelectionReprese
if (repr)
{
repr->SetChartRepresentation(this);
this->SetDebugName(repr, "Selection");
}
}
......
......@@ -37,6 +37,7 @@
#include "vtkOutlineFilter.h"
#include "vtkOverlappingAMR.h"
#include "vtkPVConfig.h"
#include "vtkPVLogger.h"
#include "vtkPVSession.h"
#include "vtkPointData.h"
#include "vtkPolyData.h"
......@@ -414,6 +415,7 @@ int vtkMPIMoveData::RequestData(
// PassThrough mode for compositing.
if (this->MoveMode == vtkMPIMoveData::PASS_THROUGH)
{
vtkVLogF(PARAVIEW_LOG_DATA_MOVEMENT_VERBOSITY(), "pass-through");
output->ShallowCopy(input);
return 1;
}
......@@ -423,6 +425,7 @@ int vtkMPIMoveData::RequestData(
// Collect
this->DataServerGatherToZero(input, output);
// PassThrough
vtkVLogF(PARAVIEW_LOG_DATA_MOVEMENT_VERBOSITY(), "pass-through");
output->ShallowCopy(input);
return 1;
}
......@@ -437,6 +440,7 @@ int vtkMPIMoveData::RequestData(
{
if (input)
{
vtkVLogF(PARAVIEW_LOG_DATA_MOVEMENT_VERBOSITY(), "pass-through");
output->ShallowCopy(input);
}
return 1;
......@@ -540,6 +544,7 @@ int vtkMPIMoveData::RequestData(
this->DataServerSendToClient(tmp);
tmp->Delete();
tmp = NULL;
vtkVLogF(PARAVIEW_LOG_DATA_MOVEMENT_VERBOSITY(), "pass-through");
output->ShallowCopy(input);
return 1;
}
......@@ -610,11 +615,13 @@ void vtkMPIMoveData::DataServerAllToN(vtkDataObject* input, vtkDataObject* outpu
if (n == m)
{
vtkVLogF(PARAVIEW_LOG_DATA_MOVEMENT_VERBOSITY(), "pass-through");
output->ShallowCopy(input);
}
// Perform the M to N operation.
#if VTK_MODULE_ENABLE_VTK_ParallelMPI
vtkVLogScopeF(PARAVIEW_LOG_DATA_MOVEMENT_VERBOSITY(), "redistribute MxN (M=%d, N=%d)", m, n);
vtkAllToNRedistributeCompositePolyData* AllToN = NULL;
AllToN = vtkAllToNRedistributeCompositePolyData::New();
AllToN->SetController(controller);
......@@ -636,12 +643,15 @@ void vtkMPIMoveData::DataServerGatherAll(vtkDataObject* input, vtkDataObject* ou
{
if (input)
{
vtkVLogF(PARAVIEW_LOG_DATA_MOVEMENT_VERBOSITY(), "pass-through");
output->ShallowCopy(input);
}
return;
}
#if VTK_MODULE_ENABLE_VTK_ParallelMPI
vtkVLogScopeF(PARAVIEW_LOG_DATA_MOVEMENT_VERBOSITY(), "gather-all");
int idx;
vtkMPICommunicator* com = vtkMPICommunicator::SafeDownCast(this->Controller->GetCommunicator());
......@@ -698,6 +708,7 @@ void vtkMPIMoveData::DataServerGatherToZero(vtkDataObject* input, vtkDataObject*
{
if (input)
{
vtkVLogF(PARAVIEW_LOG_DATA_MOVEMENT_VERBOSITY(), "pass-through");
output->ShallowCopy(input);
}
return;
......@@ -706,6 +717,7 @@ void vtkMPIMoveData::DataServerGatherToZero(vtkDataObject* input, vtkDataObject*
{
if (this->Controller->GetLocalProcessId() == 0 && input)
{
vtkVLogF(PARAVIEW_LOG_DATA_MOVEMENT_VERBOSITY(), "pass-through");
output->ShallowCopy(input);
}
return;
......@@ -714,6 +726,7 @@ void vtkMPIMoveData::DataServerGatherToZero(vtkDataObject* input, vtkDataObject*
vtkTimerLog::MarkStartEvent("Dataserver gathering to 0");
#if VTK_MODULE_ENABLE_VTK_ParallelMPI
vtkVLogScopeF(PARAVIEW_LOG_DATA_MOVEMENT_VERBOSITY(), "gather-to-0");
int idx;
int myId = this->Controller->GetLocalProcessId();
vtkMPICommunicator* com = vtkMPICommunicator::SafeDownCast(this->Controller->GetCommunicator());
......@@ -789,6 +802,8 @@ void vtkMPIMoveData::DataServerSendToRenderServer(vtkDataObject* output)
return;
}
vtkVLogScopeF(PARAVIEW_LOG_DATA_MOVEMENT_VERBOSITY(), "send-to-renderserver");
// int fixme;
// We might be able to eliminate this marshal.
this->ClearBuffer();
......@@ -810,6 +825,8 @@ void vtkMPIMoveData::RenderServerReceiveFromDataServer(vtkDataObject* output)
return;
}
vtkVLogScopeF(PARAVIEW_LOG_DATA_MOVEMENT_VERBOSITY(), "receive-from-dataserver");
this->ClearBuffer();
com->Receive(&(this->NumberOfBuffers), 1, 1, 23480);
this->BufferLengths = new vtkIdType[this->NumberOfBuffers];
......@@ -846,6 +863,8 @@ void vtkMPIMoveData::DataServerZeroSendToRenderServerZero(vtkDataObject* data)
return;
}