Salome HOME
Porting 4.2. Tests OK \!
[modules/paravis.git] / src / Plugins / MEDReader / IO / vtkMEDReader.cxx
index 769e87a4b802a452a251d4acdc0daf0a1e05cd73..602d96955385caf9dcab95df4d2cebd2bc0a45c9 100644 (file)
@@ -257,7 +257,12 @@ void vtkMEDReader::SetFileName(const char *fname)
         }
       if(this->Internal->Tree.getNumberOfLeavesArrays()==0)
         {
-          this->Internal->Tree.loadMainStructureOfFile(this->Internal->FileName.c_str(),this->Internal->IsMEDOrSauv);
+          int iPart(-1),nbOfParts(-1);
+#ifdef MEDREADER_USE_MPI
+          MPI_Comm_rank(MPI_COMM_WORLD,&iPart);
+          MPI_Comm_size(MPI_COMM_WORLD,&nbOfParts);
+#endif
+          this->Internal->Tree.loadMainStructureOfFile(this->Internal->FileName.c_str(),this->Internal->IsMEDOrSauv,iPart,nbOfParts);
           if(!this->Internal->PK.arePropertiesOnTreeToSetAfter())
             this->Internal->Tree.activateTheFirst();//This line manually initialize the status of server (this) with the remote client.
           this->Internal->TK.setMaxNumberOfTimeSteps(this->Internal->Tree.getMaxNumberOfTimeSteps());
@@ -292,7 +297,6 @@ int vtkMEDReader::RequestInformation(vtkInformation *request, vtkInformationVect
   try
     {
       vtkInformation *outInfo(outputVector->GetInformationObject(0));
-      outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(),-1);
       outInfo->Set(vtkDataObject::DATA_TYPE_NAME(),"vtkMultiBlockDataSet");
       this->UpdateSIL(outInfo);
       //