Commit b8b8eacb authored by AGULLO Emmanuel's avatar AGULLO Emmanuel
Browse files

Merge branch 'master' of gitlab.inria.fr:guix-hpc/guix-hpc-non-free into master

parents c66d6c11 19df768c
......@@ -42,3 +42,33 @@ chameleon_mkl_mt:
script:
- .channels/guix-hpc/bin/guix describe
- .channels/guix-hpc/bin/guix build -L . chameleon-mkl-mt
mumps_mkl:
stage: build
script:
- .channels/guix-hpc/bin/guix describe
- .channels/guix-hpc/bin/guix build -L . mumps-mkl
mumps_mkl_metis:
stage: build
script:
- .channels/guix-hpc/bin/guix describe
- .channels/guix-hpc/bin/guix build -L . mumps-mkl-metis
mumps_mkl_openmpi:
stage: build
script:
- .channels/guix-hpc/bin/guix describe
- .channels/guix-hpc/bin/guix build -L . mumps-mkl-openmpi
mumps_mkl_metis_openmpi:
stage: build
script:
- .channels/guix-hpc/bin/guix describe
- .channels/guix-hpc/bin/guix build -L . mumps-mkl-metis-openmpi
pastix_5_mkl:
stage: build
script:
- .channels/guix-hpc/bin/guix describe
- .channels/guix-hpc/bin/guix build -L . pastix-5-mkl
......@@ -15,12 +15,10 @@ invite you not to share it widely.
## How does it work?
The package recipes in this repo _extend_ [those that come with
Guix](https://gnu.org/s/guix/packages) and
[Guix-HPC](https://gitlab.inria.fr/guix-hpc/guix-hpc). To make them
visible to the `guix` command-line tools, and assuming you’re using
Guix >= 0.16.0, create a `~/.config/guix/channels.scm` file with the
following snippet:
The package definitions in this repo _extend_ [those that come with
Guix](https://hpc.guix.info/browse). To make them visible to the
`guix` command-line tools, create the `~/.config/guix/channels.scm` file
with the following snippet to request the `guix-hpc` _channel_:
```scheme
(cons (channel
......@@ -30,7 +28,7 @@ following snippet:
```
That way, `guix pull` will systematically pull not only Guix, but also
Guix-HPC.
Guix-HPC-non-free and Guix-HPC.
See [Guix-HPC](https://gitlab.inria.fr/guix-hpc/guix-hpc), for more
information.
......@@ -7,6 +7,7 @@
#:use-module (guix packages)
#:use-module (guix utils)
#:use-module (gnu packages mpi)
#:use-module (gnu packages llvm)
#:use-module (gnu packages maths)
#:use-module (srfi srfi-1)
#:use-module (non-free mkl))
......@@ -17,6 +18,7 @@
(name "mumps-mkl")
(inputs
`(("blas" ,mkl)
("libomp" ,libomp)
,@(alist-delete "openblas" (package-inputs mumps))))
(arguments
(substitute-keyword-arguments
......@@ -55,11 +57,13 @@ SCALAP += -lscalapack~]
LIBOTHERS = -pthread
CDEFS = -DAdd_
PIC = -fPIC
OPTF = -O2 -DALLOW_NON_INIT $(PIC)
OPTL = -O2 $(PIC)
OPTF = -O2 -DALLOW_NON_INIT -DBLR_MT -fopenmp $(PIC)
OPTL = -O2 -fopenmp $(PIC)
OPTC = -O2 $(PIC)
INCS = $(INCSEQ)
LIBS = $(SCALAP) $(LIBSEQ)
OMPDIR = ~a
LIBOMP = -L$(OMPDIR)/lib -lgomp
LIBS = $(SCALAP) $(LIBSEQ) $(LIBOMP)
LPORDDIR = $(topdir)/PORD/lib
IPORD = -I$(topdir)/PORD/include
LPORD = $(LPORDDIR)/libpord.a
......@@ -74,12 +78,13 @@ LSCOTCH = -Wl,-rpath $(SCOTCHDIR)/lib -L$(SCOTCHDIR)/lib ~a-lesmumps
LSCOTCH += -lscotch -lscotcherr
ORDERINGSF += ~a~}~]
ORDERINGSC = $(ORDERINGSF)
LORDERINGS = $(LPORD) $(LMETIS) $(LSCOTCH) $(LIBSEQ)
IORDERINGSF = $(ISCOTCH)
IORDERINGSC = $(IPORD) $(IMETIS) $(ISCOTCH)"
LORDERINGS = $(LPORD) $(LMETIS) $(LSCOTCH) $(LIBSEQ) $(LIBOMP)
IORDERINGSF = $(ISCOTCH) $(LIBOMP)
IORDERINGSC = $(IPORD) $(IMETIS) $(ISCOTCH) $(LIBOMP)"
(assoc-ref inputs "mpi")
(assoc-ref inputs "blas")
(assoc-ref inputs "scalapack")
(assoc-ref inputs "libomp")
(assoc-ref inputs "metis")
(match (list (assoc-ref inputs "pt-scotch")
(assoc-ref inputs "scotch"))
......@@ -91,8 +96,8 @@ IORDERINGSC = $(IPORD) $(IMETIS) $(ISCOTCH)"
`((,ptscotch
"-lptesmumps -lptscotch -lptscotcherr "
"-Dptscotch")))))))))))))
(synopsis "Multifrontal sparse direct solver (using Intel® MKL instead of
OpenBLAS)")))
(synopsis "Multifrontal sparse direct solver (compiled with OpenMP
directives-based multi-threading support and Intel® MKL instead of OpenBLAS)")))
(define-public mumps-mkl-metis
(package
......@@ -121,8 +126,8 @@ OpenBLAS)")))
(lambda _
((assoc-ref ,phases 'check)
#:exec-prefix '("mpirun" "-n" "2"))))))))
(synopsis "Multifrontal sparse direct solver (using Intel® MKL instead of
OpenBLAS and MPI)")))
(synopsis "Multifrontal sparse direct solver (compiled with combined MPI and
OpenMP multi-threading support and Intel® MKL instead of OpenBLAS)")))
(define-public mumps-mkl-metis-openmpi
(package
......
......@@ -3,7 +3,7 @@
;;;
;;; Copyright © 2020 Inria
(define-module (hacky pastix-mkl)
(define-module (hacky pastix-5-mkl)
#:use-module (guix packages)
#:use-module (guix utils)
#:use-module (srfi srfi-1)
......@@ -24,7 +24,7 @@
(#:phases phases)
`(modify-phases ,phases
(replace 'configure
(lambda _
(lambda* (#:key inputs #:allow-other-keys)
(call-with-output-file "config.in"
(lambda (port)
(format port "
......@@ -33,12 +33,12 @@ VERSIONBIT = _32bit
EXEEXT =
OBJEXT = .o
LIBEXT = .a
CCPROG = gcc -Wall
CFPROG = gfortran
CF90PROG = gfortran -ffree-form
CXXPROG = g++
CCPROG = gcc -Wall -g
CFPROG = gfortran -g
CF90PROG = gfortran -ffree-form -g
CXXPROG = g++ -g
MCFPROG = mpif90
MCFPROG = mpif90 -g
CF90CCPOPT = -ffree-form -x f95-cpp-input
# Compilation options for optimization (make expor)
CCFOPT = -O3
......@@ -136,7 +136,7 @@ CCTYPESFLT := $(CCTYPESFLT) -DTYPE_COMPLEX
# Uncomment the following line if your MPI doesn't support MPI_THREAD_MULTIPLE,
# level then use IPARM_THREAD_COMM_MODE
CCPASTIX := $(CCPASTIX) -DPASTIX_FUNNELED
#CCPASTIX := $(CCPASTIX) -DPASTIX_FUNNELED
# Uncomment the following line if your MPI doesn't support MPI_Datatype
# correctly
......@@ -172,7 +172,7 @@ NVCCOPT := $(NVCCOPT) -arch sm_20
CCPASTIX := $(CCPASTIX) -DMEMORY_USAGE
# Show memory usage statistics in solver
CCPASTIX := $(CCPASTIX) -DSTATS_SOPALIN
#CCPASTIX := $(CCPASTIX) -DSTATS_SOPALIN
# Uncomment following line for dynamic thread scheduling support
#CCPASTIX := $(CCPASTIX) -DPASTIX_DYNSCHED
......@@ -191,9 +191,9 @@ CCPASTIX := $(CCPASTIX) -DSTATS_SOPALIN
#EXTRALIB := $(EXTRALIB) -L$(METIS_HOME) -lmetis
# Scotch always needed to compile
SCOTCH_HOME ?= ${HOME}/scotch_5.1/
SCOTCH_INC ?= $(SCOTCH_HOME)/include
SCOTCH_LIB ?= $(SCOTCH_HOME)/lib
SCOTCH_HOME = ~a
SCOTCH_INC ?= $(SCOTCH_HOME)/include
SCOTCH_LIB ?= $(SCOTCH_HOME)/lib
# Uncomment on of this blocks
#scotch
CCPASTIX := $(CCPASTIX) -I$(SCOTCH_INC) -DWITH_SCOTCH
......@@ -210,7 +210,7 @@ EXTRALIB := $(EXTRALIB) -L$(SCOTCH_LIB) -lscotch -lscotcherrexit
###################################################################
# By default PaStiX uses hwloc to bind threads,
# comment this lines if you don't want it (not recommended)
HWLOC_HOME ?= /opt/hwloc/
HWLOC_HOME = ~a
HWLOC_INC ?= $(HWLOC_HOME)/include
HWLOC_LIB ?= $(HWLOC_HOME)/lib
CCPASTIX := $(CCPASTIX) -I$(HWLOC_INC) -DWITH_HWLOC
......@@ -245,8 +245,8 @@ EXTRALIB := $(EXTRALIB) -lpthread
#---- Gotoblas ----
#BLASLIB = -L${BLAS_HOME} -lgoto
#---- MKL ----
BLASLIB = -L${MKLROOT}/lib/intel64 -Wl,--no-as-needed -lmkl_intel_lp64
BLASLIB += -lmkl_gnu_thread -lmkl_core -lgomp -lpthread -lm -ldl
BLASLIB = -L~a/lib -Wl,--no-as-needed -lmkl_intel_lp64 -lmkl_gnu_thread
BLASLIB += -lmkl_core -lgomp -lpthread -lm -ldl
#---- Acml ----
#BLASLIB = -L$(BLAS_HOME) -lacml
......@@ -281,6 +281,9 @@ FFLAGS = $(CCFOPT)
LDFLAGS = $(EXTRALIB) $(BLASLIB)
CTAGS = $(CTAGSPROG)
"
(assoc-ref inputs "scotch32")
(assoc-ref inputs "hwloc")
(assoc-ref inputs "mkl")
))) #t))))))
(synopsis "Sparse matrix direct solver (using Intel® MKL instead of
OpenBLAS)")))
......@@ -74,7 +74,7 @@
(inputs `(("openblas" ,openblas)
("perl" ,perl)
;; ("scotch" ,pt-scotch)
("scotch" ,scotch)
("scotch32" ,scotch32)
("ssh" ,openssh)
("metis" ,metis)
("starpu" ,starpu)))
......
;;; This module extends GNU Guix and is licensed under the same terms, those
;;; of the GNU GPL version 3 or (at your option) any later version.
;;;
;;; Copyright © 2020 Inria
(define-module (inria hou10ni)
#:use-module (guix)
#:use-module (guix git) ;for 'git-checkout'
#:use-module (guix git-download)
#:use-module (guix build-system cmake)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (inria mpi)
#:use-module (gnu packages algebra)
#:use-module (gnu packages gcc)
#:use-module (gnu packages maths)
#:use-module (inria hiepacs)
#:use-module (inria storm)
#:use-module (gnu packages linux)
#:use-module (gnu packages ssh)
#:use-module (gnu packages mpi)
#:use-module (gnu packages fabric-management))
(define-public hou10ni
(let ((commit "f12d26f704e6be0b17c2e144021eef4edba6dc1d")
(revision "0"))
(package
(name "hou10ni")
(version "0.5")
(home-page "git@gitlab.inria.fr:hou10ni/hou10ni2d.git")
;; This will clone the repository over SSH on the client side, provided
;; you have permissions to do so.license:bsd-3
(source (git-checkout
(url "git@gitlab.inria.fr:hou10ni/hou10ni2d.git")
(commit commit)))
(build-system cmake-build-system)
(arguments
`(#:phases (modify-phases %standard-phases
(add-after 'build 'mpi-setup
;; Set the test environment for Open MPI.
,%openmpi-setup))
#:tests? #f
#:build-type "Release")) ;FIXME
(native-inputs
`(("gfortran" ,gfortran)))
(inputs
`(("mumps-openmpi" ,mumps-openmpi)
("metis" ,metis)
("openblas" ,openblas)
("maphys", maphys)
("pastix", pastix)
("starpu", starpu)
("scalapack" ,scalapack)
("pt-scotch" ,pt-scotch)
("scotch" ,scotch)
("openmpi" ,openmpi)
("openssh" ,openssh)
("arb" ,arb)))
(synopsis "Hou10ni")
(description
"hou10ni is a DG wave propagation simulating library ")
(license #f))))
......@@ -67,12 +67,8 @@ implicit GCC."
(package
(inherit starpu)
(name "starpu-cuda")
;; "host_config.h" in 'cuda-toolkit' says "gcc versions later than 5 are
;; not supported". Thus, provide GCC 5.x.
(build-system (gnu-build-system-with-compiler gcc-5))
(native-inputs
`(("no-float128" ,no-float128)
("gfortran" ,gfortran-sans-libstdc++)
`(("gfortran" ,gfortran-sans-libstdc++)
,@(alist-delete "gfortran" (package-native-inputs starpu))))
(inputs
`(("cuda" ,cuda)
......@@ -81,6 +77,7 @@ implicit GCC."
(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="
......
......@@ -6,7 +6,7 @@
;;; are detrimental to user freedom and to proper scientific review and
;;; experimentation. As such, we kindly invite you not to share it.
;;;
;;; Copyright © 2018, 2019 Inria
;;; Copyright © 2018, 2019, 2020 Inria
(define-module (non-free cuda)
#:use-module (guix)
......@@ -126,6 +126,8 @@ libraries for NVIDIA GPUs, all of which are proprietary.")
(supported-systems '("x86_64-linux"))))
(define-syntax-rule (cuda-source url hash)
;; Visit
;; <https://developer.nvidia.com/cuda-10.2-download-archive?target_os=Linux&target_arch=x86_64&target_distro=Fedora&target_version=29&target_type=runfilelocal> or similar to get the actual URL.
(origin
(uri url)
(sha256 (base32 hash))
......@@ -137,9 +139,109 @@ libraries for NVIDIA GPUs, all of which are proprietary.")
"https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda_8.0.61_375.26_linux-run"
"1i4xrsqbad283qffvysn88w2pmxzxbbby41lw0j1113z771akv4w")))
(define-public cuda-11.0
(package
(inherit cuda-8.0)
(version "11.0.3")
(source
(cuda-source
"https://developer.download.nvidia.com/compute/cuda/11.0.3/local_installers/cuda_11.0.3_450.51.06_linux.run"
"1h4c69nfrgm09jzv8xjnjcvpq8n4gnlii17v3wzqry5d13jc8ydh"))
(outputs '("out")) ;XXX: no documentation for now
(arguments
(substitute-keyword-arguments (package-arguments cuda-8.0)
((#:modules modules)
`((guix build utils)
(guix build gnu-build-system)
(ice-9 match)
(ice-9 ftw))) ;for 'scandir'
((#:phases phases)
`(modify-phases ,phases
(replace 'unpack
(lambda* (#:key inputs #:allow-other-keys)
(define libc
(assoc-ref inputs "libc"))
(define ld.so
(string-append libc ,(glibc-dynamic-linker)))
(let ((source (assoc-ref inputs "source")))
(invoke "sh" source "--keep" "--noexec")
(chdir "pkg")
#t)))
(add-after 'unpack 'remove-superfluous-stuff
(lambda _
;; Remove things we have no use for.
(with-directory-excursion "builds"
(for-each delete-file-recursively
'("nsight_compute" "nsight_systems" "cuda_gdb")))
#t))
(replace 'install
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(define (copy-from-directory directory)
(for-each (lambda (entry)
(define sub-directory
(string-append directory "/" entry))
(define target
(string-append out "/" (basename entry)))
(when (file-exists? sub-directory)
(copy-recursively sub-directory target)))
'("bin" "targets/x86_64-linux/lib"
"targets/x86_64-linux/include"
"nvvm/bin" "nvvm/include"
"nvvm/lib64")))
(setenv "COLUMNS" "200") ;wide backtraces!
(with-directory-excursion "builds"
(for-each copy-from-directory
(scandir "." (match-lambda
((or "." "..") #f)
(_ #t))))
;; 'cicc' needs that directory.
(copy-recursively "cuda_nvcc/nvvm/libdevice"
(string-append out "/nvvm/libdevice")))
#t)))
;; XXX: No documentation for now.
(delete 'move-documentation)))))
(native-inputs
`(("which" ,which)
,@(package-native-inputs cuda-8.0)))))
(define-public cuda-10.2
(package
(inherit cuda-11.0)
(version "10.2.89")
(source
(cuda-source
"https://developer.download.nvidia.com/compute/cuda/10.2/Prod/local_installers/cuda_10.2.89_440.33.01_linux.run"
"04fasl9sjkb1jvchvqgaqxprnprcz7a8r52249zp2ijarzyhf3an"))
(arguments
(substitute-keyword-arguments (package-arguments cuda-11.0)
((#:phases phases)
`(modify-phases ,phases
;; This phase doesn't work as is for 10.2.
(delete 'remove-superfluous-stuff)
(add-after 'install 'really-install-libdevice
(lambda* (#:key outputs #:allow-other-keys)
;; XXX: The 'install' phase of CUDA 11.0 looks for libdevice
;; in a location that's different from that of libdevice in
;; CUDA 10. Copy it from the right place here.
(let ((out (assoc-ref outputs "out")))
;; 'cicc' needs that directory.
(copy-recursively "builds/cuda-toolkit/nvvm/libdevice/"
(string-append out "/nvvm/libdevice"))
#t)))))))))
(define-public cuda
;; Default version.
cuda-8.0)
;;
;; Note: Pick a version that matches the actual "driver"--i.e.,
;; /usr/lib64/libcuda.so available on the target machine.
cuda-10.2)
(define-public no-float128
;; FIXME: We cannot simply add it to 'propagated-inputs' of cuda-toolkit
......@@ -171,7 +273,7 @@ libraries for NVIDIA GPUs, all of which are proprietary.")
(description
"This package provides a @file{<bits/floatn.h>} header to override that
of glibc and disable float128 support. This is required allow the use of
@command{nvcc} with glibc 2.26+. Otherwise, @command{nvcc} fails like this:
@command{nvcc} with CUDA 8.0 and glibc 2.26+. Otherwise, @command{nvcc} fails like this:
@example
/gnu/store/…-glibc-2.26.105-g0890d5379c/include/bits/floatn.h(61): error: invalid argument to attribute \"__mode__\"
......
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