Commit 83aa47f8 authored by PRUVOST Florent's avatar PRUVOST Florent
Browse files

storm: add a starpu-cuda-fxt package

parent 183e6307
......@@ -10,6 +10,8 @@
#:use-module (guix)
#:use-module (gnu packages gcc)
#:use-module (inria storm)
#:use-module (inria eztrace)
#:use-module (gnu packages python)
#:use-module (non-free cuda)
#:use-module (guix build-system)
......@@ -27,12 +29,12 @@ implicit GCC."
(define (lower* . args)
(let ((lowered (apply lower args)))
(bag
(inherit lowered)
(build-inputs (map (match-lambda
(("gcc" _ rest ...)
`("compiler" ,compiler ,@rest))
(input input))
(bag-build-inputs lowered))))))
(inherit lowered)
(build-inputs (map (match-lambda
(("gcc" _ rest ...)
`("compiler" ,compiler ,@rest))
(input input))
(bag-build-inputs lowered))))))
(build-system
(inherit gnu-build-system)
......@@ -52,10 +54,10 @@ implicit GCC."
(build-system trivial-build-system)
(arguments
'(#:builder (let ((out (assoc-ref %outputs "out"))
(gfortran (assoc-ref %build-inputs "gfortran")))
(mkdir out)
(symlink (string-append gfortran "/bin")
(string-append out "/bin")))))
(gfortran (assoc-ref %build-inputs "gfortran")))
(mkdir out)
(symlink (string-append gfortran "/bin")
(string-append out "/bin")))))
(native-inputs `(("gfortran" ,gfortran)))
(inputs '())
(propagated-inputs '())
......@@ -76,33 +78,50 @@ implicit GCC."
(arguments
(substitute-keyword-arguments (package-arguments starpu)
((#:configure-flags flags '())
`(append (list "--enable-cuda"
"--disable-opencl"
(string-append "--with-cuda-dir="
(assoc-ref %build-inputs "cuda"))
(string-append "--with-cuda-lib-dir="
(assoc-ref %build-inputs "cuda")
"/lib/stubs"))
,flags))
`(append (list "--enable-cuda"
"--disable-opencl"
(string-append "--with-cuda-dir="
(assoc-ref %build-inputs "cuda"))
(string-append "--with-cuda-lib-dir="
(assoc-ref %build-inputs "cuda")
"/lib/stubs"))
,flags))
((#:tests? #f #f)
;; We don't have actual CUDA support (drivers) and GPUs so we cannot
;; run the test suite.
#f)
;; We don't have actual CUDA support (drivers) and GPUs so we cannot
;; run the test suite.
#f)
((#:phases phases '%standard-phases)
`(modify-phases ,phases
(add-before 'configure 'assume-cuda-works
(lambda _
;; The code uses 'AC_RUN_IFELSE' and assumes libcuda.so will
;; be found. This is not true when we are linking against the
;; stubs provided by 'cuda-toolkit': the stubs provide
;; 'libcuda.so' but the SONAME is 'libcuda.so.1.2.3', and that
;; file is *not* provided (it ships with the CUDA driver), so
;; running code does not work.
(substitute* "configure"
(("have_valid_cuda=\"no\"")
"have_valid_cuda=yes"))
#t))))
`(modify-phases ,phases
(add-before 'configure 'assume-cuda-works
(lambda _
;; The code uses 'AC_RUN_IFELSE' and assumes libcuda.so will
;; be found. This is not true when we are linking against the
;; stubs provided by 'cuda-toolkit': the stubs provide
;; 'libcuda.so' but the SONAME is 'libcuda.so.1.2.3', and that
;; file is *not* provided (it ships with the CUDA driver), so
;; running code does not work.
(substitute* "configure"
(("have_valid_cuda=\"no\"")
"have_valid_cuda=yes"))
#t))))
((#:validate-runpath? #f #f)
;; Likewise, RUNPATH validation would fail since libcuda.so.1 is
;; nowhere to be found.
#f)))))
;; Likewise, RUNPATH validation would fail since libcuda.so.1 is
;; nowhere to be found.
#f)))))
(define-public starpu+cuda+fxt
;; When FxT support is enabled, performance is degraded, hence the separate
;; package.
(package
(inherit starpu+cuda)
(name "starpu-cuda-fxt")
(inputs `(("fxt" ,fxt)
,@(package-inputs starpu+cuda)))
(arguments
(substitute-keyword-arguments (package-arguments starpu+cuda)
((#:configure-flags flags '())
`(cons "--with-fxt" ,flags))))
;; some tests require python.
(native-inputs
`(("python-wrapper" ,python-wrapper)
,@(package-native-inputs starpu+cuda)))))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment