- Thank you received: 0
error on install ngsxfem
3 years 6 months ago #3740
by Shaoqi
error on install ngsxfem was created by Shaoqi
Dear ngsolve developer
Thank you for this versatility library. I have some issue on installing the ngsxfem, here is my procedure of the installation:
OS: ubuntu 20
I first use conda to install the ngsolve in the anaconda site package, all works well and I used it to do some calculation without any problem.
Then, I would like to install the ngsxfem to use some XFEM utils, now I have some problem:
I first tried to install it by pip3, installation had no problem. But when I import xfem in a python script, it poses an error like: from xfem.ngsxfem_py import *
ImportError: arg(): could not convert default argument into a Python object (type not registered yet?). Compile in debug mode for more information.
I was not sure what was going on, so I tried to install it from source, I followed the instruction on the site: clone the source (the most recent version 2.0) and build it. However, when I sudo make install, error occured:
[100%] Built target ngsxfem_py
Install the project...
-- Install configuration: ""
-- Up-to-date: /home/swu2019/anaconda3/lib/python3.8/site-packages/xfem/ngsxfem_py.so
-- Up-to-date: /home/swu2019/anaconda3/lib/python3.8/site-packages/xfem/__init__.py
-- Up-to-date: /home/swu2019/anaconda3/lib/python3.8/site-packages/xfem/cutmg.py
-- Up-to-date: /home/swu2019/anaconda3/lib/python3.8/site-packages/xfem/mlset.py
-- Up-to-date: /home/swu2019/anaconda3/lib/python3.8/site-packages/xfem/lset_spacetime.py
-- Up-to-date: /home/swu2019/anaconda3/lib/python3.8/site-packages/xfem/lsetcurv.py
-- Up-to-date: /home/swu2019/anaconda3/lib/python3.8/site-packages/xfem/utils.py
-- Up-to-date: /home/swu2019/anaconda3/lib/python3.8/site-packages/xfem/ngs_check.py
importing ngsxfem-2.0
Traceback (most recent call last):
File "/home/swu2019/anaconda3/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/swu2019/anaconda3/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/swu2019/anaconda3/lib/python3.8/site-packages/pybind11_stubgen/__main__.py", line 4, in <module>
main()
File "/home/swu2019/anaconda3/lib/python3.8/site-packages/pybind11_stubgen/__init__.py", line 915, in main
_module = ModuleStubsGenerator(_module_name)
File "/home/swu2019/anaconda3/lib/python3.8/site-packages/pybind11_stubgen/__init__.py", line 666, in __init__
self.module = importlib.import_module(module_or_module_name)
File "/home/swu2019/anaconda3/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/swu2019/anaconda3/lib/python3.8/site-packages/xfem/__init__.py", line 23, in <module>
from xfem.ngsxfem_py import *
ImportError: arg(): could not convert default argument into a Python object (type not registered yet?). Compile in debug mode for more information.
CMake Error at python/cmake_install.cmake:104 (file):
file INSTALL cannot find
"/home/swu2019/programming/PyPoroX/build-xfem/python/../stubs/xfem-stubs":
No such file or directory.
Call Stack (most recent call first):
cmake_install.cmake:42 (include)
Cause the /home/swu2019/anaconda3/lib/python3.8/site-packages/ is the directory of the ngsolve, I set the location for the ngsxfem here.
I am very appreciate if you could help to finish the installation or give me some hint !!!
Best regards,
Shaoqi
Thank you for this versatility library. I have some issue on installing the ngsxfem, here is my procedure of the installation:
OS: ubuntu 20
I first use conda to install the ngsolve in the anaconda site package, all works well and I used it to do some calculation without any problem.
Then, I would like to install the ngsxfem to use some XFEM utils, now I have some problem:
I first tried to install it by pip3, installation had no problem. But when I import xfem in a python script, it poses an error like: from xfem.ngsxfem_py import *
ImportError: arg(): could not convert default argument into a Python object (type not registered yet?). Compile in debug mode for more information.
I was not sure what was going on, so I tried to install it from source, I followed the instruction on the site: clone the source (the most recent version 2.0) and build it. However, when I sudo make install, error occured:
[100%] Built target ngsxfem_py
Install the project...
-- Install configuration: ""
-- Up-to-date: /home/swu2019/anaconda3/lib/python3.8/site-packages/xfem/ngsxfem_py.so
-- Up-to-date: /home/swu2019/anaconda3/lib/python3.8/site-packages/xfem/__init__.py
-- Up-to-date: /home/swu2019/anaconda3/lib/python3.8/site-packages/xfem/cutmg.py
-- Up-to-date: /home/swu2019/anaconda3/lib/python3.8/site-packages/xfem/mlset.py
-- Up-to-date: /home/swu2019/anaconda3/lib/python3.8/site-packages/xfem/lset_spacetime.py
-- Up-to-date: /home/swu2019/anaconda3/lib/python3.8/site-packages/xfem/lsetcurv.py
-- Up-to-date: /home/swu2019/anaconda3/lib/python3.8/site-packages/xfem/utils.py
-- Up-to-date: /home/swu2019/anaconda3/lib/python3.8/site-packages/xfem/ngs_check.py
importing ngsxfem-2.0
Traceback (most recent call last):
File "/home/swu2019/anaconda3/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/swu2019/anaconda3/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/swu2019/anaconda3/lib/python3.8/site-packages/pybind11_stubgen/__main__.py", line 4, in <module>
main()
File "/home/swu2019/anaconda3/lib/python3.8/site-packages/pybind11_stubgen/__init__.py", line 915, in main
_module = ModuleStubsGenerator(_module_name)
File "/home/swu2019/anaconda3/lib/python3.8/site-packages/pybind11_stubgen/__init__.py", line 666, in __init__
self.module = importlib.import_module(module_or_module_name)
File "/home/swu2019/anaconda3/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/swu2019/anaconda3/lib/python3.8/site-packages/xfem/__init__.py", line 23, in <module>
from xfem.ngsxfem_py import *
ImportError: arg(): could not convert default argument into a Python object (type not registered yet?). Compile in debug mode for more information.
CMake Error at python/cmake_install.cmake:104 (file):
file INSTALL cannot find
"/home/swu2019/programming/PyPoroX/build-xfem/python/../stubs/xfem-stubs":
No such file or directory.
Call Stack (most recent call first):
cmake_install.cmake:42 (include)
Cause the /home/swu2019/anaconda3/lib/python3.8/site-packages/ is the directory of the ngsolve, I set the location for the ngsxfem here.
I am very appreciate if you could help to finish the installation or give me some hint !!!
Best regards,
Shaoqi
3 years 6 months ago #3741
by schruste
Replied by schruste on topic error on install ngsxfem
Dear Shaoqi,
We haven't worked with conda and ngsxfem so far, but it is not too surprising that the conda install of ngsolve and the pip/manual install of ngsxfem don't work well together. Any chance you could simply install ngsolve without conda? E.g. through apt-get?
Best,
Christoph
We haven't worked with conda and ngsxfem so far, but it is not too surprising that the conda install of ngsolve and the pip/manual install of ngsxfem don't work well together. Any chance you could simply install ngsolve without conda? E.g. through apt-get?
Best,
Christoph
3 years 6 months ago #3742
by Shaoqi
Replied by Shaoqi on topic error on install ngsxfem
Thanks for your reply, it works !
Another question, The version installed from apt-get is sequential version ? If we want to do the parallelization or use some other options like MUMPS direct solver, we should build by ourselves the ngsolve from the source, right ?
Thank you very much again for this very quickly reply !
Best regards
Shaoqi
Another question, The version installed from apt-get is sequential version ? If we want to do the parallelization or use some other options like MUMPS direct solver, we should build by ourselves the ngsolve from the source, right ?
Thank you very much again for this very quickly reply !
Best regards
Shaoqi
Time to create page: 0.101 seconds