1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-21 04:06:46 +00:00

New port: math/primme: Iterative eigensolver for symmetric and hermitian matrices

This commit is contained in:
Yuri Victorovich 2018-10-09 08:24:02 +00:00
parent b9bbb53d8c
commit 74fa1be30b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=481610
10 changed files with 126 additions and 0 deletions

View File

@ -656,6 +656,7 @@
SUBDIR += plplot
SUBDIR += plplot-ada
SUBDIR += primegen
SUBDIR += primme
SUBDIR += prng
SUBDIR += proofgeneral
SUBDIR += pspp

46
math/primme/Makefile Normal file
View File

@ -0,0 +1,46 @@
# $FreeBSD$
PORTNAME= primme
DISTVERSIONPREFIX= v
DISTVERSION= 2.1
CATEGORIES= math
MAINTAINER= yuri@FreeBSD.org
COMMENT= Iterative eigensolver for symmetric and hermitian matrices
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/COPYING.txt
LIB_DEPENDS= libblas.so:math/blas \
liblapack.so:math/lapack
TEST_DEPENDS= gfortran${GCC_DEFAULT}:lang/gcc${GCC_DEFAULT}
USES= gmake localbase:ldflags
USE_GITHUB= yes
MAKEFILE= makefile
ALL_TARGET= solib
USE_LDCONFIG= yes
BINARY_ALIAS= make=${GMAKE}
CFLAGS+= -fPIC
LDFLAGS+= ${LOCALBASE}/lib/liblapack.so ${LOCALBASE}/lib/libblas.so
TEST_ENV= ${MAKE_ENV} F77=gfortran${GCC_DEFAULT} FLDR=gfortran${GCC_DEFAULT} \
LDFLAGS="-lm -Wl,-rpath=${LOCALBASE}/lib/gcc${GCC_DEFAULT} ${LOCALBASE}/lib/gcc${GCC_DEFAULT}/libgcc_s.so" \
USE_MPI=no USE_PETSC=no PETSC_DIR=${LOCALBASE}
TEST_TARGET= all_tests test
PLIST_FILES= include/primme.h \
include/primme_eigs.h \
include/primme_eigs_f77.h \
include/primme_f77.h \
include/primme_svds.h \
include/primme_svds_f77.h \
lib/libprimme.so
do-install:
cd ${WRKSRC} && ${COPYTREE_SHARE} include ${STAGEDIR}${PREFIX}
${INSTALL_LIB} ${WRKSRC}/lib/lib${PORTNAME}.so ${STAGEDIR}${PREFIX}/lib
.include <bsd.port.mk>

3
math/primme/distinfo Normal file
View File

@ -0,0 +1,3 @@
TIMESTAMP = 1539019293
SHA256 (primme-primme-v2.1_GH0.tar.gz) = edc924250d464f51d0f529aaa77d8b741411b4453b3423fa663a65732055467b
SIZE (primme-primme-v2.1_GH0.tar.gz) = 6071172

View File

@ -0,0 +1,11 @@
--- examples/Makefile.orig 2017-04-11 04:35:01 UTC
+++ examples/Makefile
@@ -8,7 +8,7 @@ include ../Link_flags
override INCLUDE += -I../include
override FINCLUDE += -I../include
-LIBDIRS += -L../lib
+LIBDIRS += ../lib/libprimme.so
EXAMPLES_C = ex_eigs_dseq ex_eigs_zseq ex_svds_dseq ex_svds_zseq
EXAMPLES_CXX = ex_eigs_zseqxx ex_svds_zseqxx

View File

@ -0,0 +1,11 @@
--- src/Makefile.orig 2018-10-09 07:03:22 UTC
+++ src/Makefile
@@ -89,7 +89,7 @@ auto_headers: $(AUTOMATED_HEADERS_LINALG
$(RANLIB) $@
../lib/$(SOLIBRARY): ../lib/$(LIBRARY)
- $(CC) -shared -o ../lib/$(SOLIBRARY) -Wl,--whole-archive ../lib/$(LIBRARY) -Wl,--no-whole-archive
+ $(CC) -shared -o ../lib/$(SOLIBRARY) -Wl,--whole-archive ../lib/$(LIBRARY) -Wl,--no-whole-archive $(LDFLAGS)
#
# Generate CTAGS

View File

@ -0,0 +1,11 @@
--- src/eigs/primme_interface.c.orig 2018-10-08 17:26:04 UTC
+++ src/eigs/primme_interface.c
@@ -36,7 +36,7 @@
*
******************************************************************************/
-#if !(defined (__APPLE__) && defined (__MACH__))
+#if !(defined (__APPLE__) && defined (__MACH__)) && !defined(__FreeBSD__)
# include <malloc.h>
#endif
#include <stdlib.h> /* mallocs, free */

View File

@ -0,0 +1,11 @@
--- src/include/template.h.orig 2018-10-08 17:27:07 UTC
+++ src/include/template.h
@@ -368,7 +368,7 @@
*
**********************************************************************/
-#if !(defined (__APPLE__) && defined (__MACH__))
+#if !(defined (__APPLE__) && defined (__MACH__)) && !defined(__FreeBSD__)
# include <malloc.h> /* malloc */
#endif
#include <stdlib.h> /* malloc, free */

View File

@ -0,0 +1,11 @@
--- tests/COMMON/num.h.orig 2018-10-08 17:28:33 UTC
+++ tests/COMMON/num.h
@@ -42,7 +42,7 @@
#endif
#define Sprimme CONCAT(SCALAR_PRE,primme)
#define Sprimme_svds CONCAT(SCALAR_PRE,primme_svds)
-#if !(defined (__APPLE__) && defined (__MACH__))
+#if !(defined (__APPLE__) && defined (__MACH__)) && !defined(__FreeBSD__)
# include <malloc.h> /* malloc */
#endif
#include <stdlib.h> /* malloc, free */

View File

@ -0,0 +1,11 @@
--- tests/Makefile.orig 2018-10-08 19:10:07 UTC
+++ tests/Makefile
@@ -9,7 +9,7 @@ include ../Link_flags
SOBJS= COMMON/shared_utils.o COMMON/ioandtest.o
COMMON_INCLUDE = -I./COMMON -I../include
override INCLUDE += $(COMMON_INCLUDE)
-LIBDIRS += -L../lib
+LIBDIRS += ../lib/libprimme.so
USE_NATIVE ?= yes
USE_PETSC ?= $(if $(findstring undefined,$(origin PETSC_DIR)),no,yes)

10
math/primme/pkg-descr Normal file
View File

@ -0,0 +1,10 @@
PRIMME, pronounced as prime, computes a few eigenvalues and their corresponding
eigenvectors of a real symmetric or complex Hermitian matrix. It can also
compute singular values and vectors of a square or rectangular matrix. It can
find largest, smallest, or interior singular/eigenvalues and can use
preconditioning to accelerate convergence. It is especially optimized for large,
difficult problems, and can be a useful tool for both non-experts and experts.
PRIMME is written in C99, but complete interfaces are provided for Fortran 77,
MATLAB, Python, and R.
WWW: http://www.cs.wm.edu/~andreas/software/