Skip to content

Commit

Permalink
Fix ranks when calling ksl code
Browse files Browse the repository at this point in the history
  • Loading branch information
Qbit- committed Apr 10, 2018
1 parent 5d2de7d commit 0e7bf47
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions tt/eigb/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def configuration(parent_package='', top_path=None):
'primme',
sources=[join(PRIMME_DIR, '*.c')] + [join(PRIMME_DIR, '*.f')],
include_dirs=['.'],
#extra_compile_args=[' -O0 -g -fcheck=all,no-array-temps -fbacktrace -ffpe-trap=zero,overflow,underflow'],
)
config.add_extension(
'tt_eigb',
Expand All @@ -39,6 +40,7 @@ def configuration(parent_package='', top_path=None):
'mytt',
'print_lib',
],
#extra_compile_args=[' -O0 -g -fcheck=all,no-array-temps -fbacktrace -ffpe-trap=zero,overflow,underflow'],
)

return config
Expand Down
6 changes: 6 additions & 0 deletions tt/ksl/ksl.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ def ksl(A, y0, tau, verb=1, scheme='symm', space=8, rmax=2000):
0.0
"""

y0 = y0.round(1e-14) # This will fix ranks
# to be no more than maximal reasonable.
# Fortran part doesn't handle excessive ranks
ry = y0.r.copy()
if scheme is 'symm':
tp = 2
Expand Down Expand Up @@ -167,6 +170,9 @@ def diag_ksl(A, y0, tau, verb=1, scheme='symm', space=8, rmax=2000):
>>> print tt.dot(y1, y0) / (y1.norm() * y0.norm()) - 1 #Eigenvectors should not change
0.0
"""
y0 = y0.round(1e-14) # This will fix ranks
# to be no more than maximal reasonable.
# Fortran part doesn't handle excessive ranks
ry = y0.r.copy()
if scheme is 'symm':
tp = 2
Expand Down
4 changes: 4 additions & 0 deletions tt/ksl/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ def configuration(parent_package='', top_path=None):
config.add_library(
'expokit',
sources=expokit_src,
f2py_options=[' --debug-capi']
#extra_compile_args=[' -O0 -g -fcheck=all,no-array-temps -fbacktrace -ffpe-trap=zero,overflow,underflow'],
)
config.add_extension(
'dyn_tt',
Expand All @@ -51,6 +53,8 @@ def configuration(parent_package='', top_path=None):
'expokit',
'mytt',
],
# extra_compile_args=[' -O0 -g -fcheck=all,no-array-temps -fbacktrace -ffpe-trap=zero,overflow,underflow'],
# f2py_options=[' --debug-capi'],
)

return config
Expand Down
2 changes: 1 addition & 1 deletion tt/tt-fort
Submodule tt-fort updated 9 files
+1 −1 Makefile
+2 −1 compile.sh
+84 −30 expm/normest.f90
+423 −0 gmres_3d.c
+0 −88 normest.f90
+26 −11 test_ksl.f90
+1,134 −0 tt_adapt_als.f90
+19 −41 tt_ksl.f90
+1 −1 ttals.f90

0 comments on commit 0e7bf47

Please sign in to comment.