From: Paul RASCLE Date: Thu, 28 Feb 2019 15:54:14 +0000 (+0100) Subject: fix Paraview with MPI on Scibian: for MPI init, argv[argc] must be null X-Git-Tag: V9_3_0a2~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=270ade02efb114c3af24008fe5943ad60a89eb2d;p=modules%2Fgui.git fix Paraview with MPI on Scibian: for MPI init, argv[argc] must be null --- diff --git a/src/PVViewer/PVViewer_Core.cxx b/src/PVViewer/PVViewer_Core.cxx index 0812d9020..e629e392b 100644 --- a/src/PVViewer/PVViewer_Core.cxx +++ b/src/PVViewer/PVViewer_Core.cxx @@ -66,7 +66,9 @@ bool PVViewer_Core::ParaviewInitApp(QMainWindow * aDesktop) char** argv = 0; QString aOptions = getenv("PARAVIEW_OPTIONS"); QStringList aOptList = aOptions.split(":", QString::SkipEmptyParts); - argv = new char*[aOptList.size() + 3]; + argv = new char*[aOptList.size() + 4]; // add one, MPI requires argv[argc] = 0! + for (int i =0; i< aOptList.size() + 4; i++) + argv[i] = 0; QStringList args = QApplication::arguments(); argv[0] = (args.size() > 0)? strdup(args[0].toLatin1().constData()) : strdup("paravis"); argc++;