From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- sci-libs/superlu_mt/Manifest | 4 + .../files/superlu_mt-3.1-duplicate-symbols.patch | 240 +++++++++++++++++++++ sci-libs/superlu_mt/metadata.xml | 29 +++ sci-libs/superlu_mt/superlu_mt-3.1.ebuild | 102 +++++++++ 4 files changed, 375 insertions(+) create mode 100644 sci-libs/superlu_mt/Manifest create mode 100644 sci-libs/superlu_mt/files/superlu_mt-3.1-duplicate-symbols.patch create mode 100644 sci-libs/superlu_mt/metadata.xml create mode 100644 sci-libs/superlu_mt/superlu_mt-3.1.ebuild (limited to 'sci-libs/superlu_mt') diff --git a/sci-libs/superlu_mt/Manifest b/sci-libs/superlu_mt/Manifest new file mode 100644 index 000000000000..040ef8c443ce --- /dev/null +++ b/sci-libs/superlu_mt/Manifest @@ -0,0 +1,4 @@ +AUX superlu_mt-3.1-duplicate-symbols.patch 7284 SHA256 d10bdc176b68d6903feea629fbe1d919c8a68261375f4b6b62644c7d86070a12 SHA512 b233677071ce175116454614b6289faa80f60ef0dfeee728bc4a1a7603ce8490c93e63ba635d1db231c92a055dee5cdbeff2793a2e138fa688efc18bd72b693f WHIRLPOOL c2297c1a25743db2acadb27a7f25062d79750e35fc7a83be4f2ff9c2a3a534f4c4d924cb37920d1c16abf071b5d364f4c6f33beb19e20a799bd23dbc0e77f25b +DIST superlu_mt_3.1.tar.gz 1824440 SHA256 407b544b9a92b2ed536b1e713e80f986824cf3016657a4bfc2f3e7d2a76ecab6 SHA512 41b8d9808f6a9c3f8d9e983ab253b0c5aec486df1cc419d043a201bd950034fa4bdd5465410e1198a2314d072b92cb388fc117165a06f820922f04060c755971 WHIRLPOOL 4ab6ec9dc9080d6bbd0096514794d0e4c2fcf31a1a7d85865516c3afc028d693baafd06967f777d336e34668678bd8aa390680b742abccbca1f347fffe08d3c5 +EBUILD superlu_mt-3.1.ebuild 2548 SHA256 bb044fd8b0feb83b65a329a12b674b90a2e9ec8ca297c0e397c2fb949b57f7e1 SHA512 ebd183c356861a83f06dc487ca404809cc1546a4bd9341fdebcc03d4fd502dea20da72ee1f0c33ea0a407e432e75a733ac68fa4ea38ab9f41c0b49317af87b04 WHIRLPOOL 2594e14db169123f980342969d2a4ee090ad2e6bccc1a7e61768b7ebe5f48813af4ec86cebe7f216efcb8f06e06322e29d14822aa8cec9b1c92307c4596f98ad +MISC metadata.xml 1471 SHA256 d2ee8efd522809012cb3b43fac28f61ab567d9c2b76d2b473e2445173590fcdb SHA512 1f4ab676f807e3211c894cd5ae692987c419937a0f0aa2bae46b72d029ad843f3d4415ee9ce3876b6d19e8446e3d6c5085b1671f0b7b73329696d9c231540e76 WHIRLPOOL 7bf9e3f6209bf461db0f4c18053c4f2460e7274c5ba0fc684dbcc12c32d9c72caf45ebb84b64f2dbedda8031baf4fc8599e1526d427b2d4ec155f88bea61afe7 diff --git a/sci-libs/superlu_mt/files/superlu_mt-3.1-duplicate-symbols.patch b/sci-libs/superlu_mt/files/superlu_mt-3.1-duplicate-symbols.patch new file mode 100644 index 000000000000..cc82c2692b5c --- /dev/null +++ b/sci-libs/superlu_mt/files/superlu_mt-3.1-duplicate-symbols.patch @@ -0,0 +1,240 @@ +--- a/SRC/smatgen.c 2016-12-28 01:06:35.529467943 +0000 ++++ b/SRC/smatgen.c 2016-12-28 01:06:06.949710330 +0000 +@@ -102,77 +102,3 @@ + + xa[n] = lasta; + } +- +-double dlaran_(int *iseed) +-{ +-/* -- LAPACK auxiliary routine (version 2.0) -- +- Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., +- Courant Institute, Argonne National Lab, and Rice University +- February 29, 1992 +- +- Purpose +- ======= +- +- DLARAN returns a random real number from a uniform (0,1) +- distribution. +- +- Arguments +- ========= +- +- ISEED (input/output) INT array, dimension (4) +- On entry, the seed of the random number generator; the array +- +- elements must be between 0 and 4095, and ISEED(4) must be +- odd. +- On exit, the seed is updated. +- +- Further Details +- =============== +- +- This routine uses a multiplicative congruential method with modulus +- 2**48 and multiplier 33952834046453 (see G.S.Fishman, +- 'Multiplicative congruential random number generators with modulus +- 2**b: an exhaustive analysis for b = 32 and a partial analysis for +- b = 48', Math. Comp. 189, pp 331-344, 1990). +- +- 48-bit integers are stored in 4 integer array elements with 12 bits +- per element. Hence the routine is portable across machines with +- integers of 32 bits or more. +- +- ===================================================================== +-*/ +- +- /* Local variables */ +- int it1, it2, it3, it4; +- +- --iseed; +- +- /* multiply the seed by the multiplier modulo 2**48 */ +- it4 = iseed[4] * 2549; +- it3 = it4 / 4096; +- it4 -= it3 << 12; +- it3 = it3 + iseed[3] * 2549 + iseed[4] * 2508; +- it2 = it3 / 4096; +- it3 -= it2 << 12; +- it2 = it2 + iseed[2] * 2549 + iseed[3] * 2508 + iseed[4] * 322; +- it1 = it2 / 4096; +- it2 -= it1 << 12; +- it1 = it1 + iseed[1] * 2549 + iseed[2] * 2508 + iseed[3] * 322 + iseed[4] +- * 494; +- it1 %= 4096; +- +- /* return updated seed */ +- +- iseed[1] = it1; +- iseed[2] = it2; +- iseed[3] = it3; +- iseed[4] = it4; +- +- /* convert 48-bit integer to a real number in the interval (0,1) */ +- +- return ((double) it1 + +- ((double) it2 + ((double) it3 + (double) it4 * 2.44140625e-4) * +- 2.44140625e-4) * 2.44140625e-4) * 2.44140625e-4; +- +-} /* dlaran_ */ +- +--- a/SRC/zmatgen.c 2016-12-28 01:07:05.819211056 +0000 ++++ b/SRC/zmatgen.c 2016-12-28 01:07:26.329037112 +0000 +@@ -102,77 +102,3 @@ + + xa[n] = lasta; + } +- +-double dlaran_(int *iseed) +-{ +-/* -- LAPACK auxiliary routine (version 2.0) -- +- Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., +- Courant Institute, Argonne National Lab, and Rice University +- February 29, 1992 +- +- Purpose +- ======= +- +- DLARAN returns a random real number from a uniform (0,1) +- distribution. +- +- Arguments +- ========= +- +- ISEED (input/output) INT array, dimension (4) +- On entry, the seed of the random number generator; the array +- +- elements must be between 0 and 4095, and ISEED(4) must be +- odd. +- On exit, the seed is updated. +- +- Further Details +- =============== +- +- This routine uses a multiplicative congruential method with modulus +- 2**48 and multiplier 33952834046453 (see G.S.Fishman, +- 'Multiplicative congruential random number generators with modulus +- 2**b: an exhaustive analysis for b = 32 and a partial analysis for +- b = 48', Math. Comp. 189, pp 331-344, 1990). +- +- 48-bit integers are stored in 4 integer array elements with 12 bits +- per element. Hence the routine is portable across machines with +- integers of 32 bits or more. +- +- ===================================================================== +-*/ +- +- /* Local variables */ +- int it1, it2, it3, it4; +- +- --iseed; +- +- /* multiply the seed by the multiplier modulo 2**48 */ +- it4 = iseed[4] * 2549; +- it3 = it4 / 4096; +- it4 -= it3 << 12; +- it3 = it3 + iseed[3] * 2549 + iseed[4] * 2508; +- it2 = it3 / 4096; +- it3 -= it2 << 12; +- it2 = it2 + iseed[2] * 2549 + iseed[3] * 2508 + iseed[4] * 322; +- it1 = it2 / 4096; +- it2 -= it1 << 12; +- it1 = it1 + iseed[1] * 2549 + iseed[2] * 2508 + iseed[3] * 322 + iseed[4] +- * 494; +- it1 %= 4096; +- +- /* return updated seed */ +- +- iseed[1] = it1; +- iseed[2] = it2; +- iseed[3] = it3; +- iseed[4] = it4; +- +- /* convert 48-bit integer to a real number in the interval (0,1) */ +- +- return ((double) it1 + +- ((double) it2 + ((double) it3 + (double) it4 * 2.44140625e-4) * +- 2.44140625e-4) * 2.44140625e-4) * 2.44140625e-4; +- +-} /* dlaran_ */ +- +--- a/SRC/cmatgen.c 2016-12-28 00:57:45.513963020 +0000 ++++ b/SRC/cmatgen.c 2016-12-28 00:58:46.413446529 +0000 +@@ -102,77 +102,3 @@ + + xa[n] = lasta; + } +- +-double dlaran_(int *iseed) +-{ +-/* -- LAPACK auxiliary routine (version 2.0) -- +- Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., +- Courant Institute, Argonne National Lab, and Rice University +- February 29, 1992 +- +- Purpose +- ======= +- +- DLARAN returns a random real number from a uniform (0,1) +- distribution. +- +- Arguments +- ========= +- +- ISEED (input/output) INT array, dimension (4) +- On entry, the seed of the random number generator; the array +- +- elements must be between 0 and 4095, and ISEED(4) must be +- odd. +- On exit, the seed is updated. +- +- Further Details +- =============== +- +- This routine uses a multiplicative congruential method with modulus +- 2**48 and multiplier 33952834046453 (see G.S.Fishman, +- 'Multiplicative congruential random number generators with modulus +- 2**b: an exhaustive analysis for b = 32 and a partial analysis for +- b = 48', Math. Comp. 189, pp 331-344, 1990). +- +- 48-bit integers are stored in 4 integer array elements with 12 bits +- per element. Hence the routine is portable across machines with +- integers of 32 bits or more. +- +- ===================================================================== +-*/ +- +- /* Local variables */ +- int it1, it2, it3, it4; +- +- --iseed; +- +- /* multiply the seed by the multiplier modulo 2**48 */ +- it4 = iseed[4] * 2549; +- it3 = it4 / 4096; +- it4 -= it3 << 12; +- it3 = it3 + iseed[3] * 2549 + iseed[4] * 2508; +- it2 = it3 / 4096; +- it3 -= it2 << 12; +- it2 = it2 + iseed[2] * 2549 + iseed[3] * 2508 + iseed[4] * 322; +- it1 = it2 / 4096; +- it2 -= it1 << 12; +- it1 = it1 + iseed[1] * 2549 + iseed[2] * 2508 + iseed[3] * 322 + iseed[4] +- * 494; +- it1 %= 4096; +- +- /* return updated seed */ +- +- iseed[1] = it1; +- iseed[2] = it2; +- iseed[3] = it3; +- iseed[4] = it4; +- +- /* convert 48-bit integer to a real number in the interval (0,1) */ +- +- return ((double) it1 + +- ((double) it2 + ((double) it3 + (double) it4 * 2.44140625e-4) * +- 2.44140625e-4) * 2.44140625e-4) * 2.44140625e-4; +- +-} /* dlaran_ */ +- diff --git a/sci-libs/superlu_mt/metadata.xml b/sci-libs/superlu_mt/metadata.xml new file mode 100644 index 000000000000..5e07f8c182bc --- /dev/null +++ b/sci-libs/superlu_mt/metadata.xml @@ -0,0 +1,29 @@ + + + + + sci@gentoo.org + Gentoo Science Project + + + SuperLU is a general purpose library for the direct solution of + large, sparse, nonsymmetric systems of linear equations on high + performance machines. The library is written in C and is callable + from either C or Fortran. The library routines will perform an LU + decomposition with partial pivoting and triangular system solves + through forward and back substitution. The LU factorization routines + can handle non-square matrices but the triangular solves are + performed only for square matrices. The matrix columns may be + preordered (before factorization) either through library or user + supplied routines. This preordering for sparsity is completely + separate from the factorization. Working precision iterative + refinement subroutines are provided for improved backward + stability. Routines are also provided to equilibrate the system, + estimate the condition number, calculate the relative backward + error, and estimate error bounds for the refined solutions. + This is the multi-threaded version (POSIX threads or OpenMP). + + + Build the 64 bits integer library + + diff --git a/sci-libs/superlu_mt/superlu_mt-3.1.ebuild b/sci-libs/superlu_mt/superlu_mt-3.1.ebuild new file mode 100644 index 000000000000..2322df8507e6 --- /dev/null +++ b/sci-libs/superlu_mt/superlu_mt-3.1.ebuild @@ -0,0 +1,102 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit eutils toolchain-funcs versionator + +MYPN=SuperLU_MT +SOVERSION=$(get_major_version) + +DESCRIPTION="Multithreaded sparse LU factorization library" +HOMEPAGE="http://crd.lbl.gov/~xiaoye/SuperLU/" +SRC_URI="${HOMEPAGE}/${PN}_${PV}.tar.gz" + +LICENSE="BSD" +SLOT="0/${SOVERSION}" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" +IUSE="doc examples int64 openmp static-libs test threads" +REQUIRED_USE="|| ( openmp threads )" + +RDEPEND="virtual/blas" +DEPEND="${RDEPEND} + virtual/pkgconfig + test? ( app-shells/tcsh )" + +S="${WORKDIR}/${MYPN}_${PV}" + +PATCHES=( "${FILESDIR}"/${P}-duplicate-symbols.patch ) + +pkg_setup() { + if use openmp && ! use threads; then + if [[ $(tc-getCC) == *gcc ]] && ! tc-has-openmp; then + ewarn "OpenMP is not available in your current selected gcc" + die "need openmp capable gcc" + fi + CTHREADS="-D__OPENMP" + [[ $(tc-getCC) == *gcc ]] && LDTHREADS="-fopenmp" + else + CTHREADS="-D__PTHREAD" + LDTHREADS="-pthread" + fi +} + +src_prepare() { + default + cat <<-EOF > make.inc + CC=$(tc-getCC) + LOADER=$(tc-getCC) + ARCH=$(tc-getAR) + RANLIB=$(tc-getRANLIB) + PREDEFS=${CPPFLAGS} -DUSE_VENDOR_BLAS -DPRNTlevel=0 -DDEBUGlevel=0 $(use int64 && echo -D_LONGINT) + CDEFS=-DAdd_ + CFLAGS=${CFLAGS} ${CTHREADS} \$(PIC) + BLASLIB=$($(tc-getPKG_CONFIG) --libs blas) + MATHLIB=-lm + NOOPTS=-O0 \$(PIC) + ARCHFLAGS=cr + LOADOPTS=${LDFLAGS} ${LDTHREADS} + SUPERLULIB=lib${PN}.a + TMGLIB=libtmglib.a + EOF + SONAME=lib${PN}.so.${SOVERSION} + sed -e 's|../make.inc|make.inc|' \ + -e "s|../SRC|${EPREFIX}/usr/include/${PN}|" \ + -e '/:.*$(SUPERLULIB)/s|../lib/$(SUPERLULIB)||g' \ + -e 's|../lib/$(SUPERLULIB)|-lsuperlu_mt|g' \ + -i EXAMPLE/Makefile || die +} + +src_compile() { + # shared library + emake PIC="-fPIC" \ + ARCH="echo" \ + ARCHFLAGS="" \ + RANLIB="echo" \ + superlulib + $(tc-getCC) ${LDFLAGS} ${LDTHREADS} -shared -Wl,-soname=${SONAME} SRC/*.o \ + $($(tc-getPKG_CONFIG) --libs blas) -lm -o lib/${SONAME} || die + ln -s ${SONAME} lib/libsuperlu_mt.so || die + + use static-libs && rm -f SRC/*.o && \ + emake PIC="" superlulib +} + +src_test() { + emake -j1 tmglib + LD_LIBRARY_PATH="${S}/lib:${LD_LIBRARY_PATH}" \ + emake SUPERLULIB="${SONAME}" testing +} + +src_install() { + dolib.so lib/*so* + use static-libs && dolib.a lib/*.a + insinto /usr/include/${PN} + doins SRC/*h + dodoc README + use doc && dodoc DOC/ug.pdf + if use examples; then + insinto /usr/share/doc/${PF}/examples + doins -r EXAMPLE/* make.inc + fi +} -- cgit v1.2.3