gnu: petsc: Upgrade to 3.6.0.

* gnu/packages/maths.scm (petsc): Upgrade to 3.6.0.
* gnu/packages/patches/petsc-fix-threadcomm.patch: Delete patch.
* gnu-system.am (dist_patch_DATA): Remove it.
This commit is contained in:
Eric Bavier 2015-06-16 12:39:42 -05:00
parent cec86422b7
commit 9a899cceab
3 changed files with 10 additions and 32 deletions

View file

@ -545,7 +545,6 @@ dist_patch_DATA = \
gnu/packages/patches/perl-net-ssleay-disable-ede-test.patch \ gnu/packages/patches/perl-net-ssleay-disable-ede-test.patch \
gnu/packages/patches/perl-no-sys-dirs.patch \ gnu/packages/patches/perl-no-sys-dirs.patch \
gnu/packages/patches/perl-tk-x11-discover.patch \ gnu/packages/patches/perl-tk-x11-discover.patch \
gnu/packages/patches/petsc-fix-threadcomm.patch \
gnu/packages/patches/pingus-sdl-libs-config.patch \ gnu/packages/patches/pingus-sdl-libs-config.patch \
gnu/packages/patches/plotutils-libpng-jmpbuf.patch \ gnu/packages/patches/plotutils-libpng-jmpbuf.patch \
gnu/packages/patches/polkit-drop-test.patch \ gnu/packages/patches/polkit-drop-test.patch \

View file

@ -501,7 +501,7 @@ (define-public gmsh
(define-public petsc (define-public petsc
(package (package
(name "petsc") (name "petsc")
(version "3.4.4") (version "3.6.0")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
@ -509,9 +509,7 @@ (define-public petsc
(uri (string-append "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/" (uri (string-append "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/"
"petsc-lite-" version ".tar.gz")) "petsc-lite-" version ".tar.gz"))
(sha256 (sha256
(base32 "0v5dg6dhdjpi5ianvd4mm6hsvxzv1bsxwnh9f9myag0a0d9xk9iv")) (base32 "0lzhk1flgszks1wlhz2b92rnlx5np7bgad8vqy9fcqziz5b4pr26"))))
(patches
(list (search-patch "petsc-fix-threadcomm.patch")))))
(build-system gnu-build-system) (build-system gnu-build-system)
(native-inputs (native-inputs
`(("python" ,python-2) `(("python" ,python-2)
@ -525,7 +523,7 @@ (define-public petsc
)) ))
(arguments (arguments
`(#:test-target "test" `(#:test-target "test"
#:parallel-build? #f #:parallel-build? #f ;build is parallel by default
#:configure-flags #:configure-flags
`("--with-mpi=0" `("--with-mpi=0"
"--with-openmp=1" "--with-openmp=1"
@ -561,26 +559,22 @@ (define-public petsc
(let ((out (assoc-ref outputs "out")) (let ((out (assoc-ref outputs "out"))
(fortran (assoc-ref inputs "gfortran"))) (fortran (assoc-ref inputs "gfortran")))
(substitute* (map (lambda (file) (substitute* (map (lambda (file)
(string-append out "/" file)) (string-append out "/lib/petsc/conf/" file))
'("conf/petscvariables" '("petscvariables" "PETScConfig.cmake"))
"conf/PETScConfig.cmake"))
(((getcwd)) out)) (((getcwd)) out))
;; Make compiler references point to the store ;; Make compiler references point to the store
(substitute* (string-append out "/conf/petscvariables") (substitute* (string-append out "/lib/petsc/conf/petscvariables")
(("= g(cc|\\+\\+|fortran)" _ suffix) (("= g(cc|\\+\\+|fortran)" _ suffix)
(string-append "= " fortran "/bin/g" suffix))) (string-append "= " fortran "/bin/g" suffix)))
;; PETSc installs some build logs, which aren't necessary. ;; PETSc installs some build logs, which aren't necessary.
(for-each (lambda (file) (for-each (lambda (file)
(let ((f (string-append out "/" file))) (let ((f (string-append out "/lib/petsc/conf/" file)))
(when (file-exists? f) (when (file-exists? f)
(delete-file f)))) (delete-file f))))
'("conf/configure.log" '("configure.log" "make.log" "gmake.log"
"conf/make.log" "test.log" "error.log" "RDict.db"
"conf/test.log"
"conf/error.log"
"conf/RDict.db"
;; Once installed, should uninstall with Guix ;; Once installed, should uninstall with Guix
"conf/uninstall.py")))) "uninstall.py"))))
%standard-phases))))) %standard-phases)))))
(home-page "http://www.mcs.anl.gov/petsc") (home-page "http://www.mcs.anl.gov/petsc")
(synopsis "Library to solve PDEs") (synopsis "Library to solve PDEs")

View file

@ -1,15 +0,0 @@
Fix "error: unknown type name 'cpu_set_t'". Patch submitted upstream
http://lists.mcs.anl.gov/pipermail/petsc-dev/2014-May/015345.html
--- a/src/sys/threadcomm/impls/openmp/tcopenmp.c 2014-03-13 21:47:22.000000000 -0500
+++ b/src/sys/threadcomm/impls/openmp/tcopenmp.c 2014-04-02 14:44:57.185170151 -0500
@@ -1,6 +1,9 @@
#define PETSC_DESIRE_FEATURE_TEST_MACROS
#include <../src/sys/threadcomm/impls/openmp/tcopenmpimpl.h>
#include <omp.h>
+#if defined(PETSC_HAVE_SCHED_CPU_SET_T)
+#include <sched.h>
+#endif
PetscErrorCode PetscThreadCommGetRank_OpenMP(PetscInt *trank)
{