Gentoo Archives: gentoo-commits

From: Alessandro Barbieri <lssndrbarbieri@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: sci-libs/superlu_dist/, sci-libs/superlu_dist/files/
Date: Thu, 26 May 2022 21:20:48
Message-Id: 1653600042.8721ad7bbae80c503542be6896c9ecb997bdf578.Alessandro-Barbieri@gentoo
1 commit: 8721ad7bbae80c503542be6896c9ecb997bdf578
2 Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
3 AuthorDate: Thu May 26 20:08:17 2022 +0000
4 Commit: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
5 CommitDate: Thu May 26 21:20:42 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=8721ad7b
7
8 sci-libs/superlu_dist: unbundle colamd
9
10 Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
11
12 sci-libs/superlu_dist/Manifest | 3 +-
13 ...uperlu_dist-8.0.0_p20220526-system-colamd.patch | 27 ++++++++
14 sci-libs/superlu_dist/superlu_dist-7.2.0.ebuild | 79 ----------------------
15 ....ebuild => superlu_dist-8.0.0_p20220526.ebuild} | 14 +++-
16 4 files changed, 39 insertions(+), 84 deletions(-)
17
18 diff --git a/sci-libs/superlu_dist/Manifest b/sci-libs/superlu_dist/Manifest
19 index 9d18fdf53..5cbefaa65 100644
20 --- a/sci-libs/superlu_dist/Manifest
21 +++ b/sci-libs/superlu_dist/Manifest
22 @@ -1,2 +1 @@
23 -DIST superlu_dist-7.2.0.tar.gz 2187572 BLAKE2B 93e848e7146022030d8d55fef74b090d6998553d5114b136c38fc95873941f5fe20a2a3f7af30cf4465fac4306da41dc41f27614397f77f9e08b57f8705c9312 SHA512 89d2480e2c200e4588171b24ce21c9f1556c3ba917a561bdb6ac89e88c73ea982ba133ffddba632494098b68d8ad59ca28ec215f2cb92da12c518e87a2e1d5f7
24 -DIST superlu_dist-8.0.0.tar.gz 2291245 BLAKE2B 059b737d9286fa43a5eee0f6b2719571c07f8176dce2055846646a37fedeff39816e673271f76fcedff739b766404aa3f74ce9bb02b7a51be043c449de578848 SHA512 c4e4df9b077bc24f587121c05c60a9521f9afe2f1a15acb2e1ea17b34df33c155a423f89c520c43f7953889a8ae90d8e358f95e99e901d3097e9df6a992c482e
25 +DIST superlu_dist-8.0.0_p20220526.tar.gz 2293227 BLAKE2B 5c73d68a1d9812063614fb503a99c5f1e141d7c4340c1b484e5c24b818c47a6ffc2073140fc585e11b3d5b342d0baa6299ebeface03e2d1eb30245043d214751 SHA512 ac5f03b7f2500f306277dabda9e1aea457b55f2d41b72b969fa4e3a986ebb6abb65f87a3678d6cc103faa8f8e720aaac2b79d9db150288bfe1385abe2b61d8ce
26
27 diff --git a/sci-libs/superlu_dist/files/superlu_dist-8.0.0_p20220526-system-colamd.patch b/sci-libs/superlu_dist/files/superlu_dist-8.0.0_p20220526-system-colamd.patch
28 new file mode 100644
29 index 000000000..8b1689dfc
30 --- /dev/null
31 +++ b/sci-libs/superlu_dist/files/superlu_dist-8.0.0_p20220526-system-colamd.patch
32 @@ -0,0 +1,27 @@
33 +--- /var/tmp/portage/sci-libs/superlu_dist-8.0.0_p20220526/work/superlu_dist-df1dbf3afd7876644ff5d0613dfa7b9d32af79de/SRC/CMakeLists.txt
34 ++++ superlu_dist-df1dbf3afd7876644ff5d0613dfa7b9d32af79de/SRC/CMakeLists.txt
35 +@@ -7,7 +7,6 @@
36 + superlu_enum_consts.h
37 + supermatrix.h
38 + util_dist.h
39 +- colamd.h
40 + gpu_api_utils.h
41 + gpu_wrapper.h
42 + ${CMAKE_CURRENT_BINARY_DIR}/superlu_dist_config.h
43 +@@ -40,7 +39,6 @@
44 + xerr_dist.c
45 + smach_dist.c
46 + dmach_dist.c
47 +- colamd.c
48 + superlu_dist_version.c
49 + comm_tree.c
50 + superlu_grid3d.c ## 3D code
51 +@@ -291,7 +289,7 @@
52 + endif()
53 +
54 + set(superlu_dist_libs ${MPI_C_LIBRARIES} ${MPI_CXX_LIBRARIES} ${BLAS_LIB} ${LAPACK_LIB}
55 +- ${PARMETIS_LIB} ${COMBBLAS_LIB} ${CUDA_LIB} ${HIP_LIB})
56 ++ ${PARMETIS_LIB} ${COMBBLAS_LIB} ${CUDA_LIB} ${HIP_LIB} -lcolamd)
57 + if (NOT MSVC)
58 + list(APPEND superlu_dist_libs m)
59 + endif ()
60
61 diff --git a/sci-libs/superlu_dist/superlu_dist-7.2.0.ebuild b/sci-libs/superlu_dist/superlu_dist-7.2.0.ebuild
62 deleted file mode 100644
63 index c3a3fcf1f..000000000
64 --- a/sci-libs/superlu_dist/superlu_dist-7.2.0.ebuild
65 +++ /dev/null
66 @@ -1,79 +0,0 @@
67 -# Copyright 1999-2022 Gentoo Authors
68 -# Distributed under the terms of the GNU General Public License v2
69 -
70 -EAPI=8
71 -
72 -DOCS_BUILDER="doxygen"
73 -DOCS_CONFIG_NAME="DoxyConfig"
74 -FORTRAN_NEEDED="fortran"
75 -
76 -inherit cmake docs fortran-2
77 -
78 -DESCRIPTION="MPI distributed sparse LU factorization library"
79 -HOMEPAGE="
80 - https://portal.nersc.gov/project/sparse/superlu/
81 - https://github.com/xiaoyeli/superlu_dist
82 -"
83 -SRC_URI="https://github.com/xiaoyeli/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
84 -
85 -LICENSE="BSD"
86 -SLOT="0"
87 -KEYWORDS="~amd64"
88 -IUSE="combblas +complex-precision +double-precision examples lapack fortran metis single-precision test"
89 -# TODO: cuda
90 -
91 -RDEPEND="
92 - virtual/blas
93 - virtual/mpi
94 -
95 - combblas? ( sci-libs/CombBLAS )
96 - lapack? ( virtual/lapack )
97 - metis? ( sci-libs/parmetis )
98 -"
99 -DEPEND="${RDEPEND}"
100 -BDEPEND="virtual/pkgconfig"
101 -
102 -RESTRICT="!test? ( test )"
103 -
104 -src_prepare() {
105 - rm -r CBLAS || die
106 - cmake_src_prepare
107 -}
108 -
109 -src_configure() {
110 - local mycmakeargs=(
111 - -Denable_openmp=ON
112 - -DBUILD_SHARED_LIBS=ON
113 - -DBUILD_STATIC_LIBS=OFF
114 - -DTPL_ENABLE_CUDALIB=OFF
115 - -DTPL_ENABLE_INTERNAL_BLASLIB=OFF
116 -
117 - -Denable_complex16=$(usex complex-precision)
118 - -Denable_double=$(usex double-precision)
119 - -Denable_examples=$(usex examples ON OFF)
120 - -Denable_single=$(usex single-precision)
121 - -Denable_tests=$(usex test ON OFF)
122 - -DTPL_ENABLE_COMBBLASLIB=$(usex combblas)
123 - -DTPL_ENABLE_LAPACKLIB=$(usex lapack)
124 - -DTPL_ENABLE_PARMETISLIB=$(usex metis)
125 - -DXSDK_ENABLE_Fortran=$(usex fortran)
126 - )
127 - if use combblas; then
128 - mycmakeargs+=(
129 - -DTPL_COMBBLAS_LIBRARIES="${EPREFIX}/usr/$(get_libdir)/libCombBLAS.so"
130 - -DTPL_COMBBLAS_INCLUDE_DIRS="${EPREFIX}/usr/include/CombBLAS/"
131 - )
132 - fi
133 - if use metis; then
134 - mycmakeargs+=(
135 - -DTPL_PARMETIS_LIBRARIES="${EPREFIX}/usr/$(get_libdir)/libparmetis.so"
136 - -DTPL_PARMETIS_INCLUDE_DIRS="${EPREFIX}/usr/include"
137 - )
138 - fi
139 - cmake_src_configure
140 -}
141 -
142 -src_compile() {
143 - cmake_src_compile
144 - default
145 -}
146
147 diff --git a/sci-libs/superlu_dist/superlu_dist-8.0.0.ebuild b/sci-libs/superlu_dist/superlu_dist-8.0.0_p20220526.ebuild
148 similarity index 84%
149 rename from sci-libs/superlu_dist/superlu_dist-8.0.0.ebuild
150 rename to sci-libs/superlu_dist/superlu_dist-8.0.0_p20220526.ebuild
151 index 77b3ebd75..7c67699d0 100644
152 --- a/sci-libs/superlu_dist/superlu_dist-8.0.0.ebuild
153 +++ b/sci-libs/superlu_dist/superlu_dist-8.0.0_p20220526.ebuild
154 @@ -3,6 +3,7 @@
155
156 EAPI=8
157
158 +COMMIT="df1dbf3afd7876644ff5d0613dfa7b9d32af79de"
159 DOCS_BUILDER="doxygen"
160 DOCS_CONFIG_NAME="DoxyConfig"
161 FORTRAN_NEEDED="fortran"
162 @@ -14,7 +15,8 @@ HOMEPAGE="
163 https://portal.nersc.gov/project/sparse/superlu/
164 https://github.com/xiaoyeli/superlu_dist
165 "
166 -SRC_URI="https://github.com/xiaoyeli/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
167 +SRC_URI="https://github.com/xiaoyeli/${PN}/archive/${COMMIT}.tar.gz -> ${PF}.tar.gz"
168 +S="${WORKDIR}/${PN}-${COMMIT}"
169
170 LICENSE="BSD"
171 SLOT="0"
172 @@ -23,6 +25,7 @@ IUSE="combblas +complex-precision +double-precision examples hip lapack fortran
173 # TODO: cuda
174
175 RDEPEND="
176 + sci-libs/colamd
177 virtual/blas
178 virtual/mpi
179
180 @@ -38,10 +41,12 @@ RDEPEND="
181 DEPEND="${RDEPEND}"
182 BDEPEND="virtual/pkgconfig"
183
184 +PATCHES=( "${FILESDIR}/${P}-system-colamd.patch" )
185 RESTRICT="!test? ( test )"
186
187 src_prepare() {
188 rm -r CBLAS || die
189 + rm SRC/colamd.{c,h} || die
190 cmake_src_prepare
191 }
192
193 @@ -80,6 +85,9 @@ src_configure() {
194 }
195
196 src_compile() {
197 - cmake_src_compile
198 - default
199 + if use fortran ; then
200 + MAKEOPTS="-j1" cmake_src_compile
201 + else
202 + cmake_src_compile
203 + fi
204 }