mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-19 19:59:43 +00:00
Update to 1.7.4
- Add support for OpenMPI (requires math/blacs compiled with OpenMPI) - Make it possible to use math/blas instead of math/atlas PR: 105497 Submitted by: trasz <trasz@pin.if.uz.zgora.pl>
This commit is contained in:
parent
cf5671975d
commit
a85314e3da
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=177550
@ -6,28 +6,23 @@
|
||||
#
|
||||
|
||||
PORTNAME= scalapack
|
||||
PORTVERSION= 1.7
|
||||
PORTREVISION= 2
|
||||
PORTVERSION= 1.7.4
|
||||
CATEGORIES= math
|
||||
MASTER_SITES= ftp://ftp.netlib.org/scalapack/
|
||||
DISTNAME= SCALAPACK
|
||||
DISTFILES= scalapack.tgz manpages.tgz
|
||||
DISTFILES= scalapack-${PORTVERSION}.tgz manpages.tgz
|
||||
.if !defined(NOPORTDOCS)
|
||||
DISTFILES+= scalapack_install.ps scalapackqref.ps \
|
||||
lawn100.ps pblasqref.ps manual.ps design.ps \
|
||||
pumma_refmanual.ps trans.ps
|
||||
.endif
|
||||
DIST_SUBDIR= scalapack
|
||||
EXTRACT_ONLY= scalapack.tgz manpages.tgz
|
||||
EXTRACT_ONLY= scalapack-${PORTVERSION}.tgz manpages.tgz
|
||||
|
||||
MAINTAINER= maho@FreeBSD.org
|
||||
COMMENT= The ScaLAPACK Scalable LAPACK library
|
||||
|
||||
BUILD_DEPENDS= ${LOCALBASE}/mpich2/lib/libmpich.a:${PORTSDIR}/net/mpich2 \
|
||||
${LOCALBASE}/lib/libblacs.a:${PORTSDIR}/math/blacs \
|
||||
BUILD_DEPENDS= ${LOCALBASE}/lib/libblacs.a:${PORTSDIR}/math/blacs \
|
||||
${LOCALBASE}/bin/f2c:${PORTSDIR}/lang/f2c
|
||||
LIB_DEPENDS= lapack:${PORTSDIR}/math/lapack \
|
||||
atlas:${PORTSDIR}/math/atlas
|
||||
|
||||
CONFLICTS= elmer-mathlibs-1*
|
||||
|
||||
@ -35,7 +30,6 @@ F77?= f77
|
||||
|
||||
ARCH2FIX= PBLAS/SRC PBLAS/SRC/PBBLAS PBLAS/SRC/PTOOLS PBLAS/SRC/PTZBLAS \
|
||||
REDIST/SRC SRC TOOLS TOOLS/LAPACK
|
||||
BLAS= -lf77blas -latlas
|
||||
|
||||
DATADIR= ${PREFIX}/share/${PORTNAME:U}
|
||||
EXAMPLESDIR= ${PREFIX}/share/examples/${PORTNAME:U}
|
||||
@ -46,6 +40,32 @@ SUB_FILES= pkg-message
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if exists(${LOCALBASE}/lib/libatlas_r.so) && !defined(WITH_BLAS)
|
||||
WITH_ATLAS= yes
|
||||
.endif
|
||||
|
||||
.if defined(WITH_ATLAS)
|
||||
LIB_DEPENDS+= atlas.1:${PORTSDIR}/math/atlas
|
||||
BLAS= -lf77blas -latlas
|
||||
.else
|
||||
LIB_DEPENDS+= blas.1:${PORTSDIR}/math/blas
|
||||
LIB_DEPENDS+= lapack:${PORTSDIR}/math/lapack
|
||||
BLAS= -lblas
|
||||
.endif
|
||||
|
||||
.if exists(${LOCALBASE}/mpi/openmpi/bin/mpirun)
|
||||
WITH_OPENMPI= yes
|
||||
.endif
|
||||
|
||||
.if defined(WITH_OPENMPI)
|
||||
BUILD_DEPENDS+= ${LOCALBASE}/mpi/openmpi/lib/libmpi.so:${PORTSDIR}/net/openmpi
|
||||
RUN_DEPENDS= ${LOCALBASE}/mpi/openmpi/bin/mpirun:${PORTSDIR}/net/openmpi
|
||||
EXTRA_PATCHES+= ${FILESDIR}/SLmake.inc-openmpi.diff
|
||||
.else
|
||||
BUILD_DEPENDS+= ${LOCALBASE}/mpich2/lib/libmpich.a:${PORTSDIR}/net/mpich2
|
||||
EXTRA_PATCHES+= ${FILESDIR}/SLmake.inc-mpich.diff
|
||||
.endif
|
||||
|
||||
.if defined(WITH_OPTIMIZED_FLAGS)
|
||||
.if ${ARCH} == "amd64"
|
||||
FFLAGS+= -pipe -O3 -ffast-math -funroll-all-loops -fpeel-loops -ftracer -funswitch-loops -funit-at-a-time
|
||||
|
@ -1,6 +1,6 @@
|
||||
MD5 (scalapack/scalapack.tgz) = 6d214940fab71d56117184d55cbb29f1
|
||||
SHA256 (scalapack/scalapack.tgz) = fc18520ac36cad703ec5e774634f055c84c4e2ddd2d3e4e09779cda712e59eef
|
||||
SIZE (scalapack/scalapack.tgz) = 4468266
|
||||
MD5 (scalapack/scalapack-1.7.4.tgz) = 688b759059e11e54f5381bfa2850c519
|
||||
SHA256 (scalapack/scalapack-1.7.4.tgz) = 7b5de82088feb23d1581ae96d80ff80585b0d78ebcb32098bd2bf3ce670b02ff
|
||||
SIZE (scalapack/scalapack-1.7.4.tgz) = 5014804
|
||||
MD5 (scalapack/manpages.tgz) = a536ab4837ec68addff0a3ec99427a10
|
||||
SHA256 (scalapack/manpages.tgz) = a745c9f367d65e3c7611c126597a4681094b002552e47b621964d30a966aac7b
|
||||
SIZE (scalapack/manpages.tgz) = 379541
|
||||
|
62
math/scalapack/files/SLmake.inc-openmpi.diff
Normal file
62
math/scalapack/files/SLmake.inc-openmpi.diff
Normal file
@ -0,0 +1,62 @@
|
||||
--- SLmake.inc.orig Thu Aug 9 04:59:50 2001
|
||||
+++ SLmake.inc Mon Nov 13 15:45:36 2006
|
||||
@@ -19,26 +19,26 @@
|
||||
# The complete path to the top level of ScaLAPACK directory, usually
|
||||
# $(HOME)/SCALAPACK
|
||||
#
|
||||
-home = $(HOME)/SCALAPACK
|
||||
+home = @WRKSRC@
|
||||
#
|
||||
# The platform identifier to suffix to the end of library names
|
||||
#
|
||||
-PLAT = LINUX
|
||||
+PLAT = FreeBSD
|
||||
#
|
||||
# BLACS setup. All version need the debug level (0 or 1),
|
||||
# and the directory where the BLACS libraries are
|
||||
#
|
||||
BLACSDBGLVL = 0
|
||||
-BLACSdir = /usr/local/lib
|
||||
+BLACSdir = @LOCALBASE@/lib
|
||||
#
|
||||
# MPI setup; tailor to your system if using MPIBLACS
|
||||
# Will need to comment out these 6 lines if using PVM
|
||||
#
|
||||
USEMPI = -DUsingMpiBlacs
|
||||
-SMPLIB = /usr/local/mpich-1.2.1/lib/libmpich.a
|
||||
-BLACSFINIT = $(BLACSdir)/libmpiblacsF77init-p4.a
|
||||
-BLACSCINIT = $(BLACSdir)/libmpiblacsCinit-p4.a
|
||||
-BLACSLIB = $(BLACSdir)/libmpiblacs-p4.a
|
||||
+SMPLIB =
|
||||
+BLACSFINIT = $(BLACSdir)/libblacsf77.a
|
||||
+BLACSCINIT = $(BLACSdir)/libblacsc.a
|
||||
+BLACSLIB = $(BLACSdir)/libblacs.a
|
||||
TESTINGdir = $(home)/TESTING
|
||||
|
||||
#
|
||||
@@ -67,12 +67,12 @@
|
||||
#
|
||||
# The fortran and C compilers, loaders, and their flags
|
||||
#
|
||||
-F77 = g77
|
||||
+F77 = mpif77
|
||||
#F77 = /usr/local/pgi/linux86/bin/pgf77
|
||||
-CC = gcc
|
||||
+CC = mpicc
|
||||
NOOPT =
|
||||
-F77FLAGS = -O3 $(NOOPT)
|
||||
-CCFLAGS = -O4
|
||||
+F77FLAGS = @FFLAGS@
|
||||
+CCFLAGS = @CFLAGS@
|
||||
SRCFLAG =
|
||||
F77LOADER = $(F77)
|
||||
CCLOADER = $(CC)
|
||||
@@ -94,7 +94,7 @@
|
||||
# The name of the libraries to be created/linked to
|
||||
#
|
||||
SCALAPACKLIB = $(home)/libscalapack.a
|
||||
-BLASLIB = /usr/local/lib/libf77blas.a /usr/local/lib/libatlas.a
|
||||
+BLASLIB = -L@LOCALBASE@/lib @BLAS@
|
||||
#
|
||||
PBLIBS = $(SCALAPACKLIB) $(FBLACSLIB) $(BLASLIB) $(SMPLIB)
|
||||
PRLIBS = $(SCALAPACKLIB) $(CBLACSLIB) $(SMPLIB)
|
@ -20,6 +20,14 @@
|
||||
? end
|
||||
% %%LOCALBASE%%/mpich2/bin/mpdallexit
|
||||
|
||||
If you're using OpenMPI, use this instead:
|
||||
% cd %%DATADIR%%/TESTING
|
||||
% LD_LIBRARY_PATH=%%LOCALBASE%%/mpi/openmpi/lib/ export LD_LIBRARY_PATH
|
||||
% PATH=$PATH:%%LOCALBASE%%/mpi/openmpi/bin/ export PATH
|
||||
% mpirun -np 4 ./xcbrd
|
||||
% mpirun -np 4 ./xcdblu
|
||||
etc., etc. ...
|
||||
|
||||
You can change -np 4 to any number to meet your environment.
|
||||
See files at %%DOCSDIR%% for detail.
|
||||
**********************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user