summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorSharlatan Hellseher <sharlatanus@gmail.com>2026-04-18 09:41:22 +0100
committerSharlatan Hellseher <sharlatanus@gmail.com>2026-04-30 13:20:51 +0100
commit20a12ea989a1c2ebfffc599e24767cafff3bdfce (patch)
tree3d7e8e62e0ef0962f4cb198f903d2508db6d710f /gnu
parent08cc6feb37b03b627b9cdb6355a3beb000d94542 (diff)
gnu: cianna: Update to 1.0.1.2-0.c9aa934.
* gnu/packages/astronomy.scm (cianna): Update to c9aa934a931ed77663997f0f20172ee7f63b068a commit. [source] <patches>: Add patch fixing missing CUDA error during runtime. [build-system]: Switch to cmake-build-system. [phases]{configure, check, build}: Keep phases. {fix-paths}: Remove phase. [native-inputs]: Remove python-wrapper, python-numpy, python-setuptools. * gnu/packages/patches/cianna-remove-error-for-missing-cuda.patch: New file. * gnu/local.mk (dist_patch_DATA): Register patch Change-Id: I953ed80843ce9939b46435d8e9b8a7f2966774d4 Reviewed-by: Hugo Buddelmeijer <hugo@buddelmeijer.nl>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/astronomy.scm63
-rw-r--r--gnu/packages/patches/cianna-remove-error-for-missing-cuda.patch32
3 files changed, 55 insertions, 41 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index 043aa975f4..103912f37a 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1093,6 +1093,7 @@ dist_patch_DATA = \
%D%/packages/patches/catdoc-CVE-2017-11110.patch \
%D%/packages/patches/chez-irregex-import-cond-expand.patch \
%D%/packages/patches/chez-scheme-bin-sh.patch \
+ %D%/packages/patches/cianna-remove-error-for-missing-cuda.patch \
%D%/packages/patches/circos-remove-findbin.patch \
%D%/packages/patches/cdparanoia-fpic.patch \
%D%/packages/patches/cdrkit-libre-cross-compile.patch \
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 313a934eb7..b7d2993659 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -705,59 +705,40 @@ in FITS files.")
(define-public cianna
(package
(name "cianna")
- (version "1.0.0")
+ ;; Project does not publish regular releases, see:
+ ;; <https://github.com/Deyht/CIANNA/issues/3>.
+ (properties '((commit . "c9aa934a931ed77663997f0f20172ee7f63b068a")
+ (revision . "0")))
+ (version (git-version "1.0.1.2"
+ (assoc-ref properties 'revision)
+ (assoc-ref properties 'commit)))
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/Deyht/CIANNA")
- (commit (string-append "V-" version ".0"))))
+ (commit (assoc-ref properties 'commit))))
(file-name (git-file-name name version))
(sha256
- (base32 "0i7czicyiy9lldsrarsh9lpjm4znx3gnsi1kqqyhiafxjxsji35k"))))
- (build-system gnu-build-system)
+ (base32 "1xdm5sfk2w49sg8bpalw5yy2nmfmrmlbyf5bshhg9621rzp5r6p7"))
+ (patches
+ ;; XXX: See: <https://github.com/Deyht/CIANNA/issues/4>.
+ (search-patches "cianna-remove-error-for-missing-cuda.patch"))))
+ (build-system cmake-build-system)
(arguments
(list
+ #:tests? #f ;no tests
+ #:build-type "Release"
+ #:configure-flags
+ #~(list "-DUSE_BLAS=ON" "-DBUILD_MODULE=OFF" "-DUSE_CUDA=OFF")
#:phases
#~(modify-phases %standard-phases
- (delete 'configure) ; no configure
- (delete 'check) ; no tests
- (add-after 'unpack 'fix-paths
- (lambda* (#:key inputs #:allow-other-keys)
- (let* ((blas #$(this-package-input "openblas")))
- (substitute* "compile.cp"
- (("/usr/bin/gcc")
- #$(cc-for-target))
- (("/opt/OpenBLAS/include/")
- (string-append blas "/include/"))
- (("/opt/OpenBLAS/lib")
- (string-append blas "/lib")))
- (substitute* "src/python_module_setup.py"
- (("/opt/OpenBLAS/include")
- (string-append blas "/include"))
- (("/opt/OpenBLAS/lib")
- (string-append blas "/lib"))))))
- (replace 'build
- (lambda* _
- (substitute* "compile.cp"
- (("-Wno-unknown-pragmas")
- "-Wno-unknown-pragmas -Wno-error=maybe-uninitialized"))
- (invoke "./compile.cp" "BLAS" "OPEN_MP" "LPTHREAD" "PY_INTERF")))
- (replace 'install
+ (replace 'install ;no install rule
(lambda _
- (rename-file "main" "cianna-cpu")
- (install-file "cianna-cpu" (string-append #$output "/bin"))))
- (add-after 'install 'install-python
- (lambda _
- (with-directory-excursion "src"
- (invoke "python" "python_module_setup.py" "install"
- "--root=/"
- (string-append "--prefix=" #$output))))))))
- (native-inputs
- (list python-wrapper
- python-numpy
- python-setuptools))
- (inputs (list openblas))
+ (let ((bin (string-append #$output "/bin")))
+ (install-file "cianna" bin)))))))
+ (inputs
+ (list openblas))
(home-page "https://github.com/Deyht/CIANNA")
(synopsis "Deep learning framework for astronomical data analysis")
(description
diff --git a/gnu/packages/patches/cianna-remove-error-for-missing-cuda.patch b/gnu/packages/patches/cianna-remove-error-for-missing-cuda.patch
new file mode 100644
index 0000000000..b3b13a612b
--- /dev/null
+++ b/gnu/packages/patches/cianna-remove-error-for-missing-cuda.patch
@@ -0,0 +1,32 @@
+From 5eed2d2ca7c13c08ca7eb92fc4a78c30ca4b6b3d Mon Sep 17 00:00:00 2001
+From: Hellseher <sharlatanus@gmail.com>
+Date: Sat, 18 Apr 2026 08:26:29 +0000
+Subject: [PATCH] Remove CUDA error handling from network.c
+
+Removed error handling for CUDA compilation check.
+
+Fixes: https://github.com/Deyht/CIANNA/issues/4
+---
+ src/network.c | 9 ---------
+ 1 file changed, 9 deletions(-)
+
+diff --git a/src/network.c b/src/network.c
+index d454f64..5a9497c 100644
+--- a/src/network.c
++++ b/src/network.c
+@@ -155,15 +155,6 @@ CIANNA V-1.0.1.2 stable build (04/2026), by D.Cornu\n\
+ init_cuda(networks[network_number]);
+ #endif
+
+- #ifndef CUDA
+- if(comp_int == C_CUDA)
+- {
+- printf("\n ERROR: compute method set to CUDA while CIANNA was not compiled for it.\n");
+- printf(" Install Nvidia CUDA and recompile CIANNA with the appropriate option.\n\n");
+- exit(EXIT_FAILURE);
+- }
+- #endif
+-
+ #ifndef BLAS
+ if(comp_int == C_BLAS)
+ {