fullwave25 1.3.2.dev4__py3-none-any.whl → 1.3.2.dev6__py3-none-any.whl

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.
fullwave/__init__.py CHANGED
@@ -66,7 +66,7 @@ try:
66
66
  __version__ = version("fullwave")
67
67
  except PackageNotFoundError:
68
68
  # Update via bump-my-version, not manually
69
- __version__ = "1.3.2-dev4"
69
+ __version__ = "1.3.2-dev6"
70
70
 
71
71
  VERSION = __version__ # for convenience
72
72
  logger.info("Fullwave version: %s", __version__)
fullwave/solver/solver.py CHANGED
@@ -754,15 +754,22 @@ class Solver:
754
754
  CuPy arrays, then drain both the device and pinned memory pools.
755
755
  This prevents stale allocations from causing memory pressure when
756
756
  subsequent operations allocate large GPU arrays.
757
+
758
+ The release is best effort. It does nothing when CuPy is absent, and
759
+ it does nothing when CuPy is present without a usable CUDA driver,
760
+ which is the case on a machine with no GPU.
757
761
  """
758
762
  gc.collect()
759
763
  try:
760
764
  import cupy as cp # noqa: PLC0415
765
+ except ImportError:
766
+ return
761
767
 
768
+ try:
762
769
  cp.get_default_memory_pool().free_all_blocks()
763
770
  cp.get_default_pinned_memory_pool().free_all_blocks()
764
- except ImportError:
765
- pass
771
+ except cp.cuda.runtime.CUDARuntimeError as error:
772
+ logger.debug("GPU memory pools were not released: %s", error)
766
773
 
767
774
  @staticmethod
768
775
  def _check_input(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: fullwave25
3
- Version: 1.3.2.dev4
3
+ Version: 1.3.2-dev6
4
4
  Summary: Fullwave 2.5: Ultrasound wave propagation simulation with heterogeneous power law attenuation modelling capabilities
5
5
  Author: Masashi Sode, Gianmarco Pinton
6
6
  Maintainer: Masashi Sode
@@ -1,4 +1,4 @@
1
- fullwave/__init__.py,sha256=N67HVm9KCzfDdfhvdTBWYWHVo8K3Hey1DewZ9vJshYM,2382
1
+ fullwave/__init__.py,sha256=HWlCSXqnirXLUjxKSjJ4VOxTNKNZUEK2cHU6eAmSi58,2382
2
2
  fullwave/grid.py,sha256=YbxAAgdYKR8AXwobtTZzHm9C4KR4D5--51zgbs0aQGY,7435
3
3
  fullwave/medium.py,sha256=Tz8Cwda6zLF8UFxjWFkRcAdko_KmF4l1zfmjWaqxu-M,68626
4
4
  fullwave/sensor.py,sha256=McHyaSKxM11_Kfb_2hfnOtV9Z1UMBCLkeovncLT8_bA,9308
@@ -27,7 +27,7 @@ fullwave/solver/input_file_writer.py,sha256=JamQHuA3-YrdLpdMFT6Ymw7noiCrtMr-DNo6
27
27
  fullwave/solver/launcher.py,sha256=zh-3HY4iKGmjreALu9WczDpWX3d74nOcIns9xVvnUIg,10531
28
28
  fullwave/solver/pml_builder.py,sha256=Pfy3AklZT-p6TX61A5ntFmpt2mJb5TDaV-gdtpjIwNo,87341
29
29
  fullwave/solver/shipped_database.py,sha256=lPqlgY-ShDyRqtH65m5RyNIMVlqswECVDNh5XCk1Yzg,3194
30
- fullwave/solver/solver.py,sha256=mvl8dXzFC6eV8lXAZdpt7ZFwcRuB1Oe9CWh4jsw_YCQ,66841
30
+ fullwave/solver/solver.py,sha256=oPD2ru0G21ZZYLMsLLWQXQV5uzkNXgKtLGyRif7Hvuk,67193
31
31
  fullwave/solver/source_type.py,sha256=li4-4tpu4bd1i9DqyDXZKOhkzW4IV6OcxB97C13c5MU,11180
32
32
  fullwave/solver/utils.py,sha256=0Q9PKl-4hohWXGzuldqo2XubI-LEHMjs0kYgb4oTLC0,5561
33
33
  fullwave/solver/bins/_gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_cuda118,sha256=bIzyHFzr_bsIBSlCcRA3M9LlTSRrBVn6ASJHyozvcwU,1245432
@@ -53,7 +53,7 @@ fullwave/utils/relaxation_parameters.py,sha256=wHUNMtJGAJwgCyUYd24_qtQZflMnkQTYh
53
53
  fullwave/utils/scatterer.py,sha256=CLqD085f9pqX4cF1YiT2IkzT5P0o1xp45Do7lf5BLnM,24049
54
54
  fullwave/utils/signal_filter.py,sha256=_Tf42aBygGtIUrcSPybYqvZoAW2o_4dd-hHTEvZ8--E,5219
55
55
  fullwave/utils/signal_process.py,sha256=MP38r37JSPHN4sT-lIReXS5BT2GT_tkRxD0Y1wQ-lNs,5153
56
- fullwave25-1.3.2.dev4.dist-info/METADATA,sha256=9J_j4t_-Oul-8TqSIRXP_lb0b2_NjQXWOwNgbjeEQLY,21747
57
- fullwave25-1.3.2.dev4.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
58
- fullwave25-1.3.2.dev4.dist-info/licenses/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
59
- fullwave25-1.3.2.dev4.dist-info/RECORD,,
56
+ fullwave25-1.3.2.dev6.dist-info/METADATA,sha256=eT-bf5ExjOy0FBjjreq_AYvV5_hhK0rtN8Gp3q8faCI,21747
57
+ fullwave25-1.3.2.dev6.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
58
+ fullwave25-1.3.2.dev6.dist-info/licenses/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
59
+ fullwave25-1.3.2.dev6.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.32.0
2
+ Generator: hatchling 1.32.4
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any