Skip to content

Commit

Permalink
core:mkl threads; docs
Browse files Browse the repository at this point in the history
  • Loading branch information
hczhai committed Dec 1, 2023
1 parent a72607e commit c729757
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ jobs:
gsed -i "/mkl/d" setup.py
gsed -i "/intel-openmp/d" setup.py
gsed -i "/DUSE_MKL/c \ '-DUSE_MKL=OFF'," setup.py
gsed -i "/DUSE_MKL/a \ '-DFORCE_LIB_ABS_PATH=OFF'," setup.py
export OMPROOT=$(brew --prefix libomp)
echo ${OMPROOT}
cmake --version
Expand Down Expand Up @@ -298,6 +299,7 @@ jobs:
gsed -i "s/version=.*/version='${TAG_STRING:11}',/" setup.py
gsed -i "/DUSE_MKL/a \ '-DOMP_LIB=OMP'," setup.py
gsed -i "/DUSE_MKL/a \ '-DARCH_ARM64=ON'," setup.py
gsed -i "/DUSE_MKL/a \ '-DFORCE_LIB_ABS_PATH=OFF'," setup.py
gsed -i "/mkl/d" setup.py
gsed -i "/intel-openmp/d" setup.py
gsed -i "/DUSE_MKL/c \ '-DUSE_MKL=OFF'," setup.py
Expand Down
5 changes: 5 additions & 0 deletions docs/source/user/keywords.rst
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,11 @@ davidson\_soft\_max\_iter
If this numebr is -1, or larger than or equal to ``davidson_max_iter``,
this keyword has no effect and ``davidson_max_iter`` is used instead.

davidson\_def\_max\_size
Optional. Max size of the Krylov subspace in Davidson. Default is 50.
The Davidson working memory is two times this number times ``Wmem`` printed during sweeps.
One may reduce this number to save memory when the MPS bond dimension is very large.

n\_sub\_sweeps
Optional. Number of sweeps for each time step. Defualt is 2.
This keyword only has effect when used with ``delta_t`` and when ``te_type`` is ``rk4``.
Expand Down
5 changes: 3 additions & 2 deletions pyblock2/driver/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ def __init__(
clean_scratch=True,
restart_dir=None,
n_threads=None,
n_mkl_threads=1,
symm_type=SymmetryTypes.SU2,
mpi=None,
stack_mem_ratio=0.4,
Expand All @@ -371,8 +372,8 @@ def __init__(
bw.b.Global.threading = bw.b.Threading(
bw.b.ThreadingTypes.OperatorBatchedGEMM | bw.b.ThreadingTypes.Global,
n_threads,
n_threads,
1,
n_threads // n_mkl_threads,
n_mkl_threads,
)
bw.b.Global.threading.seq_type = bw.b.SeqTypes.Tasked
self.reorder_idx = None
Expand Down

0 comments on commit c729757

Please sign in to comment.