Merge pull request #6890 from okhlybov/scotch

New packages: (pt)scotch
This commit is contained in:
Christoph Reiter
2020-08-31 23:20:00 +02:00
committed by GitHub
5 changed files with 170 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
diff -urN scotch_6.0.8.orig/src/Makefile.inc scotch_6.0.8/src/Makefile.inc
--- scotch_6.0.8.orig/src/Makefile.inc 1969-12-31 16:00:00.000000000 -0800
+++ scotch_6.0.8/src/Makefile.inc 2019-10-08 04:41:02.691991300 -0700
@@ -0,0 +1,21 @@
+EXE =
+LIB = .a
+OBJ = .o
+
+MAKE = make
+AR = ar
+ARFLAGS = -ruv
+CAT = cat
+CCS = gcc
+CCP = mpicc
+CCD = gcc
+CFLAGS += -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -Drestrict=__restrict -DCOMMON_PTHREAD -DSCOTCH_PTHREAD -DCOMMON_FILE_COMPRESS_GZ
+CLIBFLAGS =
+LDFLAGS = -lm -lz -pthread
+CP = cp
+LEX = flex -Pscotchyy -olex.yy.c
+LN = ln
+MKDIR = mkdir
+MV = mv
+RANLIB = ranlib
+YACC = bison -pscotchyy -y -b y

View File

@@ -0,0 +1,28 @@
diff -urN scotch_6.0.8.orig/src/libscotch/common_file_compress.c scotch_6.0.8/src/libscotch/common_file_compress.c
--- scotch_6.0.8.orig/src/libscotch/common_file_compress.c 2019-05-18 16:40:45.000000000 -0700
+++ scotch_6.0.8/src/libscotch/common_file_compress.c 2019-10-08 04:32:19.642967800 -0700
@@ -209,8 +209,8 @@
if (typeval <= FILECOMPRESSTYPENONE) /* If nothing to do */
return (0);
- if (pipe (filetab) != 0) {
- errorPrint ("fileCompress: cannot create pipe");
+ if (1/*pipe (filetab) != 0*/) {
+ errorPrint ("fileCompress: cannot create pipe: unsupported call");
return (1);
}
diff -urN scotch_6.0.8.orig/src/libscotch/common_file_decompress.c scotch_6.0.8/src/libscotch/common_file_decompress.c
--- scotch_6.0.8.orig/src/libscotch/common_file_decompress.c 2019-05-10 08:34:57.000000000 -0700
+++ scotch_6.0.8/src/libscotch/common_file_decompress.c 2019-10-08 04:32:48.017415600 -0700
@@ -186,8 +186,8 @@
if (typeval <= FILECOMPRESSTYPENONE) /* If nothing to do */
return (0);
- if (pipe (filetab) != 0) {
- errorPrint ("fileDecompress: cannot create pipe");
+ if (1/*pipe (filetab) != 0*/) {
+ errorPrint ("fileDecompress: cannot create pipe: unsupported call");
return (1);
}

View File

@@ -0,0 +1,12 @@
diff -urN scotch_6.0.8.orig/src/libscotch/graph_coarsen.c scotch_6.0.8/src/libscotch/graph_coarsen.c
--- scotch_6.0.8.orig/src/libscotch/graph_coarsen.c 2019-05-18 16:53:25.000000000 -0700
+++ scotch_6.0.8/src/libscotch/graph_coarsen.c 2019-10-08 04:36:55.269120100 -0700
@@ -354,7 +354,7 @@
#ifdef GRAPHCOARSENTHREAD
thrdnbr =
- coarptr->thrddat.thrdnbr = SCOTCH_PTHREAD_NUMBER; /* Required by graphMatchInit */
+ coarptr->thrddat.thrdnbr = 1/*SCOTCH_PTHREAD_NUMBER*/; /* Required by graphMatchInit */
#else /* GRAPHCOARSENTHREAD */
#ifdef COMMON_PTHREAD
coarptr->thrddat.thrdnbr = 1;

View File

@@ -0,0 +1,20 @@
diff -urN scotch_6.0.8.orig/src/libscotch/Makefile scotch_6.0.8/src/libscotch/Makefile
--- scotch_6.0.8.orig/src/libscotch/Makefile 2019-05-18 16:53:25.000000000 -0700
+++ scotch_6.0.8/src/libscotch/Makefile 2019-10-09 04:21:01.832072100 -0700
@@ -3062,14 +3062,14 @@
mapping.h \
order.h \
parser.h
- $(CCD) $(CCDFLAGS) -DSCOTCH_VERSION_NUM=$(VERSION) -DSCOTCH_RELEASE_NUM=$(RELEASE) -DSCOTCH_PATCHLEVEL_NUM=$(PATCHLEVEL) $(<) -o $(@) $(LDFLAGS)
+ $(CCD) $(CCDFLAGS) -DSCOTCH_VERSION_NUM=$(VERSION) -DSCOTCH_RELEASE_NUM=$(RELEASE) -DSCOTCH_PATCHLEVEL_NUM=$(PATCHLEVEL) $(<) -o $(@) $(LDFLAGS) -lgnurx
ptdummysizes$(EXE) : dummysizes.c \
module.h \
common.h \
dgraph.h \
dorder.h
- $(CCD) $(CCDFLAGS) -DSCOTCH_VERSION_NUM=$(VERSION) -DSCOTCH_RELEASE_NUM=$(RELEASE) -DSCOTCH_PATCHLEVEL_NUM=$(PATCHLEVEL) $(<) -o $(@) $(LDFLAGS)
+ $(CCD) $(CCDFLAGS) -DSCOTCH_VERSION_NUM=$(VERSION) -DSCOTCH_RELEASE_NUM=$(RELEASE) -DSCOTCH_PATCHLEVEL_NUM=$(PATCHLEVEL) $(<) -o $(@) $(LDFLAGS) -lgnurx
scotch.h : dummysizes$(EXE) \
library.h

85
mingw-w64-scotch/PKGBUILD Normal file
View File

@@ -0,0 +1,85 @@
# Contributor: Oleg A. Khlybov <fougas@mail.ru>
_realname=scotch
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgdesc='Graph partitioning and sparse matrix ordering package (mingw-w64)'
pkgver=6.0.9
pkgrel=1
arch=('any')
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs")
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-msmpi" "${MINGW_PACKAGE_PREFIX}-libgnurx")
options=('strip' 'staticlibs')
license=('CeCILL-C')
url="http://www.labri.fr/perso/pelegrin/scotch/"
source=("https://gforge.inria.fr/frs/download.php/file/38187/${_realname}_${pkgver}.tar.gz"
"0001-makefile.inc.patch"
"0002-pipe-fix.patch"
"0003-thread-fix.patch"
"0004-dummysizes-regex.patch"
)
sha256sums=('622b4143cf01c480bb15708b3651b29c25e4aeb00c8c6447ff196aca2eca5c93'
'2c55b1e99a8d40c976e7147aa9102db2d1c489da1b760e526b424bf5ffd12716'
'49d87533321504a9594d7bb4659fbced5afadd2fc0d73f0577b0b3ad47cc7d0f'
'8a02cea7cdc3c685776012b2bb42cec8c5e98c435bdf1ffd62abf5ab6def9fbb'
'92908a6598d333a35a3b76650c111a082304e9dfff7c9bc0667d6af62de47c14')
prepare() {
cd "${srcdir}/${_realname}_${pkgver}"
for p in ${source[*]:1}; do
patch -p1 -i "$srcdir/$p"
done
}
build() {
cd "${srcdir}/${_realname}_${pkgver}/src"
make -j1 scotch ptscotch esmumps ptesmumps
cd ../lib
gcc -shared -o lib${_realname}.dll -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--output-def,lib${_realname}.def -Wl,--out-implib,lib${_realname}.dll.a -Wl,--whole-archive lib${_realname}.a lib${_realname}err.a -Wl,--no-whole-archive
mpicc -shared -o libpt${_realname}.dll -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--output-def,libpt${_realname}.def -Wl,--out-implib,libpt${_realname}.dll.a -Wl,--whole-archive libpt${_realname}.a libpt${_realname}err.a -Wl,--no-whole-archive -L. -l${_realname}
}
package() {
cd "${srcdir}/${_realname}_${pkgver}"
mkdir -p ${pkgdir}${MINGW_PREFIX}/{bin,lib,include}
mkdir -p "${pkgdir}${MINGW_PREFIX}/lib/pkgconfig"
echo "
prefix=${MINGW_PREFIX}
libdir=\${prefix}/lib
includedir=\${prefix}/include
Name: scotch
URL: ${url}
Version: ${pkgver}
Description: Serial graph partitioning and sparse matrix ordering package
Cflags: -I\${includedir}
Libs.private: -lscotcherr
Libs: -L\${libdir} -lscotch
" | sed '/^\s*$/d;s/^\s*//' > "${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/scotch.pc"
echo "
prefix=${MINGW_PREFIX}
libdir=\${prefix}/lib
includedir=\${prefix}/include
Name: ptscotch
URL: ${url}
Version: ${pkgver}
Description: Parallel graph partitioning and sparse matrix ordering package
Requires: scotch
Requires.private: msmpi
Cflags: -I\${includedir}
Libs.private: -lptscotcherr
Libs: -L\${libdir} -lptscotch
" | sed '/^\s*$/d;s/^\s*//' > "${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/ptscotch.pc"
(
cd include
install -m644 *.h "${pkgdir}${MINGW_PREFIX}/include"
cd "${pkgdir}${MINGW_PREFIX}/include"
mv metis.h scotchmetis.h
mv parmetis.h ptscotchparmetis.h
)
(
cd lib
install -m644 lib*.a "${pkgdir}${MINGW_PREFIX}/lib"
install -m644 lib*.dll "${pkgdir}${MINGW_PREFIX}/bin"
)
}