[Paraview] Fwd: [Catalyst] Extracting and saving data from a spreadsheet

Renato Elias rnelias at gmail.com
Mon Jun 5 12:20:55 EDT 2017


Yep, it's working fine... (in fact, it's only giving an annoying warning
message regarding unsynbcronized time value but it's a minor issue...)

Warning: In
/home/rnelias/ParaView-v5.4.0-RC3/ParaViewCore/VTKExtensions/Core/vtkPVTrivialProducer.cxx,
line 119
vtkPVTrivialProducer (0x801b910): Requesting time 1.8 but only 1.9 is
available

I misunderstood the befavior of a print statement within WriteData routine.
Every rank prints its message in WriteData but SaveData is probably
filtering rank 0 to save the data...

### START MODIFICATION ###
def WriteData(self, datadescription):
      super(CoProcessor, self).WriteData(datadescription)
      # let's write to CSV ourselves.
      afilter = self.Pipeline.integrateVariables1
      *print(" Saving cvs file for time step:
"+str(datadescription.GetTimeStep()))*
      fname = "coefs_%d.csv" % datadescription.GetTimeStep()
      SaveData(fname, afilter)
### END MODIFICATION ###


BTW, where can I report a bug? In the (very) past, Kitware had a Mantis bug
tracking system but I have no idea if it's still being used...

I've sent a message regarding a bug straight to the mailling list that is
probably not the best channel to send it...

On Mon, Jun 5, 2017 at 11:36 AM, Utkarsh Ayachit <
utkarsh.ayachit at kitware.com> wrote:

> Renato,
>
> Are you running into issues with what the script ? Why you have acess to
> global controller via  vtkMultiProcessController::GetController() and you
> can check the rank id etc, I don't think you'd need to. The CSVWriter will
> only write on root node after accumulating data from all ranks. Since `IntegrateVariables`
> only produces output on rank 0, it should work fine, doesn't it?
>
> Utkarsh
>
> On Sat, Jun 3, 2017 at 12:25 PM, Renato Elias <rnelias at gmail.com> wrote:
>
>> Thanks Utkarsh!
>>
>> I did a small test and now it's working fine :) I only noticed that it's
>> called per processor. Is there a way to make only rank 0 store the CVS
>> table? In other words... do we have access to the rank id in the
>> coprocessor Python script?
>>
>> Regards
>>
>> Renato
>>
>> Em 2 de jun de 2017 14:19, "Utkarsh Ayachit" <utkarsh.ayachit at kitware.com>
>> escreveu:
>>
>> Attached is a script that demonstrates how to do this. I suspect you're
>> putting your code in `CreatePipeline`. As the name  suggests, it's only
>> called when creating pipeline the first time, and not on every iteration.
>> I've modified a ParaView test script. Modifications are in `### START
>> MODIFICATION ###` and `### END MODIFICATION ###` blocks. You can run this
>> as follows:
>>
>> > bin/pvbatch -sym -dr  <ParaViewSource>/CoProcessing
>> /PythonCatalyst/Testing/Cxx/waveletdriver.py /tmp/cptest.py 10
>>
>> Utkarsh
>>
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20170605/68f21817/attachment.html>


More information about the ParaView mailing list