summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVinicius Monego <monego@posteo.net>2024-04-11 09:42:08 +0000
committerGuix Patches Tester <>2024-04-17 14:15:46 +0200
commitd6d7b59f510227bb2c427f46c44126e390664b53 (patch)
tree76da6fb755d6ef67a0b962384712a4a7be9f6292
parentb47ae1ecc43baaf726701ab2d2f810ecfaa75428 (diff)
downloadguix-patches-issue-70336.tar
guix-patches-issue-70336.tar.gz
gnu: Add python-libensemble.issue-70336
* gnu/packages/maths.scm (python-libensemble): New variable. Change-Id: I45d4ba209af746f22f3f6c74a01063726478de0f
-rw-r--r--gnu/packages/maths.scm53
1 files changed, 53 insertions, 0 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index cc42ce7902..5506201cbd 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -839,6 +839,59 @@ LP/MIP solver is included in the package.")
(base32
"040sfaa9jclg2nqdh83w71sv9rc1sznpnfiripjdyr48cady50a2"))))))
+(define-public python-libensemble
+ (package
+ (name "python-libensemble")
+ (version "1.2.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "libensemble" version))
+ (sha256
+ (base32 "0y46b8rk3dnnjnap76l80cj3ddkjcic1vcl706cajac19vnk8vlk"))))
+ (build-system pyproject-build-system)
+ (native-inputs (list ncurses
+ python-mock
+ python-mpi4py
+ python-pytest
+ python-pytest-cov
+ python-pytest-timeout))
+ (propagated-inputs (list python-numpy
+ python-psutil
+ python-pydantic-2
+ python-pyyaml
+ python-tomli))
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'relax-psutil
+ (lambda _
+ (substitute* "setup.py"
+ (("psutil>=5.9.4") "psutil>=5.9.2"))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ ;; These files require MPI and call subprocesses.
+ (delete-file
+ "libensemble/tests/unit_tests/test_executor.py")
+ (delete-file
+ "libensemble/tests/unit_tests/test_executor_gpus.py")
+ ;; Run only unit tests, regression tests require MPI.
+ (setenv "TERM" "xterm")
+ ;; A very bad way to skip another MPI test.
+ (substitute* "libensemble/tests/run-tests.sh"
+ (("export UNIT_TEST_MPI_SUBDIR=.*")
+ "export UNIT_TEST_MPI_SUBDIR=''"))
+ ;; Run the test script.
+ (invoke "bash" "libensemble/tests/run-tests.sh" "-u")))))))
+ (home-page "https://github.com/Libensemble/libensemble")
+ (synopsis "Toolkit for dynamic ensembles of calculations")
+ (description "@code{libensemble} is a a complete toolkit for dynamic
+ensembles of calculations. It connects @code{deciders} to experiments or
+simulations.")
+ (license license:bsd-3)))
+
(define-public linasm
(package
(name "linasm")