PyQUDA-Utils 0.10.7.dev3__tar.gz → 0.10.8.dev0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. {pyquda_utils-0.10.7.dev3 → pyquda_utils-0.10.8.dev0}/PKG-INFO +8 -2
  2. {pyquda_utils-0.10.7.dev3 → pyquda_utils-0.10.8.dev0}/PyQUDA_Utils.egg-info/PKG-INFO +8 -2
  3. {pyquda_utils-0.10.7.dev3 → pyquda_utils-0.10.8.dev0}/PyQUDA_Utils.egg-info/SOURCES.txt +2 -0
  4. pyquda_utils-0.10.8.dev0/PyQUDA_Utils.egg-info/entry_points.txt +2 -0
  5. {pyquda_utils-0.10.7.dev3 → pyquda_utils-0.10.8.dev0}/README.md +7 -1
  6. {pyquda_utils-0.10.7.dev3 → pyquda_utils-0.10.8.dev0}/pyproject.toml +3 -0
  7. {pyquda_utils-0.10.7.dev3 → pyquda_utils-0.10.8.dev0}/pyquda_io/_field_utils.py +4 -3
  8. {pyquda_utils-0.10.7.dev3 → pyquda_utils-0.10.8.dev0}/pyquda_plugins/plugin_pyx.py +5 -0
  9. {pyquda_utils-0.10.7.dev3 → pyquda_utils-0.10.8.dev0}/pyquda_plugins/pygwu/__init__.py +1 -1
  10. pyquda_utils-0.10.8.dev0/pyquda_utils/_version.py +1 -0
  11. {pyquda_utils-0.10.7.dev3 → pyquda_utils-0.10.8.dev0}/pyquda_utils/convert.py +1 -1
  12. {pyquda_utils-0.10.7.dev3 → pyquda_utils-0.10.8.dev0}/pyquda_utils/core.py +6 -3
  13. {pyquda_utils-0.10.7.dev3 → pyquda_utils-0.10.8.dev0}/pyquda_utils/deprecated.py +1 -1
  14. pyquda_utils-0.10.8.dev0/pyquda_utils/eigensolve.py +43 -0
  15. {pyquda_utils-0.10.7.dev3 → pyquda_utils-0.10.8.dev0}/pyquda_utils/hmc_param.py +1 -1
  16. {pyquda_utils-0.10.7.dev3 → pyquda_utils-0.10.8.dev0}/pyquda_utils/io/__init__.py +1 -1
  17. {pyquda_utils-0.10.7.dev3 → pyquda_utils-0.10.8.dev0}/pyquda_utils/milc_rhmc_param.py +1 -1
  18. {pyquda_utils-0.10.7.dev3 → pyquda_utils-0.10.8.dev0}/pyquda_utils/source.py +1 -1
  19. pyquda_utils-0.10.7.dev3/pyquda_utils/_version.py +0 -1
  20. {pyquda_utils-0.10.7.dev3 → pyquda_utils-0.10.8.dev0}/LICENSE +0 -0
  21. {pyquda_utils-0.10.7.dev3 → pyquda_utils-0.10.8.dev0}/MANIFEST.in +0 -0
  22. {pyquda_utils-0.10.7.dev3 → pyquda_utils-0.10.8.dev0}/PyQUDA_Utils.egg-info/dependency_links.txt +0 -0
  23. {pyquda_utils-0.10.7.dev3 → pyquda_utils-0.10.8.dev0}/PyQUDA_Utils.egg-info/requires.txt +0 -0
  24. {pyquda_utils-0.10.7.dev3 → pyquda_utils-0.10.8.dev0}/PyQUDA_Utils.egg-info/top_level.txt +0 -0
  25. {pyquda_utils-0.10.7.dev3 → pyquda_utils-0.10.8.dev0}/pyquda_io/__init__.py +0 -0
  26. {pyquda_utils-0.10.7.dev3 → pyquda_utils-0.10.8.dev0}/pyquda_io/_mpi_file.py +0 -0
  27. {pyquda_utils-0.10.7.dev3 → pyquda_utils-0.10.8.dev0}/pyquda_io/chroma.py +0 -0
  28. {pyquda_utils-0.10.7.dev3 → pyquda_utils-0.10.8.dev0}/pyquda_io/io_general.py +0 -0
  29. {pyquda_utils-0.10.7.dev3 → pyquda_utils-0.10.8.dev0}/pyquda_io/kyu.py +0 -0
  30. {pyquda_utils-0.10.7.dev3 → pyquda_utils-0.10.8.dev0}/pyquda_io/lime.py +0 -0
  31. {pyquda_utils-0.10.7.dev3 → pyquda_utils-0.10.8.dev0}/pyquda_io/milc.py +0 -0
  32. {pyquda_utils-0.10.7.dev3 → pyquda_utils-0.10.8.dev0}/pyquda_io/nersc.py +0 -0
  33. {pyquda_utils-0.10.7.dev3 → pyquda_utils-0.10.8.dev0}/pyquda_io/npy.py +0 -0
  34. {pyquda_utils-0.10.7.dev3 → pyquda_utils-0.10.8.dev0}/pyquda_io/openqcd.py +0 -0
  35. {pyquda_utils-0.10.7.dev3 → pyquda_utils-0.10.8.dev0}/pyquda_io/xqcd.py +0 -0
  36. {pyquda_utils-0.10.7.dev3 → pyquda_utils-0.10.8.dev0}/pyquda_plugins/__main__.py +0 -0
  37. {pyquda_utils-0.10.7.dev3 → pyquda_utils-0.10.8.dev0}/pyquda_utils/__init__.py +0 -0
  38. {pyquda_utils-0.10.7.dev3 → pyquda_utils-0.10.8.dev0}/pyquda_utils/alg_remez.py +0 -0
  39. {pyquda_utils-0.10.7.dev3 → pyquda_utils-0.10.8.dev0}/pyquda_utils/gamma.py +0 -0
  40. {pyquda_utils-0.10.7.dev3 → pyquda_utils-0.10.8.dev0}/pyquda_utils/gauge_nd_sun.py +0 -0
  41. {pyquda_utils-0.10.7.dev3 → pyquda_utils-0.10.8.dev0}/pyquda_utils/gpt.py +0 -0
  42. {pyquda_utils-0.10.7.dev3 → pyquda_utils-0.10.8.dev0}/pyquda_utils/phase.py +0 -0
  43. {pyquda_utils-0.10.7.dev3 → pyquda_utils-0.10.8.dev0}/pyquda_utils/quasi_axial_gauge_fixing.py +0 -0
  44. {pyquda_utils-0.10.7.dev3 → pyquda_utils-0.10.8.dev0}/setup.cfg +0 -0
  45. {pyquda_utils-0.10.7.dev3 → pyquda_utils-0.10.8.dev0}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PyQUDA-Utils
3
- Version: 0.10.7.dev3
3
+ Version: 0.10.8.dev0
4
4
  Summary: Utility scripts based on PyQUDA
5
5
  Author-email: SaltyChiang <SaltyChiang@users.noreply.github.com>
6
6
  Maintainer-email: SaltyChiang <SaltyChiang@users.noreply.github.com>
@@ -106,6 +106,10 @@ Refer to https://github.com/CLQCD/PyQUDA/wiki/Benchmark for detailed instruction
106
106
 
107
107
  https://github.com/CLQCD/PyQUDA/wiki/Documentation
108
108
 
109
+ ## Plugin
110
+
111
+ https://github.com/CLQCD/PyQUDA/wiki/Plugin
112
+
109
113
  ## Development
110
114
 
111
115
  We recommend building PyQUDA using in-place mode instead of installing PyQUDA for development.
@@ -113,10 +117,12 @@ We recommend building PyQUDA using in-place mode instead of installing PyQUDA fo
113
117
  ```bash
114
118
  git clone --recursive https://github.com/CLQCD/PyQUDA.git
115
119
  cd PyQUDA
116
- ln -s pyquda_core/pyquda pyquda
120
+ ln -s pyquda_core/pyquda_comm ./
121
+ ln -s pyquda_core/pyquda ./
117
122
  cd pyquda_core
118
123
  export QUDA_PATH=/path/to/quda/build/usqcd
119
124
  python3 setup.py build_ext --inplace
125
+ cd ..
120
126
  ```
121
127
 
122
128
  Now you can modify Python files in the project and immediately get the new result by running scripts. Adding the root directory to `sys.path` is needed if you are running scripts from other directories.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PyQUDA-Utils
3
- Version: 0.10.7.dev3
3
+ Version: 0.10.8.dev0
4
4
  Summary: Utility scripts based on PyQUDA
5
5
  Author-email: SaltyChiang <SaltyChiang@users.noreply.github.com>
6
6
  Maintainer-email: SaltyChiang <SaltyChiang@users.noreply.github.com>
@@ -106,6 +106,10 @@ Refer to https://github.com/CLQCD/PyQUDA/wiki/Benchmark for detailed instruction
106
106
 
107
107
  https://github.com/CLQCD/PyQUDA/wiki/Documentation
108
108
 
109
+ ## Plugin
110
+
111
+ https://github.com/CLQCD/PyQUDA/wiki/Plugin
112
+
109
113
  ## Development
110
114
 
111
115
  We recommend building PyQUDA using in-place mode instead of installing PyQUDA for development.
@@ -113,10 +117,12 @@ We recommend building PyQUDA using in-place mode instead of installing PyQUDA fo
113
117
  ```bash
114
118
  git clone --recursive https://github.com/CLQCD/PyQUDA.git
115
119
  cd PyQUDA
116
- ln -s pyquda_core/pyquda pyquda
120
+ ln -s pyquda_core/pyquda_comm ./
121
+ ln -s pyquda_core/pyquda ./
117
122
  cd pyquda_core
118
123
  export QUDA_PATH=/path/to/quda/build/usqcd
119
124
  python3 setup.py build_ext --inplace
125
+ cd ..
120
126
  ```
121
127
 
122
128
  Now you can modify Python files in the project and immediately get the new result by running scripts. Adding the root directory to `sys.path` is needed if you are running scripts from other directories.
@@ -6,6 +6,7 @@ setup.py
6
6
  PyQUDA_Utils.egg-info/PKG-INFO
7
7
  PyQUDA_Utils.egg-info/SOURCES.txt
8
8
  PyQUDA_Utils.egg-info/dependency_links.txt
9
+ PyQUDA_Utils.egg-info/entry_points.txt
9
10
  PyQUDA_Utils.egg-info/requires.txt
10
11
  PyQUDA_Utils.egg-info/top_level.txt
11
12
  pyquda_io/__init__.py
@@ -29,6 +30,7 @@ pyquda_utils/alg_remez.py
29
30
  pyquda_utils/convert.py
30
31
  pyquda_utils/core.py
31
32
  pyquda_utils/deprecated.py
33
+ pyquda_utils/eigensolve.py
32
34
  pyquda_utils/gamma.py
33
35
  pyquda_utils/gauge_nd_sun.py
34
36
  pyquda_utils/gpt.py
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ pyquda_plugins = pyquda_plugins.__main__:main
@@ -60,6 +60,10 @@ Refer to https://github.com/CLQCD/PyQUDA/wiki/Benchmark for detailed instruction
60
60
 
61
61
  https://github.com/CLQCD/PyQUDA/wiki/Documentation
62
62
 
63
+ ## Plugin
64
+
65
+ https://github.com/CLQCD/PyQUDA/wiki/Plugin
66
+
63
67
  ## Development
64
68
 
65
69
  We recommend building PyQUDA using in-place mode instead of installing PyQUDA for development.
@@ -67,10 +71,12 @@ We recommend building PyQUDA using in-place mode instead of installing PyQUDA fo
67
71
  ```bash
68
72
  git clone --recursive https://github.com/CLQCD/PyQUDA.git
69
73
  cd PyQUDA
70
- ln -s pyquda_core/pyquda pyquda
74
+ ln -s pyquda_core/pyquda_comm ./
75
+ ln -s pyquda_core/pyquda ./
71
76
  cd pyquda_core
72
77
  export QUDA_PATH=/path/to/quda/build/usqcd
73
78
  python3 setup.py build_ext --inplace
79
+ cd ..
74
80
  ```
75
81
 
76
82
  Now you can modify Python files in the project and immediately get the new result by running scripts. Adding the root directory to `sys.path` is needed if you are running scripts from other directories.
@@ -42,3 +42,6 @@ Homepage = "https://github.com/CLQCD/PyQUDA"
42
42
  Documentation = "https://github.com/CLQCD/PyQUDA/wiki/Documentation"
43
43
  Repository = "https://github.com/CLQCD/PyQUDA.git"
44
44
  Issues = "https://github.com/CLQCD/PyQUDA/issues"
45
+
46
+ [project.scripts]
47
+ pyquda_plugins = "pyquda_plugins.__main__:main"
@@ -1,3 +1,4 @@
1
+ from math import prod
1
2
  from typing import List
2
3
 
3
4
  from mpi4py import MPI
@@ -78,7 +79,7 @@ def gaugePlaquette(latt_size: List[int], gauge: numpy.ndarray):
78
79
  plaq[3] = numpy.vdot(gauge[0] @ extended[3, :-1, :-1, :-1, 1:], gauge[3] @ extended[0, 1:, :-1, :-1, :-1]).real
79
80
  plaq[4] = numpy.vdot(gauge[1] @ extended[3, :-1, :-1, 1:, :-1], gauge[3] @ extended[1, 1:, :-1, :-1, :-1]).real
80
81
  plaq[5] = numpy.vdot(gauge[2] @ extended[3, :-1, 1:, :-1, :-1], gauge[3] @ extended[2, 1:, :-1, :-1, :-1]).real
81
- plaq /= int(numpy.prod(latt_size)) * Nc
82
+ plaq /= prod(latt_size) * Nc
82
83
  plaq = getMPIComm().allreduce(plaq, MPI.SUM)
83
84
  return numpy.array([plaq.mean(), plaq[:3].mean(), plaq[3:].mean()])
84
85
 
@@ -303,7 +304,7 @@ def propagatorToDiracPauli(degrand_rossi: numpy.ndarray):
303
304
  # plaq[3] = numpy.vdot(gauge[1, 1] @ gauge[2, 0], gauge[2, 1] @ gauge[1, 0]).real
304
305
  # plaq[4] = numpy.vdot(gauge[1, 1] @ gauge[3, 0], gauge[3, 1] @ gauge[1, 0]).real
305
306
  # plaq[5] = numpy.vdot(gauge[2, 1] @ gauge[3, 0], gauge[3, 1] @ gauge[2, 0]).real
306
- # plaq /= int(numpy.prod(latt_size)) * Nc
307
+ # plaq /= prod(latt_size) * Nc
307
308
  # plaq = getMPIComm().allreduce(plaq, MPI.SUM)
308
309
  # return numpy.array([plaq.mean(), plaq[:3].mean(), plaq[3:].mean()])
309
310
 
@@ -382,6 +383,6 @@ def propagatorToDiracPauli(degrand_rossi: numpy.ndarray):
382
383
  # plaq[3] = numpy.vdot(link_munu[3], link_numu[3]).real
383
384
  # plaq[4] = numpy.vdot(link_munu[4], link_numu[4]).real
384
385
  # plaq[5] = numpy.vdot(link_munu[5], link_numu[5]).real
385
- # plaq /= int(numpy.prod(latt_size)) * Nc
386
+ # plaq /= prod(latt_size) * Nc
386
387
  # plaq = getMPIComm().allreduce(plaq, MPI.SUM)
387
388
  # return numpy.array([plaq.mean(), plaq[:3].mean(), plaq[3:].mean()])
@@ -205,3 +205,8 @@ def build_plugin_pyx(plugins_root, lib: str, header: str, include_path: str):
205
205
  f.write(pylib_pyx)
206
206
  with open(os.path.join(plugins_root, f"py{lib}", f"_py{lib}.pyi"), "w") as f:
207
207
  f.write(pylib_pyi)
208
+
209
+ if os.path.exists(os.path.join(plugins_root, "yacctab.py")):
210
+ os.remove(os.path.join(plugins_root, "yacctab.py"))
211
+ if os.path.exists(os.path.join(plugins_root, "lextab.py")):
212
+ os.remove(os.path.join(plugins_root, "lextab.py"))
@@ -5,7 +5,7 @@ from typing import Sequence
5
5
  import numpy as np
6
6
 
7
7
  from pyquda_comm import initGrid, initDevice, getLogger, setGridMap, readMPIFile, readMPIFileInChunks
8
- from pyquda_comm.field import LatticeInfo, LatticeGauge, LatticeFermion, MultiLatticeFermion, evenodd
8
+ from pyquda_comm.field import evenodd, LatticeInfo, LatticeGauge, LatticeFermion, MultiLatticeFermion
9
9
  from . import _pygwu as gwu
10
10
 
11
11
  setGridMap("TZYX_FASTEST")
@@ -0,0 +1 @@
1
+ __version__ = "0.10.8.dev0"
@@ -1,7 +1,7 @@
1
1
  from typing import Union
2
2
 
3
3
  from pyquda import getLogger
4
- from pyquda_comm.field import (
4
+ from pyquda.field import (
5
5
  LatticeLink,
6
6
  LatticeFermion,
7
7
  LatticePropagator,
@@ -1,3 +1,4 @@
1
+ from math import prod
1
2
  from typing import List, Literal, Union
2
3
 
3
4
  import numpy
@@ -17,11 +18,13 @@ from pyquda import (
17
18
  setDefaultLattice,
18
19
  getDefaultLattice,
19
20
  getCUDABackend,
21
+ getCUDADevice,
22
+ getCUDAComputeCapability,
20
23
  getLogger,
21
24
  setLoggerLevel,
22
25
  dirac as fermion,
23
26
  )
24
- from pyquda_comm.field import (
27
+ from pyquda.field import ( # noqa: F401
25
28
  Ns,
26
29
  Nc,
27
30
  Nd,
@@ -238,8 +241,8 @@ def gatherLattice(data: numpy.ndarray, axes: List[int], reduce_op: Literal["sum"
238
241
  reduce_axis = tuple([keep[0] + d for d in range(4) if axes[d] == -1])
239
242
  prefix = data.shape[: keep[0]]
240
243
  suffix = data.shape[keep[-1] + 1 :]
241
- prefix_size = int(numpy.prod(prefix))
242
- suffix_size = int(numpy.prod(suffix))
244
+ prefix_size = prod(prefix)
245
+ suffix_size = prod(suffix)
243
246
 
244
247
  if getMPIRank() == root:
245
248
  sendbuf = numpy.ascontiguousarray(data.reshape(-1))
@@ -1,7 +1,7 @@
1
1
  from typing import List
2
2
 
3
3
  from pyquda import getLogger, getGridSize, pyquda as quda, enum_quda
4
- from pyquda_comm.field import LatticeFermion, LatticeGauge, LatticeInfo, LatticePropagator, Nc, Ns
4
+ from pyquda.field import LatticeFermion, LatticeGauge, LatticeInfo, LatticePropagator, Nc, Ns
5
5
  from pyquda.dirac.abstract import FermionDirac
6
6
 
7
7
 
@@ -0,0 +1,43 @@
1
+ from pyquda import pyquda as quda
2
+ from pyquda.enum_quda import QudaDslashType, QudaBoolean, QudaEigType, QudaEigSpectrumType
3
+ from pyquda.field import LatticeGauge, MultiLatticeStaggeredFermion
4
+
5
+
6
+ def laplace3d(
7
+ gauge: LatticeGauge, n_ev: int, n_kr: int, tol: int, max_restarts: int, poly_deg: int = 1, poly_cut: float = 0
8
+ ):
9
+ import numpy
10
+
11
+ latt_info = gauge.latt_info
12
+ gauge.gauge_dirac.invert_param.dslash_type = QudaDslashType.QUDA_LAPLACE_DSLASH
13
+ gauge.gauge_dirac.invert_param.mass = -1
14
+ gauge.gauge_dirac.invert_param.kappa = 1 / 6
15
+ gauge.gauge_dirac.invert_param.laplace3D = 3
16
+ gauge.gauge_dirac.loadGauge(gauge)
17
+
18
+ eig_param = quda.QudaEigParam()
19
+ eig_param.invert_param = gauge.gauge_dirac.invert_param
20
+ eig_param.eig_type = QudaEigType.QUDA_EIG_TR_LANCZOS_3D
21
+ eig_param.use_dagger = QudaBoolean.QUDA_BOOLEAN_FALSE
22
+ eig_param.use_norm_op = QudaBoolean.QUDA_BOOLEAN_FALSE
23
+ eig_param.use_pc = QudaBoolean.QUDA_BOOLEAN_FALSE
24
+ eig_param.compute_gamma5 = QudaBoolean.QUDA_BOOLEAN_FALSE
25
+ eig_param.spectrum = QudaEigSpectrumType.QUDA_SPECTRUM_SR_EIG
26
+ eig_param.n_ev = n_ev
27
+ eig_param.n_kr = n_kr
28
+ eig_param.n_conv = n_ev
29
+ eig_param.tol = tol
30
+ eig_param.ortho_dim = 3
31
+ eig_param.ortho_dim_size_local = latt_info.Lt
32
+ eig_param.vec_infile = b""
33
+ eig_param.vec_outfile = b""
34
+ eig_param.max_restarts = max_restarts
35
+ eig_param.use_poly_acc = QudaBoolean(poly_deg > 1)
36
+ eig_param.poly_deg = poly_deg
37
+ eig_param.a_min = poly_cut
38
+ eig_param.a_max = 2
39
+
40
+ evals = numpy.empty((latt_info.Lt * n_ev), "<c16")
41
+ evecs = MultiLatticeStaggeredFermion(latt_info, n_ev)
42
+ quda.eigensolveQuda(evecs.data_ptrs, evals, eig_param)
43
+ return evals.reshape(latt_info.Lt, n_ev).transpose(1, 0).real, evecs
@@ -6,7 +6,7 @@ from typing import Literal, Sequence, Tuple
6
6
  from gmpy2 import mpfr
7
7
 
8
8
  from pyquda_comm import getMPIComm, getMPIRank
9
- from pyquda_comm.field import X, Y, Z, T
9
+ from pyquda.field import X, Y, Z, T
10
10
  from pyquda.action.abstract import LoopParam, RationalParam
11
11
  from .alg_remez import AlgRemez
12
12
 
@@ -2,7 +2,7 @@ from typing import List, Union
2
2
 
3
3
  import numpy
4
4
 
5
- from pyquda_comm.field import (
5
+ from pyquda.field import (
6
6
  Ns,
7
7
  Nc,
8
8
  LatticeInfo,
@@ -1,7 +1,7 @@
1
1
  from math import log
2
2
  from typing import Dict, Tuple
3
3
 
4
- from pyquda_comm.field import X, Y, Z, T
4
+ from pyquda.field import X, Y, Z, T
5
5
  from pyquda.action.abstract import LoopParam, RationalParam
6
6
 
7
7
 
@@ -1,7 +1,7 @@
1
1
  from typing import List, Literal, Union
2
2
 
3
3
  from pyquda import getGridSize, getLogger
4
- from pyquda_comm.field import (
4
+ from pyquda.field import (
5
5
  Ns,
6
6
  Nc,
7
7
  LatticeInfo,
@@ -1 +0,0 @@
1
- __version__ = "0.10.7.dev3"