Skip to content
Snippets Groups Projects
Commit ab7b575a authored by Utkarsh Ayachit's avatar Utkarsh Ayachit
Browse files

Add warning and avoid deadlock in SaveScreenshot.

Temporarily addresses #17205.
parent 0672b837
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -633,6 +633,24 @@ bool vtkWriteImage(T* viewOrLayout, const char* filename, int magnification, int
.arg("quality", quality)
.arg("comment", "save screenshot");
if (magnification > 1)
{
// An interim fix for this bug BUG #17205 is to simply change magnification
// to 1 when running in multi-rank non-symmetric batch mode and complain about
// it. Long term, we need to stop sharing render windows in batch mode and
// simply let interactors be created for the ranks as needed.
vtkProcessModule* pm = vtkProcessModule::GetProcessModule();
if (pm->GetProcessType() == vtkProcessModule::PROCESS_BATCH &&
pm->GetNumberOfLocalPartitions() > 1 && pm->GetSymmetricMPIMode() == false)
{
vtkGenericWarningMacro(
"`Magnification` > 1 is currently not supported with `pvbatch` due a known issue. "
"Forcing `magnification` to 1 till the issue is resolved.");
magnification = 1;
}
}
vtkSmartPointer<vtkImageData> img;
img.TakeReference(viewOrLayout->CaptureWindow(magnification));
if (img && vtkProcessModule::GetProcessModule()->GetPartitionId() == 0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment