1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-05-08 18:25:53 +02:00

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>
This commit is contained in:
Sharlatan Hellseher
2026-04-18 09:41:22 +01:00
parent 08cc6feb37
commit 20a12ea989
3 changed files with 55 additions and 41 deletions
+1
View File
@@ -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 \
+22 -41
View File
@@ -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
@@ -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)
{