topy
topy copied to clipboard
Major improvements (discussion)
Hey folks
I've been thinking for a while about possible things that can be done. However, there are some problems that have to be discussed.
First, I think that the project has to be moved to Python 3 since Python 2 faces end-of-life in 2020. You probably know that supporting legacy software is sometimes extremely painful.
Second, we need to discuss cross-platform features of the package. I'm a Linux user so, to be honest, I do not care about other systems. However, I know that certain researchers use Windows or MacOS and do not want to learn new stuff. So, something has to be done in this case.
Finally, we can add the package to the official repository to make its installation easier.
I would like to discuss this with you before starting anything new.
V.
Hi,
Yes, moving it to Python 3 makes sense, it should be fairly easy, the only stumbling block is PySparse, which is not being maintained (last time I checked).
If one can find a solver that works as fast PySparse (which is just a wrapper for SuperLU and some Iterative solvers) then it should be fairly quick and painless to do (CHOLMOD?). ToPy's matrices are always Positive Definite so the solver one chooses should exploit this property.
William
On Mon, 28 May 2018 at 16:59, V-Kh [email protected] wrote:
Hey folks
I've been thinking for a while about possible things that can be done. However, there are some problems that have to be discussed.
First, I think that the project has to be moved to Python 3 since Python 2 faces end-of-life in 2020. You probably know that supporting legacy software is sometimes extremely painful.
Second, we need to discuss cross-platform features of the package. I'm a Linux user so, to be honest, I do not care about other systems. However, I know that certain researchers use Windows or MacOS and do not want to learn new stuff. So, something has to be done in this case.
V.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/williamhunter/topy/issues/37, or mute the thread https://github.com/notifications/unsubscribe-auth/ANktUZetwsVsIP9uNbFdJdoUWl5B9M9Eks5t3BC3gaJpZM4UQUIO .
Any updates on this issue?
Pysparse seems to be causing me some issues, when installed using pip, I get the following error:
(topology) $ pip install pysparse
Collecting pysparse
Using cached https://files.pythonhosted.org/packages/19/73/4429c57b285fa77ffabbfc078f35e2b7ef18eb317e8c82e2c8ff6992d5ae/pysparse-1.3-dev.tar.gz
Requirement already satisfied: numpy>=1.2 in /anaconda3/envs/topology/lib/python2.7/site-packages (from pysparse) (1.14.2)
Building wheels for collected packages: pysparse
Running setup.py bdist_wheel for pysparse ... error
Complete output from command /anaconda3/envs/topology/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/ss/05hswsx96fbgr7jh86lwgnj40000gn/T/pip-install-dzyZhE/pysparse/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /private/var/folders/ss/05hswsx96fbgr7jh86lwgnj40000gn/T/pip-wheel-plsLRw --python-tag cp27:
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Error while parsing svn version
/anaconda3/envs/topology/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'summary'
warnings.warn(msg)
non-existing path in '': '/private/var/folders/ss/05hswsx96fbgr7jh86lwgnj40000gn/T/pip-install-dzyZhE/pysparse/pysparse/include'
blas_opt_info:
blas_mkl_info:
customize UnixCCompiler
FOUND:
libraries = ['mkl_rt', 'pthread']
library_dirs = ['/anaconda3/envs/topology/lib']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['/anaconda3/envs/topology/include']
FOUND:
libraries = ['mkl_rt', 'pthread']
library_dirs = ['/anaconda3/envs/topology/lib']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['/anaconda3/envs/topology/include']
Sparse:: Using BLAS info:
{'libraries': ['mkl_rt', 'pthread'], 'library_dirs': ['/anaconda3/envs/topology/lib'], 'define_macros': [('SCIPY_MKL_H', None), ('HAVE_CBLAS',None)], 'include_dirs': ['/anaconda3/envs/topology/include']}
non-existing path in 'pysparse/sparse': '/private/var/folders/ss/05hswsx96fbgr7jh86lwgnj40000gn/T/pip-install-dzyZhE/pysparse/pysparse/include'
Using dflt_lib_dirs = []
Using dflt_libs = []
Eigen:: Using BLAS info:
{'libraries': ['mkl_rt', 'pthread'], 'library_dirs': ['/anaconda3/envs/topology/lib'], 'define_macros': [('SCIPY_MKL_H', None), ('HAVE_CBLAS',None)], 'include_dirs': ['/anaconda3/envs/topology/include']}
lapack_opt_info:
lapack_mkl_info:
customize UnixCCompiler
FOUND:
libraries = ['mkl_rt', 'pthread']
library_dirs = ['/anaconda3/envs/topology/lib']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['/anaconda3/envs/topology/include']
FOUND:
libraries = ['mkl_rt', 'pthread']
library_dirs = ['/anaconda3/envs/topology/lib']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['/anaconda3/envs/topology/include']
Eigen:: Using LAPACK info:
{'libraries': ['mkl_rt', 'pthread'], 'library_dirs': ['/anaconda3/envs/topology/lib'], 'define_macros': [('SCIPY_MKL_H', None), ('HAVE_CBLAS',None)], 'include_dirs': ['/anaconda3/envs/topology/include']}
Direct:: Using BLAS info:
{'libraries': ['mkl_rt', 'pthread'], 'library_dirs': ['/anaconda3/envs/topology/lib'], 'define_macros': [('SCIPY_MKL_H', None), ('HAVE_CBLAS',None)], 'include_dirs': ['/anaconda3/envs/topology/include']}
Using default UMFPACK and AMD
If you do not like this, edit the [UMFPACK] and [AMD]
sections of site.cfg
non-existing path in 'pysparse/direct': 'umfpack/include'
non-existing path in 'pysparse/direct': 'amd/include'
Using default SuperLU.
If you do not like this, edit the [SuperLU] section of site.cfg
non-existing path in 'pysparse/direct': 'superlu/include'
non-existing path in 'pysparse': '/private/var/folders/ss/05hswsx96fbgr7jh86lwgnj40000gn/T/pip-install-dzyZhE/pysparse/pysparse/include'
/anaconda3/envs/topology/lib/python2.7/site-packages/setuptools/dist.py:470: UserWarning: Normalizing '1.3-dev' to '1.3.dev0'
normalized_version,
running bdist_wheel
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
build_src
building py_modules sources
building extension "pysparse.sparse.spmatrix" sources
building extension "pysparse.eigen.jdsym" sources
building extension "pysparse.direct.umfpack" sources
building extension "pysparse.direct.superlu" sources
building extension "pysparse.itsolvers.krylov" sources
building extension "pysparse.precon.precon" sources
build_src: building npy-pkg config files
running build_py
creating build/lib.macosx-10.6-x86_64-2.7
creating build/lib.macosx-10.6-x86_64-2.7/pysparse
copying pysparse/version.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse
copying pysparse/__init__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse
copying pysparse/setup.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse
copying build/src.macosx-10.6-x86_64-2.7/pysparse/__config__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse
creating build/lib.macosx-10.6-x86_64-2.7/pysparse/sparse
copying pysparse/sparse/__init__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/sparse
copying pysparse/sparse/setup.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/sparse
copying pysparse/sparse/pysparseMatrix.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/sparse
copying pysparse/sparse/sparseMatrix.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/sparse
copying build/src.macosx-10.6-x86_64-2.7/pysparse/sparse/__config__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/sparse
creating build/lib.macosx-10.6-x86_64-2.7/pysparse/eigen
copying pysparse/eigen/__init__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/eigen
copying pysparse/eigen/setup.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/eigen
copying build/src.macosx-10.6-x86_64-2.7/pysparse/eigen/__config__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/eigen
creating build/lib.macosx-10.6-x86_64-2.7/pysparse/direct
copying pysparse/direct/__init__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/direct
copying pysparse/direct/pysparseSuperLU.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/direct
copying pysparse/direct/pysparseUmfpack.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/direct
copying pysparse/direct/directSolver.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/direct
copying pysparse/direct/setup.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/direct
copying build/src.macosx-10.6-x86_64-2.7/pysparse/direct/__config__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/direct
creating build/lib.macosx-10.6-x86_64-2.7/pysparse/itsolvers
copying pysparse/itsolvers/__init__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/itsolvers
copying pysparse/itsolvers/setup.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/itsolvers
copying pysparse/itsolvers/itsolvers_util.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/itsolvers
copying build/src.macosx-10.6-x86_64-2.7/pysparse/itsolvers/__config__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/itsolvers
creating build/lib.macosx-10.6-x86_64-2.7/pysparse/precon
copying pysparse/precon/__init__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/precon
copying pysparse/precon/setup.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/precon
copying build/src.macosx-10.6-x86_64-2.7/pysparse/precon/__config__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/precon
creating build/lib.macosx-10.6-x86_64-2.7/pysparse/tools
copying pysparse/tools/sparray.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/tools
copying pysparse/tools/poisson_vec.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/tools
copying pysparse/tools/sptime.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/tools
copying pysparse/tools/poisson.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/tools
copying pysparse/tools/__init__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/tools
copying pysparse/tools/spmatrix_util.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/tools
creating build/lib.macosx-10.6-x86_64-2.7/pysparse/misc
copying pysparse/misc/system.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/misc
copying pysparse/misc/__init__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/misc
running build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
building 'pysparse.sparse.spmatrix' extension
compiling C sources
C compiler: gcc -fno-strict-aliasing -I/anaconda3/envs/topology/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes
creating build/temp.macosx-10.6-x86_64-2.7/pysparse
creating build/temp.macosx-10.6-x86_64-2.7/pysparse/sparse
creating build/temp.macosx-10.6-x86_64-2.7/pysparse/sparse/src
compile options: '-DLENFUNC_OK=1 -DSCIPY_MKL_H -DHAVE_CBLAS -Ipysparse/sparse/src -I/private/var/folders/ss/05hswsx96fbgr7jh86lwgnj40000gn/T/pip-install-dzyZhE/pysparse/pysparse/include -I/anaconda3/envs/topology/include -I/anaconda3/envs/topology/lib/python2.7/site-packages/numpy/core/include -I/anaconda3/envs/topology/lib/python2.7/site-packages/numpy/core/include -I/private/var/folders/ss/05hswsx96fbgr7jh86lwgnj40000gn/T/pip-install-dzyZhE/pysparse/pysparse/include -I/anaconda3/envs/topology/include/python2.7 -c'
gcc: pysparse/sparse/src/spmatrixmodule.c
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
error: Command "gcc -fno-strict-aliasing -I/anaconda3/envs/topology/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DLENFUNC_OK=1 -DSCIPY_MKL_H -DHAVE_CBLAS -Ipysparse/sparse/src -I/private/var/folders/ss/05hswsx96fbgr7jh86lwgnj40000gn/T/pip-install-dzyZhE/pysparse/pysparse/include -I/anaconda3/envs/topology/include -I/anaconda3/envs/topology/lib/python2.7/site-packages/numpy/core/include -I/anaconda3/envs/topology/lib/python2.7/site-packages/numpy/core/include -I/private/var/folders/ss/05hswsx96fbgr7jh86lwgnj40000gn/T/pip-install-dzyZhE/pysparse/pysparse/include -I/anaconda3/envs/topology/include/python2.7 -c pysparse/sparse/src/spmatrixmodule.c -o build/temp.macosx-10.6-x86_64-2.7/pysparse/sparse/src/spmatrixmodule.o -MMD -MF build/temp.macosx-10.6-x86_64-2.7/pysparse/sparse/src/spmatrixmodule.o.d" failed with exit status 1
----------------------------------------
Failed building wheel for pysparse
Running setup.py clean for pysparse
Failed to build pysparse
Installing collected packages: pysparse
Running setup.py install for pysparse ... error
Complete output from command /anaconda3/envs/topology/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/ss/05hswsx96fbgr7jh86lwgnj40000gn/T/pip-install-dzyZhE/pysparse/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/ss/05hswsx96fbgr7jh86lwgnj40000gn/T/pip-record-ujN9Mc/install-record.txt --single-version-externally-managed --compile:
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Error while parsing svn version
/anaconda3/envs/topology/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'summary'
warnings.warn(msg)
non-existing path in '': '/private/var/folders/ss/05hswsx96fbgr7jh86lwgnj40000gn/T/pip-install-dzyZhE/pysparse/pysparse/include'
blas_opt_info:
blas_mkl_info:
customize UnixCCompiler
FOUND:
libraries = ['mkl_rt', 'pthread']
library_dirs = ['/anaconda3/envs/topology/lib']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['/anaconda3/envs/topology/include']
FOUND:
libraries = ['mkl_rt', 'pthread']
library_dirs = ['/anaconda3/envs/topology/lib']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['/anaconda3/envs/topology/include']
Sparse:: Using BLAS info:
{'libraries': ['mkl_rt', 'pthread'], 'library_dirs': ['/anaconda3/envs/topology/lib'], 'define_macros': [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)], 'include_dirs': ['/anaconda3/envs/topology/include']}
non-existing path in 'pysparse/sparse': '/private/var/folders/ss/05hswsx96fbgr7jh86lwgnj40000gn/T/pip-install-dzyZhE/pysparse/pysparse/include'
Using dflt_lib_dirs = []
Using dflt_libs = []
Eigen:: Using BLAS info:
{'libraries': ['mkl_rt', 'pthread'], 'library_dirs': ['/anaconda3/envs/topology/lib'], 'define_macros': [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)], 'include_dirs': ['/anaconda3/envs/topology/include']}
lapack_opt_info:
lapack_mkl_info:
customize UnixCCompiler
FOUND:
libraries = ['mkl_rt', 'pthread']
library_dirs = ['/anaconda3/envs/topology/lib']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['/anaconda3/envs/topology/include']
FOUND:
libraries = ['mkl_rt', 'pthread']
library_dirs = ['/anaconda3/envs/topology/lib']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['/anaconda3/envs/topology/include']
Eigen:: Using LAPACK info:
{'libraries': ['mkl_rt', 'pthread'], 'library_dirs': ['/anaconda3/envs/topology/lib'], 'define_macros': [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)], 'include_dirs': ['/anaconda3/envs/topology/include']}
Direct:: Using BLAS info:
{'libraries': ['mkl_rt', 'pthread'], 'library_dirs': ['/anaconda3/envs/topology/lib'], 'define_macros': [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)], 'include_dirs': ['/anaconda3/envs/topology/include']}
Using default UMFPACK and AMD
If you do not like this, edit the [UMFPACK] and [AMD]
sections of site.cfg
non-existing path in 'pysparse/direct': 'umfpack/include'
non-existing path in 'pysparse/direct': 'amd/include'
Using default SuperLU.
If you do not like this, edit the [SuperLU] section of site.cfg
non-existing path in 'pysparse/direct': 'superlu/include'
non-existing path in 'pysparse': '/private/var/folders/ss/05hswsx96fbgr7jh86lwgnj40000gn/T/pip-install-dzyZhE/pysparse/pysparse/include'
/anaconda3/envs/topology/lib/python2.7/site-packages/setuptools/dist.py:470: UserWarning: Normalizing '1.3-dev' to '1.3.dev0'
normalized_version,
running install
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
build_src
building py_modules sources
building extension "pysparse.sparse.spmatrix" sources
building extension "pysparse.eigen.jdsym" sources
building extension "pysparse.direct.umfpack" sources
building extension "pysparse.direct.superlu" sources
building extension "pysparse.itsolvers.krylov" sources
building extension "pysparse.precon.precon" sources
build_src: building npy-pkg config files
running build_py
creating build/lib.macosx-10.6-x86_64-2.7
creating build/lib.macosx-10.6-x86_64-2.7/pysparse
copying pysparse/version.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse
copying pysparse/__init__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse
copying pysparse/setup.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse
copying build/src.macosx-10.6-x86_64-2.7/pysparse/__config__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse
creating build/lib.macosx-10.6-x86_64-2.7/pysparse/sparse
copying pysparse/sparse/__init__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/sparse
copying pysparse/sparse/setup.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/sparse
copying pysparse/sparse/pysparseMatrix.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/sparse
copying pysparse/sparse/sparseMatrix.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/sparse
copying build/src.macosx-10.6-x86_64-2.7/pysparse/sparse/__config__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/sparse
creating build/lib.macosx-10.6-x86_64-2.7/pysparse/eigen
copying pysparse/eigen/__init__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/eigen
copying pysparse/eigen/setup.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/eigen
copying build/src.macosx-10.6-x86_64-2.7/pysparse/eigen/__config__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/eigen
creating build/lib.macosx-10.6-x86_64-2.7/pysparse/direct
copying pysparse/direct/__init__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/direct
copying pysparse/direct/pysparseSuperLU.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/direct
copying pysparse/direct/pysparseUmfpack.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/direct
copying pysparse/direct/directSolver.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/direct
copying pysparse/direct/setup.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/direct
copying build/src.macosx-10.6-x86_64-2.7/pysparse/direct/__config__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/direct
creating build/lib.macosx-10.6-x86_64-2.7/pysparse/itsolvers
copying pysparse/itsolvers/__init__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/itsolvers
copying pysparse/itsolvers/setup.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/itsolvers
copying pysparse/itsolvers/itsolvers_util.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/itsolvers
copying build/src.macosx-10.6-x86_64-2.7/pysparse/itsolvers/__config__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/itsolvers
creating build/lib.macosx-10.6-x86_64-2.7/pysparse/precon
copying pysparse/precon/__init__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/precon
copying pysparse/precon/setup.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/precon
copying build/src.macosx-10.6-x86_64-2.7/pysparse/precon/__config__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/precon
creating build/lib.macosx-10.6-x86_64-2.7/pysparse/tools
copying pysparse/tools/sparray.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/tools
copying pysparse/tools/poisson_vec.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/tools
copying pysparse/tools/sptime.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/tools
copying pysparse/tools/poisson.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/tools
copying pysparse/tools/__init__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/tools
copying pysparse/tools/spmatrix_util.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/tools
creating build/lib.macosx-10.6-x86_64-2.7/pysparse/misc
copying pysparse/misc/system.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/misc
copying pysparse/misc/__init__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/misc
running build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
building 'pysparse.sparse.spmatrix' extension
compiling C sources
C compiler: gcc -fno-strict-aliasing -I/anaconda3/envs/topology/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes
creating build/temp.macosx-10.6-x86_64-2.7/pysparse
creating build/temp.macosx-10.6-x86_64-2.7/pysparse/sparse
creating build/temp.macosx-10.6-x86_64-2.7/pysparse/sparse/src
compile options: '-DLENFUNC_OK=1 -DSCIPY_MKL_H -DHAVE_CBLAS -Ipysparse/sparse/src -I/private/var/folders/ss/05hswsx96fbgr7jh86lwgnj40000gn/T/pip-install-dzyZhE/pysparse/pysparse/include -I/anaconda3/envs/topology/include -I/anaconda3/envs/topology/lib/python2.7/site-packages/numpy/core/include -I/anaconda3/envs/topology/lib/python2.7/site-packages/numpy/core/include -I/private/var/folders/ss/05hswsx96fbgr7jh86lwgnj40000gn/T/pip-install-dzyZhE/pysparse/pysparse/include -I/anaconda3/envs/topology/include/python2.7 -c'
gcc: pysparse/sparse/src/spmatrixmodule.c
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
error: Command "gcc -fno-strict-aliasing -I/anaconda3/envs/topology/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DLENFUNC_OK=1 -DSCIPY_MKL_H -DHAVE_CBLAS -Ipysparse/sparse/src -I/private/var/folders/ss/05hswsx96fbgr7jh86lwgnj40000gn/T/pip-install-dzyZhE/pysparse/pysparse/include -I/anaconda3/envs/topology/include -I/anaconda3/envs/topology/lib/python2.7/site-packages/numpy/core/include -I/anaconda3/envs/topology/lib/python2.7/site-packages/numpy/core/include -I/private/var/folders/ss/05hswsx96fbgr7jh86lwgnj40000gn/T/pip-install-dzyZhE/pysparse/pysparse/include -I/anaconda3/envs/topology/include/python2.7 -c pysparse/sparse/src/spmatrixmodule.c -o build/temp.macosx-10.6-x86_64-2.7/pysparse/sparse/src/spmatrixmodule.o -MMD -MF build/temp.macosx-10.6-x86_64-2.7/pysparse/sparse/src/spmatrixmodule.o.d" failed with exit status 1
----------------------------------------
Command "/anaconda3/envs/topology/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/ss/05hswsx96fbgr7jh86lwgnj40000gn/T/pip-install-dzyZhE/pysparse/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/ss/05hswsx96fbgr7jh86lwgnj40000gn/T/pip-record-ujN9Mc/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/ss/05hswsx96fbgr7jh86lwgnj40000gn/T/pip-install-dzyZhE/pysparse/
And when using the conda installer, I get the following error when running python scripts/optimise.py templates/minimal.tpd
:
[(topology) $ python scripts/optimise.py templates/minimal.tpd
Traceback (most recent call last):
File "scripts/optimise.py", line 8, in <module>
import topy
File "/anaconda3/envs/topology/lib/python2.7/site-packages/topy/__init__.py", line 8, in <module>
from .topology import *
File "/anaconda3/envs/topology/lib/python2.7/site-packages/topy/topology.py", line 14, in <module>
from pysparse import superlu, itsolvers, precon
File "/anaconda3/envs/topology/lib/python2.7/site-packages/pysparse/__init__.py", line 13, in <module>
from sparse import spmatrix
File "/anaconda3/envs/topology/lib/python2.7/site-packages/pysparse/sparse/__init__.py", line 6, in <module>
from pysparseMatrix import *
File "/anaconda3/envs/topology/lib/python2.7/site-packages/pysparse/sparse/pysparseMatrix.py", line 57, in <module>
from pysparse.sparse import spmatrix
ImportError: dlopen(/anaconda3/envs/topology/lib/python2.7/site-packages/pysparse/sparse/spmatrix.so, 2): Library not loaded: @rpath/libopenblas.dylib
Referenced from: /anaconda3/envs/topology/lib/python2.7/site-packages/pysparse/sparse/spmatrix.so
Reason: image not found](url)
Any ideas?
EDIT: This fixed the conda install
Hi, Yes, moving it to Python 3 makes sense, it should be fairly easy, the only stumbling block is PySparse, which is not being maintained (last time I checked). If one can find a solver that works as fast PySparse (which is just a wrapper for SuperLU and some Iterative solvers) then it should be fairly quick and painless to do (CHOLMOD?). ToPy's matrices are always Positive Definite so the solver one chooses should exploit this property. William
Scipy seems to be the obvious candidate. Together with numpy they form the de facto standard startup for scientific computations in python. According to https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.sparse.linalg.splu.html then it also uses the same backend: that is SuperLU
When I started working on ToPy (more than 10 years ago now) I initially did use SciPy, but the performance was extremely poor compared to PySparse. It's most proabaly better by now, I'd hope.
You're welcome to make the change, you only need to recode the FEA part :-)
Anaconda is another option I may look into in future.
William
On Mon, 6 May 2019 at 13:10, Kjetil Andre Johannessen < [email protected]> wrote:
Hi, Yes, moving it to Python 3 makes sense, it should be fairly easy, the only stumbling block is PySparse, which is not being maintained (last time I checked). If one can find a solver that works as fast PySparse (which is just a wrapper for SuperLU and some Iterative solvers) then it should be fairly quick and painless to do (CHOLMOD?). ToPy's matrices are always Positive Definite so the solver one chooses should exploit this property. William
Scipy seems to be the obvious candidate. Together with numpy they form the de facto standard startup for scientific computations in python. According to https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.sparse.linalg.splu.html then it also uses the same backend: that is SuperLU
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/williamhunter/topy/issues/37#issuecomment-489583950, or mute the thread https://github.com/notifications/unsubscribe-auth/ADMS2UPCQ4YBBNGEPKOOSXDPUAGYRANCNFSM4FCBIIHA .