How can I incorporate Python's solve() in a Python CULA program? I am using
LA = libculaC.solve()
Result:
Traceback (most recent call last):
File "culaTest.py", line 96, in <module>
LA = libculaC.solve(0)
File "/usr/lib/python2.7/ctypes/__init__.py", line 378, in __getattr__
func = self.__getitem__(name)
File "/usr/lib/python2.7/ctypes/__init__.py", line 383, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /usr/local/cula/lib64/libcula_lapack.so: undefined symbol:
solve
Any combination of liculaC and ctypes give me similar errors. How can I bring this function in? Do I need to use a C function (scanf) or something. Thanks.
This took awhile, but this is what I have so far. Must use ctypes and must convert to column major vice the standard row major. Use matrices not arrays and keep your data types consistent throughout.
OUTPUT: This is Anp:
[[ 4. 2.] [ 1. 5.]]
___________END Anp______________
This is B1
[[ 5.] [ 7.]]
__________________B1 END______________________
This is X
[ 5. 7.]
__________________X END______________________
The solution returning from Sgesv:
[[ 1. 1.]]
-----------------------Program End----------------------------