Andreas Kloeckner
2018-05-12 20:33:54 UTC
This is really tech support for PyMetis (i.e. wrong list), but oh well.
Just install pyublas.
Andreas
Just install pyublas.
Andreas
I'm currently trying to build a simple FEA solver in python using an
incomplete Cholesky decomposition preconditioned conjugate gradient method.
I have exported an example stiffness matrix from my old (and slow) code into
a symmetric .mtx file. This matrix is imported into the example code at
https://wiki.tiker.net/PyCuda/Examples/SparseSolve.
Running the code resulted in errors. The first part was solved by pymetis.
However now a new problem appeared. I get a type error: "TypeError: No
registered converter was able to produce a C++ rvalue of type int from this
Python object of type numpy.int32".
runfile('/home/bram/Documenten/TUDelft/Thesis/Phyton/topopt/src/cgCUDATest.py',
wdir='/home/bram/Documenten/TUDelft/Thesis/Phyton/topopt/src')
starting...
building...
File "<ipython-input-56-3395cc199316>", line 1, in <module>
runfile('/home/bram/Documenten/TUDelft/Thesis/Phyton/topopt/src/cgCUDATest.py',
wdir='/home/bram/Documenten/TUDelft/Thesis/Phyton/topopt/src')
File
"/home/bram/.anaconda3/lib/python3.6/site-packages/spyder/utils/site/sitecustomize.py",
line 705, in runfile
execfile(filename, namespace)
File
"/home/bram/.anaconda3/lib/python3.6/site-packages/spyder/utils/site/sitecustomize.py",
line 102, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File
"/home/bram/Documenten/TUDelft/Thesis/Phyton/topopt/src/cgCUDATest.py", line
71, in <module>
main_cg()
File
"/home/bram/Documenten/TUDelft/Thesis/Phyton/topopt/src/cgCUDATest.py", line
21, in main_cg
spmv = PacketedSpMV(csr_mat, 'symmetric', csr_mat.dtype)
File
"/home/bram/.anaconda3/lib/python3.6/site-packages/pycuda-2017.1-py3.6-linux-x86_64.egg/pycuda/sparse/packeted.py",
line 127, in __init__
xadj=adj_mat.indptr, adjncy=adj_mat.indices)
File
"/home/bram/.anaconda3/lib/python3.6/site-packages/pymetis/__init__.py",
line 120, in part_graph
return part_graph(nparts, xadj, adjncy, vweights, eweights, recursive)
TypeError: No registered converter was able to produce a C++ rvalue of type
int from this Python object of type numpy.int32
Do I need to change the python files in pymetis?
--
Sent from: http://pycuda.2962900.n2.nabble.com/
_______________________________________________
PyCUDA mailing list
https://lists.tiker.net/listinfo/pycuda
incomplete Cholesky decomposition preconditioned conjugate gradient method.
I have exported an example stiffness matrix from my old (and slow) code into
a symmetric .mtx file. This matrix is imported into the example code at
https://wiki.tiker.net/PyCuda/Examples/SparseSolve.
Running the code resulted in errors. The first part was solved by pymetis.
However now a new problem appeared. I get a type error: "TypeError: No
registered converter was able to produce a C++ rvalue of type int from this
Python object of type numpy.int32".
runfile('/home/bram/Documenten/TUDelft/Thesis/Phyton/topopt/src/cgCUDATest.py',
wdir='/home/bram/Documenten/TUDelft/Thesis/Phyton/topopt/src')
starting...
building...
File "<ipython-input-56-3395cc199316>", line 1, in <module>
runfile('/home/bram/Documenten/TUDelft/Thesis/Phyton/topopt/src/cgCUDATest.py',
wdir='/home/bram/Documenten/TUDelft/Thesis/Phyton/topopt/src')
File
"/home/bram/.anaconda3/lib/python3.6/site-packages/spyder/utils/site/sitecustomize.py",
line 705, in runfile
execfile(filename, namespace)
File
"/home/bram/.anaconda3/lib/python3.6/site-packages/spyder/utils/site/sitecustomize.py",
line 102, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File
"/home/bram/Documenten/TUDelft/Thesis/Phyton/topopt/src/cgCUDATest.py", line
71, in <module>
main_cg()
File
"/home/bram/Documenten/TUDelft/Thesis/Phyton/topopt/src/cgCUDATest.py", line
21, in main_cg
spmv = PacketedSpMV(csr_mat, 'symmetric', csr_mat.dtype)
File
"/home/bram/.anaconda3/lib/python3.6/site-packages/pycuda-2017.1-py3.6-linux-x86_64.egg/pycuda/sparse/packeted.py",
line 127, in __init__
xadj=adj_mat.indptr, adjncy=adj_mat.indices)
File
"/home/bram/.anaconda3/lib/python3.6/site-packages/pymetis/__init__.py",
line 120, in part_graph
return part_graph(nparts, xadj, adjncy, vweights, eweights, recursive)
TypeError: No registered converter was able to produce a C++ rvalue of type
int from this Python object of type numpy.int32
Do I need to change the python files in pymetis?
--
Sent from: http://pycuda.2962900.n2.nabble.com/
_______________________________________________
PyCUDA mailing list
https://lists.tiker.net/listinfo/pycuda