From 9794c2d63f607d513783c75997c86c978db3d3f8 Mon Sep 17 00:00:00 2001 From: maho Date: Sun, 19 Nov 2006 08:42:07 +0000 Subject: * Use BLAS instead of ATLAS if ATLAS doesn't exist. * mpich part of mpqc-mpich is moved into mpqc port. * now use mpich2 instead of mpich. --- science/mpqc-mpich/Makefile | 10 ++----- science/mpqc/Makefile | 40 ++++++++++++++++++------- science/mpqc/files/patch-::configure.in | 52 +++++++++++++++++++++++++++++++++ 3 files changed, 84 insertions(+), 18 deletions(-) (limited to 'science') diff --git a/science/mpqc-mpich/Makefile b/science/mpqc-mpich/Makefile index e803bb92a696..ecb4e69ff15c 100644 --- a/science/mpqc-mpich/Makefile +++ b/science/mpqc-mpich/Makefile @@ -9,12 +9,6 @@ MASTERDIR= ${.CURDIR}/../mpqc/ PKGNAMESUFFIX= -mpich -.include "${MASTERDIR}/Makefile" - -BUILD_DEPENDS+= ${LOCALBASE}/mpich/lib/libmpich.a:${PORTSDIR}/net/mpich +WITH_MPICH= yes -# MPICH implimentation is not thread safe -CONFIGURE_ARGS+= --with-libdirs="-L${LOCALBASE}/lib -L${LOCALBASE}/mpich/lib" \ - --with-include="-I${LOCALBASE}/mpich/include -I${WRKDIR}" \ - --enable-always-use-mpi \ - --enable-threads=no +.include "${MASTERDIR}/Makefile" diff --git a/science/mpqc/Makefile b/science/mpqc/Makefile index 634eae65442c..db218a1a4589 100644 --- a/science/mpqc/Makefile +++ b/science/mpqc/Makefile @@ -18,10 +18,33 @@ DISTFILES+= mpqc-man-${OLDDISTVERSION}.tar.bz2 mpqc-html-${OLDDISTVERSION}.tar.b MAINTAINER= maho@FreeBSD.org COMMENT= The massively parallel quantum computing library and program +USE_PERL5= yes +USE_GMAKE= yes +USE_BZIP2= yes +ALL_TARGET= # empty +PLIST_SUB+= VERSION=${PORTVERSION} + +.include + .if defined(WITH_ICC) BUILD_DEPENDS+= ${LOCALBASE}/intel_cc_80/bin/icc:${PORTSDIR}/lang/icc .endif -LIB_DEPENDS= atlas:${PORTSDIR}/math/atlas +.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 -lcblas -latlas +LAPACK= -lalapack +.else +LIB_DEPENDS+= blas.1:${PORTSDIR}/math/blas +LIB_DEPENDS+= lapack.3:${PORTSDIR}/math/lapack +BLAS= -lblas +LAPACK= -llapack +.endif +.if defined(WITH_MPICH) +BUILD_DEPENDS+= ${LOCALBASE}/mpich2/lib/libmpich.a:${PORTSDIR}/net/mpich2 +.endif GNU_CONFIGURE= yes USE_AUTOTOOLS= autoconf:259 @@ -32,11 +55,9 @@ CXX= ${LOCALBASE}/intel_cc_80/bin/icpc CFLAGS= -O3 -tpp7 -xMKW -Vaxlib CXXFLAGS= -O3 -tpp7 -xMKW -Vaxlib .endif -BLAS= -lf77blas -latlas -LAPACK= -lalapack -lcblas OLDDISTVERSION= 2.2.3 -CONFIGURE_ARGS= --with-cc=${CC} \ +CONFIGURE_ARGS+=--with-cc=${CC} \ --with-cxx=${CXX} \ --with-f77=${FC} \ --with-libdirs=-L${LOCALBASE}/lib \ @@ -49,15 +70,14 @@ CONFIGURE_ARGS= --with-cc=${CC} \ .if defined(WITH_ICC) CONFIGURE_ARGS+=--with-libs="-lsvml" .endif +.if defined(WITH_MPICH) +CONFIGURE_ARGS+=--with-libdirs="-L${LOCALBASE}/lib -L${LOCALBASE}/mpich2/lib"\ + --with-include="-I${LOCALBASE}/mpich2/include -I${WRKDIR}" \ + --enable-always-use-mpi +.endif -USE_PERL5= yes -USE_GMAKE= yes -USE_BZIP2= yes -ALL_TARGET= # empty -PLIST_SUB+= VERSION=${PORTVERSION} MPQC_COMMAND= ${PREFIX}/bin/mpqc -.include .include "${FILESDIR}/manpages" .if defined(WITH_OPTIMIZED_FLAGS) diff --git a/science/mpqc/files/patch-::configure.in b/science/mpqc/files/patch-::configure.in index f6b5777722f7..ed56f2b77d6f 100644 --- a/science/mpqc/files/patch-::configure.in +++ b/science/mpqc/files/patch-::configure.in @@ -143,3 +143,55 @@ AC_SUBST(HAVE_LAPACK) if test X$HAVE_LAPACK != Xyes; then echo "Could not link to the LAPACK library. It can be obtained at" +--- configure.in~ Sun Nov 19 16:09:19 2006 ++++ configure.in Sun Nov 19 16:11:58 2006 +@@ -513,7 +513,7 @@ + CCA_CHEM_CONFIG=$withval + echo Using cca-chem-config: $withval + ],[ +- if test "$components" == "yes"; then ++ if test "$components" = "yes"; then + AC_PATH_PROG(CCA_CHEM_CONFIG,cca-chem-config,"not-found") + fi + ] +@@ -789,7 +789,7 @@ + ;; + esac + +-if test X$GXX == Xyes; then ++if test X$GXX = Xyes; then + AC_MSG_CHECKING([for C++ cpu tuning flag]) + AC_LANG_SAVE + AC_LANG_CPLUSPLUS +@@ -801,7 +801,7 @@ + AC_MSG_RESULT($cxx_tuneflag) + fi + +-if test X$GCC == Xyes; then ++if test X$GCC = Xyes; then + AC_MSG_CHECKING([for C cpu tuning flag]) + CFLAGS_SAV=$CFLAGS + CFLAGS="-mtune=$opt_target_cpu $CFLAGS_SAV" +@@ -1098,7 +1098,7 @@ + char c[sizeof (long)]; + } u; + u.l = 1; +- exit (u.c[sizeof (long) - 1] == 1); ++ exit (u.c[sizeof (long) - 1] = 1); + }], sc_cv_c_bigendian=no, sc_cv_c_bigendian=yes, + AC_MSG_ERROR([Could not determine endianness and cross compiling]) + ) +@@ -1840,10 +1840,10 @@ + + dnl --------- CCA component configuration --------- + +-if test $components == "yes"; then ++if test $components = "yes"; then + +- if test $HAVE_MPI == "yes" && +- test $HAVE_MPIPP == "no"; then ++ if test $HAVE_MPI = "yes" && ++ test $HAVE_MPIPP = "no"; then + AC_MSG_ERROR([libmpi++ needed for mpi cca components]) + fi + -- cgit