From patchwork Thu Jan 24 06:16:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eric Bavier X-Patchwork-Id: 803 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id A631116AA2; Thu, 24 Jan 2019 06:18:11 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,MIME_QP_LONG_LINE, T_DKIM_INVALID,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 0E55716A9C for ; Thu, 24 Jan 2019 06:18:11 +0000 (GMT) Received: from localhost ([127.0.0.1]:47951 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gmYL4-0004HF-FL for patchwork@mira.cbaines.net; Thu, 24 Jan 2019 01:18:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51873) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gmYL0-0004Gx-Tv for guix-patches@gnu.org; Thu, 24 Jan 2019 01:18:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gmYKy-0002JH-Rd for guix-patches@gnu.org; Thu, 24 Jan 2019 01:18:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:43965) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gmYKw-0001rv-Tk for guix-patches@gnu.org; Thu, 24 Jan 2019 01:18:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gmYKw-0001Fm-DE for guix-patches@gnu.org; Thu, 24 Jan 2019 01:18:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#34188] [PATCH] gnu: Add ELPA. Resent-From: ericbavier@centurylink.net Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 24 Jan 2019 06:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 34188 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 34188@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15483106504774 (code B ref -1); Thu, 24 Jan 2019 06:18:02 +0000 Received: (at submit) by debbugs.gnu.org; 24 Jan 2019 06:17:30 +0000 Received: from localhost ([127.0.0.1]:43246 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gmYKI-0001Ep-8w for submit@debbugs.gnu.org; Thu, 24 Jan 2019 01:17:29 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41479) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gmYKC-0001EX-On for submit@debbugs.gnu.org; Thu, 24 Jan 2019 01:17:21 -0500 Received: from lists.gnu.org ([209.51.188.17]:32930) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gmYK7-0000H7-Lq for submit@debbugs.gnu.org; Thu, 24 Jan 2019 01:17:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51678) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gmYK6-0003t8-9r for guix-patches@gnu.org; Thu, 24 Jan 2019 01:17:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gmYK5-0000C5-69 for guix-patches@gnu.org; Thu, 24 Jan 2019 01:17:10 -0500 Received: from mail.onyx.syn-alias.com ([206.152.134.66]:6566 helo=smtp.centurylink.net) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gmYK4-0000AX-UI for guix-patches@gnu.org; Thu, 24 Jan 2019 01:17:09 -0500 DKIM-Signature: v=1; a=rsa-sha1; d=centurylink.net; s=ctl201402; c=relaxed/simple; q=dns/txt; i=@centurylink.net; t=1548310627; h=From:Subject:Date:To:MIME-Version:Content-Type; bh=KA1i5gt5NFyF1cctZ/t8e98vMnA=; b=hhw7yqkjjFi7B5mfNIpGiRH8bDsiKIvHDGko6uegqScfLGLoUZQFeU4GIr1Q68/W VVaq4Tj0t8WxuEIWNphLAyVbL76nxO7sj8sofboJjs1j3nita21bChMn9+m5BIly OO4+iq2DGLEX/BAHQDKp5rFb7H2WXRM0bqgdGU5jHsqKrpsdUX/o3/UMC+4HheGo sBFhgoMpHKUxyip6wyU0BZ7tHbDkgy5jTUoi/uaVkjCZ1Vqw/oqIr0TCxt/PwdtT GdZOdGRs2xScuHjDZI+3E5bNqzJ0J/6WDSR5OwWXBnDbcoi7iHkKDf4p4sBU7zAH +lg84R34hkBgdBjgHRAgWA==; X_CMAE_Category: , , X-CNFS-Analysis: v=2.3 cv=a6xOCnaF c=1 sm=1 tr=0 a=c4ELDkRixJ9967ke8+/osA==:117 a=c4ELDkRixJ9967ke8+/osA==:17 a=KGjhK52YXX0A:10 a=IkcTkHD0fZMA:10 a=3JhidrIBZZsA:10 a=zSv6zi-ZgakA:10 a=kBl-OI3rAAAA:8 a=yU6rqDt0AAAA:8 a=mDV3o1hIAAAA:8 a=inoG4m36AAAA:8 a=s_ZvC2PqAAAA:8 a=1cBlP2KbAAAA:8 a=pbPJX3KNAAAA:8 a=iOHvl7tRDmguC344YFwA:9 a=RXSRFsg2RaSU1_SU:21 a=yag2IG2bDIyIYcrZ:21 a=QEXdDO2ut3YA:10 a=pLxN2xGgR0OPbCgNAGn6:22 a=h6dAC4_YNblXK2NANfBP:22 a=_FVE-zBwftR9WsbkzFJk:22 a=_Qgj-RFg6mImvLaOgLPg:22 a=aFptD_jymfZPbHTSTAos:22 a=sVIR2NZf5ZpJ0KoDd6yV:22 a=oq68ferKVpmdzqj7Fr_q:22 X-CM-Score: 0 X-Scanned-by: Cloudmark Authority Engine X-Authed-Username: ZXJpY2JhdmllckBjZW50dXJ5bGluay5uZXQ= Authentication-Results: smtp02.onyx.dfw.sync.lan smtp.user=ericbavier@centurylink.net; auth=pass (LOGIN) Received: from [97.116.99.100] ([97.116.99.100:42348] helo=localhost.localdomain) by smtp.centurylink.net (envelope-from ) (ecelerity 3.6.25.56547 r(Core:3.6.25.0)) with ESMTPSA (cipher=DHE-RSA-AES128-GCM-SHA256) id EA/E4-04383-268594C5; Thu, 24 Jan 2019 01:17:06 -0500 From: ericbavier@centurylink.net Date: Thu, 24 Jan 2019 00:16:49 -0600 Message-Id: <20190124061649.3896-1-ericbavier@centurylink.net> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eric Bavier Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches From: Eric Bavier * gnu/packages/maths.scm (elpa, elpa-openmpi): New variables. --- gnu/packages/maths.scm | 86 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 85 insertions(+), 1 deletion(-) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 2f52b4a0ff..5dff1c4d0a 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge ;;; Copyright © 2013 Nikita Karetnikov ;;; Copyright © 2014, 2016, 2017 John Darrington -;;; Copyright © 2014, 2015, 2016, 2017, 2018 Eric Bavier +;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Eric Bavier ;;; Copyright © 2014 Federico Beffa ;;; Copyright © 2014 Mathieu Lirzin ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus @@ -3990,6 +3990,90 @@ as equations, scalars, vectors, and matrices.") theories} (SMT) solver. It provides a C/C++ API, as well as Python bindings.") (license license:expat))) +(define-public elpa + (package + (name "elpa") + (version "2018.11.001") + (source (origin + (method url-fetch) + (uri (string-append "http://elpa.mpcdf.mpg.de/html/Releases/" + version "/elpa-" version ".tar.gz")) + (sha256 + (base32 + "05hv3v5i6xmziaizw350ff72y1c3k662r85fm3xfdrkclj5zw9yc")))) + (build-system gnu-build-system) + (native-inputs + `(("fortran" ,gfortran) + ("perl" ,perl))) ;for configure and deps + (inputs + `(("blas" ,openblas))) + (arguments + `(#:configure-flags + `(;"--enable-openmp" + "--with-mpi=no" + ;; ELPA unfortunately does not support runtime dispatch, so we can + ;; only enable the "generic" kernels. See the "Cross compilation" + ;; section of INSTALL.md. + "--enable-generic" + "--disable-sse" "--disable-sse-assembly" ;Require SSE3 + "--disable-avx" "--disable-avx2" "--disable-avx512" + ,(string-append "CFLAGS=-O3 " + "-funsafe-loop-optimizations -funsafe-math-optimizations " + "-ftree-vect-loop-version -ftree-vectorize " + ,(let ((system (or (%current-target-system) + (%current-system)))) + (cond + ((or (string-prefix? "x86_64" system) + (string-prefix? "i686" system)) + "-msse2") + (else ""))))) + #:parallel-tests? #f ;tests are multi-threaded, via BLAS + #:phases + (modify-phases %standard-phases + (add-before 'configure 'patch-header-generation + (lambda _ + (substitute* "configure" + (("^ *make.*top_srcdir=\"\\$srcdir\"" &) + (string-append & " CPP=\"$CPP\""))) + #t)) + (add-before 'check 'setup-tests + (lambda _ + ;; Decrease test time and RAM use by computing fewer eigenvalues. + ;; The flags are (MATRIX-SIZE, EIGENVALUES, BLOCK-SIZE), where + ;; the default is (500, 250, 16) for C tests and (5000, 150, 16) + ;; for Fortran. This also causes several tests to pass that + ;; otherwise would otherwise fail with matrix size 5000; possibly + ;; due to floating point tolerances that are too tight. + (setenv "TEST_FLAGS" "1500 50 16") ;from elpa.spec + (setenv "OMP_NUM_THREADS" (number->string (parallel-job-count))) + (substitute* "Makefile" + ;; Test scripts are generated, patch the shebang + (("#!/bin/bash") (string-append "#!" (which "sh")))) + #t))))) + (home-page "http://elpa.mpcdf.mpg.de") + (synopsis "Eigenvalue solvers for symmetric matrices") + (description + "The ELPA library provides efficient and scalable direct eigensolvers for +symmetric matrices.") + (license license:lgpl3))) + +(define-public elpa-openmpi + (package (inherit elpa) + (name "elpa-openmpi") + (inputs + `(("mpi" ,openmpi) + ("scalapack" ,scalapack) + ,@(package-inputs elpa))) + (arguments + (substitute-keyword-arguments (package-arguments elpa) + ((#:configure-flags cf '()) + `(cons "--with-mpi=yes" (delete "--with-mpi=no" ,cf))) + ((#:phases phases '%standard-phases) + `(modify-phases ,phases + (add-before 'check 'mpi-setup + ,%openmpi-setup))))) ;XXX: Need to adjust OMP_NUM_THREADS? + (synopsis "Eigenvalue solvers for symmetric matrices (with MPI support)"))) + (define-public elemental (package (name "elemental")