ansys / pydpf-core

Data Processing Framework - Python Core
http://dpf.docs.pyansys.com/
MIT License
68 stars 25 forks source link

dpf crashes with large .rst file #1249

Open mcMunich opened 1 year ago

mcMunich commented 1 year ago

Before submitting the issue

Description of the bug

I have a 44GB result file and when I try to get a result to a field_container I get a failure in my spyder IDE.

File ~\Miniconda3\envs\testenv\Lib\site-packages\ansys\dpf\gate\generated\operator_capi.py:402 in operator_getoutput_fields_container res = capi.dll.Operator_getoutput_FieldsContainer(op._internal_obj if op is not None else None, utils.to_int32(iOutput), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError))

OSError: exception: access violation reading 0x0000000000000030

I am guessing the scale of the .rst file is causing the issue. I can use a simple .rst and generates plots.

results = model.results
res = results.stress()
fields = res.outputs.fields_container()

disp = fields[0].data
disp

The failure occurs at the res.outputs.fields_container() line.

Steps To Reproduce

Maybe some reason for the failure can be determined from the error message above.

Which Operating System causes the issue?

Windows

Which DPF/Ansys version are you using?

Ansys 2024 R1

Which Python version causes the issue?

3.11

Installed packages

Unfortunately I am testing on a VDI but just set up a new virtual environment with dpf, pyvista. But for this VDI I have to use miniconda.

PProfizi commented 12 months ago

Hi @mcMunich thank you for raising this issue, I will discuss this with the rest of the team and let you know when I have more information.

PProfizi commented 12 months ago

@rlagha @cbellot000 @rafacanton @ansys-akarcher

ansys-akarcher commented 12 months ago

@mcMunich During the execution of the script, do you observe a RAM peak usage and is it a slow build up / hanging and then the crash happens ? Or is it a quick crash ?

May I ask the RAM capacity of the machine you are testing this script on ?

mcMunich commented 12 months ago

32GB. It is a VDI from a customer where we test things. The .rst is 44GB on a network drive. So that might be the issue. And today when I retested it, I was able to generate an image.

PProfizi commented 12 months ago

@mcMunich, since the file size may be an issue, we do have an example on "incremental" evaluation of workflows, which shows how to use the incremental module and should help in your case. This is a pretty new example so do not hesitate to ask if you need help applying this to your script.