Date: Thu, 13 Sep 2018 00:26:41 +0000 (UTC) From: Yuri Victorovich <yuri@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r479657 - in head/science/dftbplus: . files Message-ID: <201809130026.w8D0Qf0Q018184@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: yuri Date: Thu Sep 13 00:26:41 2018 New Revision: 479657 URL: https://svnweb.freebsd.org/changeset/ports/479657 Log: science/dftbplus: Fix ARPACK handling; Link with clang; etc * ARPACK option is for non-MPI build only * Make it link using clang * Add openmp dependency Added: head/science/dftbplus/files/patch-make.arch (contents, props changed) Modified: head/science/dftbplus/Makefile head/science/dftbplus/files/patch-make.config Modified: head/science/dftbplus/Makefile ============================================================================== --- head/science/dftbplus/Makefile Wed Sep 12 22:57:48 2018 (r479656) +++ head/science/dftbplus/Makefile Thu Sep 13 00:26:41 2018 (r479657) @@ -2,6 +2,7 @@ PORTNAME= dftbplus DISTVERSION= 18.2 +PORTREVISION= 1 CATEGORIES= science MAINTAINER= yuri@FreeBSD.org @@ -10,7 +11,8 @@ COMMENT= Package for performing fast atomistic simulat LICENSE= GPLv3+ LIB_DEPENDS= libblas.so:math/blas \ - liblapack.so:math/lapack + liblapack.so:math/lapack \ + libomp.so:devel/openmp RUN_DEPENDS= ${PYNUMPY} USES= fortran gmake python shebangfix @@ -23,18 +25,15 @@ GH_TUPLE= dftbplus:mpifx:099ff75:mpifx/external/mpifx/ dftbplus:dftd3-lib:00504a9:dftd3/external/dftd3/origin MAKEFILE= makefile -LDFLAGS+= -llapack -lblas +FFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -llapack -lblas ${LOCALBASE}/lib/gcc${GCC_DEFAULT}/libgcc_s.so ${LOCALBASE}/lib/gcc${GCC_DEFAULT}/libgfortran.so -lm ${LOCALBASE}/lib/libomp.so -MAKE_ARGS= PYTHON=${PYTHON_CMD} INSTALLDIR=${STAGEDIR}${PREFIX} FREEBSD_PYDISTUTILS_INSTALLARGS="${PYDISTUTILS_INSTALLARGS} --root=${STAGEDIR}" +MAKE_ARGS= PYTHON=${PYTHON_CMD} FC=${FC} FXX=${FC} LN=${CC} \ + INSTALLDIR=${STAGEDIR}${PREFIX} FREEBSD_PYDISTUTILS_INSTALLARGS="${PYDISTUTILS_INSTALLARGS} --root=${STAGEDIR}" -OPTIONS_DEFINE= ARPACK DFTD3 MPI SOCKETS -OPTIONS_DEFAULT= ARPACK DFTD3 MPI SOCKETS +OPTIONS_DEFINE= DFTD3 MPI SOCKETS ARPACK +OPTIONS_DEFAULT= DFTD3 MPI SOCKETS -ARPACK_DESC= Build with ARPACK for large eigenvalue problems -ARPACK_MAKE_ENV= WITH_ARPACK=1 -ARPACK_MAKE_ENV_OFF= WITH_ARPACK=0 -LIB_LIB_DEPENDS= libarpack.so:math/arpack - DFTD3_DESC= Build with libdft3 DFTD3_MAKE_ENV= WITH_DFTD3=1 DFTD3_MAKE_ENV_OFF= WITH_DFTD3=0 @@ -43,16 +42,24 @@ MPI_MAKE_ENV= WITH_MPI=1 MPI_MAKE_ENV_OFF= WITH_MPI=0 MPI_LIB_DEPENDS= libmpich.so:net/mpich2 \ libscalapack.so:math/scalapack +MPI_LDFLAGS= ${LOCALBASE}/lib/libmpich.so SOCKETS_DESC= Build with sockets library SOCKETS_MAKE_ENV= WITH_SOCKETS=1 SOCKETS_MAKE_ENV_OFF= WITH_SOCKETS=0 SOCKETS_BINARY_ALIAS= gcc=${CC} +ARPACK_DESC= Build with ARPACK for large eigenvalue problems +ARPACK_MAKE_ENV= WITH_ARPACK=1 +ARPACK_MAKE_ENV_OFF= WITH_ARPACK=0 +ARPACK_LIB_DEPENDS= libarpack.so:math/arpack +ARPACK_PREVENTS= MPI # ARPACK is only used in a single-core application + MAKE_JOBS_UNSAFE= yes # race conditions when some options are ON -post-patch: - @cd ${WRKSRC} && ${LN} -s sys/make.x86_64-linux-gnu make.arch +post-extract: + @${RM} ${WRKSRC}/external/scalapackfx/origin/test/psyr_result.dat.orig + @cd ${WRKSRC} && ${CP} sys/make.x86_64-linux-gnu make.arch post-install: @cd ${STAGEDIR}${PREFIX}/bin && ${STRIP_CMD} dftb+ modes waveplot Added: head/science/dftbplus/files/patch-make.arch ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/science/dftbplus/files/patch-make.arch Thu Sep 13 00:26:41 2018 (r479657) @@ -0,0 +1,57 @@ +--- make.arch.orig 2018-09-12 23:49:19 UTC ++++ make.arch +@@ -13,17 +13,17 @@ FXX = mpif90 + CC = gcc + + # Compiler options +-FXXOPT = -O2 -funroll-all-loops -fopenmp +-CCOPT = -O2 -funroll-all-loops -fall-intrinsics ++FXXOPT = $(FFLAGS) -funroll-all-loops -fopenmp ++CCOPT = $(CFLAGS) -funroll-all-loops -fall-intrinsics + + # Linker + LN = $(FXX) +-LNOPT = -fopenmp ++LNOPT = $(LDFLAGS) -fopenmp + + # How to link specific libraries + + # ScaLAPACK +-SCALAPACKDIR = /usr/lib ++SCALAPACKDIR = $(PREFIX) + LIB_SCALAPACK = -L$(SCALAPACKDIR) -lscalapack + + # LAPACK/BLAS +@@ -49,12 +49,12 @@ FXX = gfortran + CC = gcc + + # Compiler options +-FXXOPT = -O2 -funroll-all-loops -fopenmp +-CCOPT = -O2 -funroll-all-loops -fall-intrinsics ++FXXOPT = $(FFLAGS) -funroll-all-loops -fopenmp ++CCOPT = $(CFLAGS) -funroll-all-loops -fall-intrinsics + + # Linker + LN = $(FXX) +-LNOPT = -fopenmp ++LNOPT = $(LDFLAGS) -fopenmp + + # How to link specific libraries + +@@ -88,12 +88,12 @@ LIBOPT = + # Override options for different DEBUG modes + ifeq ($(strip $(DEBUG)),1) + OTHERLIBS = +- FXXOPT = -fopenmp -g -Wall -std=f2008 -pedantic +- CCOPT = -g -Wall -pedantic -fall-intrinsics ++ FXXOPT = $(FFLAGS) -fopenmp -g -Wall -std=f2008 -pedantic ++ CCOPT = $(CFLAGS) -g -Wall -pedantic -fall-intrinsics + endif + + ifeq ($(strip $(DEBUG)),2) + OTHERLIBS = +- FXXOPT = -fopenmp -g -Wall -std=f2008 -pedantic -fbounds-check +- CCOPT = -g -Wall -pedantic -fall-intrinsics -fbounds-check ++ FXXOPT = $(FFLAGS) -fopenmp -g -Wall -std=f2008 -pedantic -fbounds-check ++ CCOPT = $(CFLAGS) -g -Wall -pedantic -fall-intrinsics -fbounds-check + endif Modified: head/science/dftbplus/files/patch-make.config ============================================================================== --- head/science/dftbplus/files/patch-make.config Wed Sep 12 22:57:48 2018 (r479656) +++ head/science/dftbplus/files/patch-make.config Thu Sep 13 00:26:41 2018 (r479657) @@ -24,7 +24,7 @@ ################################################################################ # General building/testing options -@@ -55,8 +55,8 @@ COMPILE_DFTD3 := 1 +@@ -55,12 +55,12 @@ COMPILE_DFTD3 := 1 # Set the compile time include and the link time library options for # dftd3-lib. Ignored if WITH_DFTD3 has been disabled or COMPILE_DFTD3 enabled. @@ -35,3 +35,8 @@ # Link time library options for linking ARPACK. Ignored if WITH_ARPACK was # disabled. +-ARPACK_LIBS := -larpack ++ARPACK_LIBS := $(PREFIX)/lib/libarpack.so + + # Whether ARPACK depends on the external LAPACK and BLAS libraries + ARPACK_NEEDS_LAPACK := 0
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201809130026.w8D0Qf0Q018184>