PyAMG Error
49takashi opened this issue · 0 comments
Hi,
I am trying to use SU2-pyamg on the server and got some errors. Let me ask some questions.
My issue is related to that in the #948. Actually, I am in the situation very similar to https://github.com/su2code/SU2/issues/948#issuecomment-619332650 :
Traceback (most recent call last): File "/dfs/user/takashi279/miniconda3/envs/temp_su5/bin/mesh_adaptation_amg.py", line 38, in <module> import SU2 File "/dfs/user/takashi279/miniconda3/envs/temp_su5/bin/SU2/__init__.py", line 14, in <module> from SU2 import amginria File "/dfs/user/takashi279/miniconda3/envs/temp_su5/bin/SU2/amginria/__init__.py", line 4, in <module> from .interface import * File "/dfs/user/takashi279/miniconda3/envs/temp_su5/bin/SU2/amginria/interface.py", line 41, in <module> import _amgio as amgio ModuleNotFoundError: No module named '_amgio'
and followed the instructions provided as in https://github.com/su2code/SU2/issues/948#issuecomment-619334494:
The _amgio extension should be built by default. I haven't had any issues on any of the machines I've built on, so I appreciate the feedback.
Just curious, are you running with python >=3.7? The shebang in all the SU2 python scripts
#!/usr/bin/env python
uses whatever python is set to in your environment variables, but pyamg/_amgio will only build/run with python >=3.7. Could you also check if the _amgio extension was installed in your site-packages (probably located in ~/.local/lib/python3.x/site-packages)?
If it didn't build/install, you could go into extensions/AMGIO/su2io and run
python3 setup.py build_ext && python3 setup.py install
If it did build/install, try the command
python3 $SU2_RUN/mesh_adaptation_amg.py -f invCyl.cfg -n 6
After doing python3 setup.py build_ext && python3 setup.py install
, I encountered the following error:
(temp_su5) takashi279@turing1:/dfs/user/takashi279/plasma/design/multiscale_adap3/SU2/externals/AMGIO/su2io$ python3 setup.py build_ext && python3 setup.py install running build_ext running install /dfs/user/takashi279/miniconda3/envs/temp_su5/lib/python3.7/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. setuptools.SetuptoolsDeprecationWarning, /dfs/user/takashi279/miniconda3/envs/temp_su5/lib/python3.7/site-packages/setuptools/command/easy_install.py:147: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools. EasyInstallDeprecationWarning, running bdist_egg error: Invalid distribution name or version syntax: -amgio-2.1.1
Am I missing any dependencies? I previously compiled SU2 feature_adap branch without issues, and have already installed pyAMG. My python version is 3.7.12.
Any help would be really appreciated.