ansys / pydpf-core

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

DPF error with loading dynamic library (IntelMKL, etc.) #610

Open yeguang-xue opened 2 years ago

yeguang-xue commented 2 years ago

Before submitting the issue

Description of the bug

Encountered issue with some dynamic library loading on Ubuntu/CentOS.

The following shows screenshot of the error message on CentOS 7:

image

Steps To Reproduce

From a system with Ansys221 and DPF installed.

from ansys.dpf import core as dpf
dpf.start_local_server(ansys_path="/opt/ansys_inc/v221")

Which Operating System are you using?

Linux

Which Python version are you using?

3.9

Installed packages

aiohttp==3.8.3
aiosignal==1.3.1
ansys-api-mapdl==0.5.1
ansys-api-platform-instancemanagement==1.0.0b3
ansys-dpf-core==0.6.2
ansys-dpf-gate==0.2.3
ansys-dpf-gatebin==0.2.3
ansys-dpf-post==0.2.5
ansys-grpc-dpf==0.6.1
ansys-mapdl-core==0.63.3
ansys-mapdl-reader==0.52.3
ansys-platform-instancemanagement==1.0.2
appdirs==1.4.4
async-timeout==4.0.2
attrs==22.1.0
Bottleneck @ file:///opt/conda/conda-bld/bottleneck_1657175564434/work
brotlipy==0.7.0
cachetools==5.2.0
certifi @ file:///croot/certifi_1665076670883/work/certifi
cffi @ file:///opt/conda/conda-bld/cffi_1642701102775/work
charset-normalizer @ file:///tmp/build/80754af9/charset-normalizer_1630003229654/work
conda==22.9.0
conda-content-trust @ file:///tmp/build/80754af9/conda-content-trust_1617045594566/work
conda-package-handling @ file:///tmp/build/80754af9/conda-package-handling_1618262147379/work
cryptography @ file:///tmp/build/80754af9/cryptography_1639414572950/work
cycler @ file:///tmp/build/80754af9/cycler_1637851556182/work
fonttools==4.25.0
frozenlist==1.3.3
geomdl==5.3.1
google-api-core==2.10.2
google-api-python-client==2.65.0
google-auth==2.14.1
google-auth-httplib2==0.1.0
googleapis-common-protos==1.56.4
grpcio==1.50.0
httplib2==0.21.0
idna @ file:///tmp/build/80754af9/idna_1637925883363/work
imageio==2.22.4
importlib-metadata==5.0.0
kiwisolver @ file:///opt/conda/conda-bld/kiwisolver_1653292039266/work
matplotlib @ file:///croot/matplotlib-suite_1667356714455/work
mkl-fft==1.3.1
mkl-random @ file:///tmp/build/80754af9/mkl_random_1626186066731/work
mkl-service==2.4.0
multidict==6.0.2
munkres==1.1.4
numexpr @ file:///opt/conda/conda-bld/numexpr_1656940300424/work
numpy @ file:///opt/conda/conda-bld/numpy_and_numpy_base_1651563629415/work
packaging @ file:///tmp/build/80754af9/packaging_1637314298585/work
pandas==1.4.4
pexpect==4.8.0
Pillow==9.2.0
ply==3.11
pooch==1.6.0
protobuf==3.20.3
protoc-gen-swagger==0.1.0
psutil==5.9.4
ptyprocess==0.7.0
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycosat==0.6.3
pycparser @ file:///tmp/build/80754af9/pycparser_1636541352034/work
pyiges==0.2.1
pyOpenSSL @ file:///tmp/build/80754af9/pyopenssl_1635333100036/work
pyparsing @ file:///opt/conda/conda-bld/pyparsing_1661452539315/work
PyQt5-sip==12.11.0
PySocks @ file:///tmp/build/80754af9/pysocks_1605305812635/work
python-dateutil @ file:///tmp/build/80754af9/python-dateutil_1626374649649/work
pytz @ file:///opt/conda/conda-bld/pytz_1654762638606/work
pyvista==0.37.0
requests @ file:///opt/conda/conda-bld/requests_1641824580448/work
rsa==4.9
ruamel-yaml-conda @ file:///tmp/build/80754af9/ruamel_yaml_1616016711199/work
scipy @ file:///tmp/build/80754af9/scipy_1641555004408/work
scooby==0.7.0
sip @ file:///tmp/abs_44cd77b_pu/croots/recipe/sip_1659012365470/work
six @ file:///tmp/build/80754af9/six_1623709665295/work
toml @ file:///tmp/build/80754af9/toml_1616166611790/work
toolz @ file:///croot/toolz_1667464077321/work
tornado @ file:///opt/conda/conda-bld/tornado_1662061693373/work
tqdm @ file:///tmp/build/80754af9/tqdm_1635330843403/work
uritemplate==4.1.1
urllib3==1.26.7
vtk==9.2.2
wslink==1.9.1
yarl==1.8.1
zipp==3.10.0
PProfizi commented 2 years ago

Hi @yeguang-xue, as per the compatibility guidelines here (the linkin the issue template is being fixed to send directly to the table), ANSYS 2022 R1 (221) requires ansys-grpc-dpf==0.4.0. Would it be possible to test with this version? If the error persists, it looks like the issue would most likely come from the C++ compiler on your machine.

yeguang-xue commented 2 years ago

Hi @PProfizi ,

Thanks for the reply,

I tried with ansys-grpc-dpf==0.4.0 but the error persists.

image

I understand the error with libstdc++ is related to the system C++ library -- it appears on CentOS but not on Ubuntu. However, the hard link to MKL library seems a separate issue.

yeguang-xue commented 2 years ago

But for Ansys 2022R2, seems latest DPF library is working fine. Seems error is just for 2022R1 (even with ansys-grpc-dpf==0.4.0).

ayush-kumar-423 commented 2 years ago

@yeguang-xue Can you please check if you have set the following environment variables correctly? If not, please do and re-test. Please update the names as per your version.

export AWP_ROOT212=/share/software/.../ansys/2021R2/v212 export ANSYS_DPF_PATH=/share/software/.../ansys/2021R2/v212

Jalmenara commented 2 years ago

@yeguang-xue Can you please check if you have set the following environment variables correctly? If not, please do and re-test. Please update the names as per your version.

export AWP_ROOT212=/share/software/.../ansys/2021R2/v212 export ANSYS_DPF_PATH=/share/software/.../ansys/2021R2/v212

This solved the bug on an ANSYS 2021-R2 on Linux, with Python 3.8.15, with the following packages.

$ python -m pip list
Package                               Version
------------------------------------- ---------
aiohttp                               3.8.3
aiosignal                             1.3.1
ansys-api-mapdl                       0.5.1
ansys-api-platform-instancemanagement 1.0.0b3
ansys-corba                           0.1.1
ansys-dpf-core                        0.6.2
ansys-dpf-gate                        0.2.3
ansys-dpf-gatebin                     0.2.3
ansys-dpf-post                        0.2.5
ansys-grpc-dpf                        0.3.0
ansys-mapdl-core                      0.63.3
ansys-mapdl-reader                    0.52.3
ansys-platform-instancemanagement     1.0.2
appdirs                               1.4.4
asttokens                             2.1.0
async-timeout                         4.0.2
attrs                                 22.1.0
backcall                              0.2.0
backports.functools-lru-cache         1.6.4
cachetools                            5.2.0
certifi                               2022.9.24
charset-normalizer                    2.1.1
comm                                  0.1.0
cycler                                0.11.0
debugpy                               1.6.3
decorator                             5.1.1
entrypoints                           0.4
executing                             1.2.0
frozenlist                            1.3.3
geomdl                                5.3.1
git-filter-repo                       2.34.0
google-api-core                       2.10.2
google-api-python-client              2.66.0
google-auth                           2.14.1
google-auth-httplib2                  0.1.0
googleapis-common-protos              1.57.0
grpcio                                1.50.0
httplib2                              0.21.0
idna                                  3.4
imageio                               2.22.4
importlib-metadata                    5.0.0
ipykernel                             6.18.0
ipython                               8.6.0
jedi                                  0.18.1
jupyter_client                        7.4.7
jupyter_core                          5.0.0
kiwisolver                            1.4.4
matplotlib                            3.2.2
matplotlib-inline                     0.1.6
multidict                             6.0.2
nest-asyncio                          1.5.6
numpy                                 1.23.3
packaging                             21.3
parso                                 0.8.3
pexpect                               4.8.0
pickleshare                           0.7.5
Pillow                                9.2.0
pip                                   22.3.1
platformdirs                          2.5.2
pooch                                 1.6.0
prompt-toolkit                        3.0.33
protobuf                              3.20.3
protoc-gen-swagger                    0.1.0
psutil                                5.9.4
ptyprocess                            0.7.0
pure-eval                             0.2.2
pyasn1                                0.4.8
pyasn1-modules                        0.2.8
Pygments                              2.13.0
pyiges                                0.2.1
pyparsing                             3.0.9
python-dateutil                       2.8.2
pyvista                               0.37.0
pyzmq                                 24.0.1
requests                              2.28.1
rsa                                   4.9
scipy                                 1.9.1
scooby                                0.7.0
setuptools                            65.5.1
six                                   1.16.0
stack-data                            0.6.1
tornado                               6.2
tqdm                                  4.64.1
traitlets                             5.5.0
uritemplate                           4.1.1
urllib3                               1.26.12
vtk                                   9.2.2
wcwidth                               0.2.5
wheel                                 0.38.4
wslink                                1.9.1
yarl                                  1.8.1
zipp                                  3.10.0

Thank you!