<p dir="ltr">Thanks.</p>
<p dir="ltr">So it might come from something else. Python crashed with a 1.4gb file and not with a smaller one.</p>
<p dir="ltr">I'm on windows with a 32bits version of python and launching it with pycharm. I will test on a Linux cluster and/or with a 64bits version. </p>
<p dir="ltr">Thanks for your fast and clear answer !<br>
Thomas</p>
<br><div class="gmail_quote"><div dir="ltr">Le lun. 5 déc. 2016 17:49, Cory Quammen <<a href="mailto:cory.quammen@kitware.com">cory.quammen@kitware.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Mon, Dec 5, 2016 at 11:04 AM, Thomas PEDOT <<a href="mailto:thomas.pedot@gmail.com" class="gmail_msg" target="_blank">thomas.pedot@gmail.com</a>> wrote:<br class="gmail_msg">
> Hi,<br class="gmail_msg">
> I have some CGNS files I want to "convert" to numpy array. To write my<br class="gmail_msg">
> script I first use a more direct method :<br class="gmail_msg">
><br class="gmail_msg">
> Converting CGNS to VTK<br class="gmail_msg">
> Use vtk_to_numpy method<br class="gmail_msg">
> process numpy array<br class="gmail_msg">
><br class="gmail_msg">
> This task is time consuming and I need a more direct option (if possible).<br class="gmail_msg">
><br class="gmail_msg">
> For this, I tried to use paraview CGNSReader and simple module.<br class="gmail_msg">
><br class="gmail_msg">
> I'm able to convert CGNS data to numpy with small data set (Some MB) with<br class="gmail_msg">
> this approach :<br class="gmail_msg">
><br class="gmail_msg">
> Case = CGNSSeriesReader(filename)<br class="gmail_msg">
> Case.UpdatePipeline()<br class="gmail_msg">
> rawData = servermanager.Fetch(Case)<br class="gmail_msg">
> import vtk.numpy_interface.dataset_adapter as dsa<br class="gmail_msg">
> # Wrap the raw data object to access NumPy friendly API<br class="gmail_msg">
> data = dsa.WrapDataObject(rawData)<br class="gmail_msg">
><br class="gmail_msg">
> But as it said here : Do not do this if data is large otherwise the client<br class="gmail_msg">
> will run out of memory.<br class="gmail_msg">
><br class="gmail_msg">
> So, I can I do this without running out of memory ? I don't need to load all<br class="gmail_msg">
> Point Arrays at once.<br class="gmail_msg">
<br class="gmail_msg">
That warning is more for if you've got some very large data set loaded<br class="gmail_msg">
into a ParaView server running on a large computing resource. If you<br class="gmail_msg">
call this, it will load all that data onto the client, which may not<br class="gmail_msg">
have enough RAM to hold the very large data set.<br class="gmail_msg">
<br class="gmail_msg">
If you are working locally with a data set that the ParaView client<br class="gmail_msg">
can load, then you shouldn't have any problems with the script above.<br class="gmail_msg">
<br class="gmail_msg">
> Is it possible to select just 'Temperature' for example and only one block ?<br class="gmail_msg">
> I guess it might be less memory consuming.<br class="gmail_msg">
<br class="gmail_msg">
To select just 'Temperature', you should be able to do something like:<br class="gmail_msg">
<br class="gmail_msg">
Case.PointVariables = ['Temperature']<br class="gmail_msg">
<br class="gmail_msg">
If you need to, you can add an ExtractBlock to your pipeline:<br class="gmail_msg">
<br class="gmail_msg">
extractBlock1 = ExtractBlock(Input=Case)<br class="gmail_msg">
extractBlock1.BlockIndices = [1]<br class="gmail_msg">
<br class="gmail_msg">
I probably wouldn't do the above unless you try your original script<br class="gmail_msg">
and run into out-of-memory errors.<br class="gmail_msg">
<br class="gmail_msg">
HTH,<br class="gmail_msg">
Cory<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
--<br class="gmail_msg">
Cory Quammen<br class="gmail_msg">
Staff R&D Engineer<br class="gmail_msg">
Kitware, Inc.<br class="gmail_msg">
</blockquote></div>