Date: Mon, 15 Jul 2002 15:46:14 -0700 (PDT) From: Nakata Maho <chat95@mbox.kyoto-inet.or.jp> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/40631: Update port science/mpqc and new slave port science/mpqc-mpich Message-ID: <200207152246.g6FMkEqa091026@www.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 40631 >Category: ports >Synopsis: Update port science/mpqc and new slave port science/mpqc-mpich >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Jul 15 15:50:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Nakata Maho >Release: 4.6-stable >Organization: private >Environment: ]% uname -a FreeBSD debussy.private.org 4.6-STABLE FreeBSD 4.6-STABLE #0: Sun Jul 14 07:04:47 JST 2002 maho@debussy.private.org:/work/cvsup/src/sys/compile/MAHO-DEBUSSY-4.x-STABLE i386 >Description: Mr. Glenn Johnson reported that science/mpqc is broken. I fixed this problem with some enhancements. 1. using math/atlas(added lapack, blas flags for other choices of lapack, blas package) It improves the performance for few percent. 2. override CFLAGS, FFLAGS for C++, C, FORTRAN compiler 3. override CC, F77, C++ for other choices of C++, C, FORTRAN compiler 4. support for parallel computing using MPI. I prepared new port, named scinece/mpqc-mpich, it is also included in shar form. MPQC means, massively parallel quantum computing, so support for it, is mandatory!! I confirmed this port really works. I also did work for net/mpich to remove "BROKEN". See http://www.freebsd.org/cgi/cvsweb.cgi/ports/net/mpich/ 5. since mpich is not thread safe, I get away thread options from Makefile. And with current Makefile, mpqc do not find thread library. 6. The maintainer is not actively working. If it is possible I would like to be a mainiainer for it. I have some ideas which enhance the mpqc port. >How-To-Repeat: In file included from ../../../../../src/lib/chemistry/qc/basis/petite.h:37, from integral.cc:35: ./../../../../src/lib/util/misc/scint.h:130: #error defaults not correct; you must hand modify scint.h gmake[5]: *** [integral.o] Error 1 gmake[5]: Leaving directory `/usr/ports/science/mpqc/work/mpqc-2.1.1/src/lib/ch\ emistry/qc/basis' gmake[4]: *** [default] Error 1 gmake[4]: Leaving directory `/usr/ports/science/mpqc/work/mpqc-2.1.1/src/lib/chemistry/qc' gmake[3]: *** [default] Error 1 gmake[3]: Leaving directory `/usr/ports/science/mpqc/work/mpqc-2.1.1/src/lib/chemistry' gmake[2]: *** [default] Error 1 gmake[2]: Leaving directory `/usr/ports/science/mpqc/work/mpqc-2.1.1/src/lib' gmake[1]: *** [default] Error 1 gmake[1]: Leaving directory `/usr/ports/science/mpqc/work/mpqc-2.1.1/src' gmake: *** [default] Error 1 *** Error code 2 Stop in /usr/ports/science/mpqc. >Fix: diff -urN /work/cvsup/ports/science/mpqc/Makefile mpqc/Makefile --- /work/cvsup/ports/science/mpqc/Makefile Tue Jun 18 04:39:34 2002 +++ mpqc/Makefile Tue Jul 16 06:51:43 2002 @@ -12,17 +12,22 @@ MAINTAINER= batman@udel.edu -LIB_DEPENDS= blas:${PORTSDIR}/math/blas \ - lapack:${PORTSDIR}/math/lapack +LIB_DEPENDS= lapack:${PORTSDIR}/math/lapack \ + atlas:${PORTSDIR}/math/atlas +BUILD_DEPENDS= bison:${PORTSDIR}/devel/bison USE_BISON= yes GNU_CONFIGURE= yes -CONFIGURE_ARGS= --with-libdirs=-L${LOCALBASE}/lib +CONFIGURE_ARGS= --with-libdirs=-L${PREFIX}/lib --prefix=${PREFIX} --with-blas="-lf77blas -latlas" --with-lapack="-lalapack -lcblas" --with-coptflags="${CFLAGS}" --with-cxxoptflags="${CFLAGS}" --with-f77optflags="${FFLAGS}" USE_PERL5= yes USE_GMAKE= yes +USE_REINPLACE= yes ALL_TARGET= # empty +USE_AUTOCONF= yes -post-patch: - @${PERL} -pi -e "s,-lpthreads,${PTHREAD_LIBS},g" ${WRKSRC}/configure +pre-configure: + @${ECHO} "You can override and CFLAGS on the command line." + @${ECHO} "Following is a recommended one." + @${ECHO} "make CFLAGS=\"-malign-double -fexpensive-optimizations -O4 -ffast-math -funroll-loops\"" .include <bsd.port.mk> diff -urN /work/cvsup/ports/science/mpqc/files/patch-::configure.in mpqc/files/patch-::configure.in --- /work/cvsup/ports/science/mpqc/files/patch-::configure.in Thu Jan 1 09:00:00 1970 +++ mpqc/files/patch-::configure.in Tue Jul 16 06:44:52 2002 @@ -0,0 +1,150 @@ +--- configure.in.orig Sun Apr 21 11:36:19 2002 ++++ configure.in Tue Jul 16 06:44:27 2002 +@@ -334,6 +334,31 @@ + + ac_default_prefix="/usr/local/mpqc/$SC_VERSION" + ++AC_ARG_WITH(blas, ++[ --with-blas Gives BLAS name you use(e.g., -lblas).], ++BLASNAME=$withval ++) ++ ++AC_ARG_WITH(lapack, ++[ --with-lapack Gives LAPACK name you use(e.g., -llapack).], ++LAPACKNAME=$withval ++) ++ ++AC_ARG_WITH(cxxoptflags, ++[ --with-cxxoptflags Gives the C++ compiler optimization flags to use.], ++CXXOPTFLAGS=$withval ++) ++ ++AC_ARG_WITH(ccoptflags, ++[ --with-ccoptflags Gives the C compiler optimization flags to use.], ++CCOPTFLAGS=$withval ++) ++ ++AC_ARG_WITH(f77optflags, ++[ --with-f77optflags Gives the FORTRAN 77 optimization compiler flags to use.], ++F77OPTFLAGS=$withval ++) ++ + AC_ARG_WITH(cc, + [ --with-cc Gives the name of the C compiler to use.], + CC=$withval +@@ -636,6 +661,23 @@ + ;; + esac + ++if test "$CCOPTFLAGS" = NONE; then ++else ++ echo "overrides the cc optimization flag with $CCOPTFLAGS" ++ COPTIONS_OPT="$CCOPTFLAGS" ++fi ++if test "$CXXOPTFLAGS" = NONE; then ++else ++ echo "overrides the c++ optimization flag with $CXXOPTFLAGS" ++ CXXOPTIONS_OPT="$CXXOPTFLAGS" ++fi ++ ++if test "$F77OPTFLAGS" = NONE; then ++else ++ echo "overrides the Fortrna 77 optimization flag with $F77OPTFLAGS" ++ F77OPTIONS_OPT="$F77OPTFLAGS" ++fi ++ + dnl -- special architecture options -- + + AC_MSG_CHECKING([for special architecture options]) +@@ -839,10 +881,12 @@ + elif test $DEBUG = opt; then + CFLAGS="$COPTIONS_DBG $COPTIONS_OPT $COPTIONS_MISC" + CXXFLAGS="$CXXOPTIONS_DBG $COPTIONS_OPT $CXXOPTIONS_MISC" ++ FFLAGS="$F77OPTIONS_OPT" + LDFLAGS="$LDFLAGS -g" + else + CFLAGS="$COPTIONS_OPT $COPTIONS_MISC" + CXXFLAGS="$CXXOPTIONS_OPT $CXXOPTIONS_MISC" ++ FFLAGS="$F77OPTIONS_OPT" + fi + + AC_SUBST(EXTRAINCLUDE) +@@ -979,6 +1023,19 @@ + AC_LANG_RESTORE + fi + ++dnl see if posix threads are in -pthreads ++if test $HAVE_PTHREAD = no; then ++AC_LANG_SAVE ++AC_LANG_CPLUSPLUS ++LIBSSAV="$LIBS" ++LIBS="$LIBS -pthread" ++AC_TRY_LINK([#include <pthread.h>],[pthread_join(0,0);],[ ++HAVE_PTHREAD=yes],[ ++HAVE_PTHREAD=no ++LIBS="$LIBSSAV"]) ++AC_LANG_RESTORE ++fi ++ + AC_MSG_RESULT($HAVE_PTHREAD) + fi + if test X$HAVE_PTHREAD = Xyes; then +@@ -1280,18 +1337,26 @@ + LIBS="$LIBSSAV $FLIBS" + + LIBBLAS="" ++ + F77_DGEMM=`$PERL $srcdir/bin/mkf77sym.pl.in -method $F77_SYMBOLS DAXPY` +-AC_CHECK_FUNC($F77_DGEMM,HAVE_BLAS=yes,[ +- AC_CHECK_LIB(essl,$F77_DGEMM,[HAVE_BLAS=yes;LIBBLAS="-lessl"], +- AC_CHECK_LIB(blas,$F77_DGEMM,[HAVE_BLAS=yes;LIBBLAS="-lblas"]) +- )] +-) +-if test X$HAVE_BLAS != Xyes; then +- LIBSSAV2="$LIBS" +- LIBS="-latlas $LIBS" +- AC_CHECK_LIB(f77blas,$F77_DGEMM,[HAVE_BLAS=yes;LIBBLAS="-lf77blas -latlas"], +- LIBS="$LIBSSAV2") ++ ++if test "$BLASNAME" = NONE; then ++ AC_CHECK_FUNC($F77_DGEMM,HAVE_BLAS=yes,[ ++ AC_CHECK_LIB(essl,$F77_DGEMM,[HAVE_BLAS=yes;LIBBLAS="-lessl"], ++ AC_CHECK_LIB(blas,$F77_DGEMM,[HAVE_BLAS=yes;LIBBLAS="-lblas"]) ++ )] ++ ) ++ if test X$HAVE_BLAS != Xyes; then ++ LIBSSAV2="$LIBS" ++ LIBS="-latlas $LIBS" ++ AC_CHECK_LIB(f77blas,$F77_DGEMM,[HAVE_BLAS=yes;LIBBLAS="-lf77blas -latlas"], ++ LIBS="$LIBSSAV2") ++ fi ++else ++ HAVE_BLAS="yes" ++ LIBBLAS="$BLASNAME" + fi ++ + AC_SUBST(HAVE_BLAS) + if test X$HAVE_BLAS != Xyes; then + echo "WARNING: Could not link to the BLAS library. It can be obtained at" +@@ -1304,10 +1369,17 @@ + + LIBLAPACK="" + F77_DGESVD=`$PERL $srcdir/bin/mkf77sym.pl.in -method $F77_SYMBOLS DGESVD` +-AC_CHECK_FUNC($F77_DGESVD,HAVE_LAPACK=yes,[ +- AC_CHECK_LIB(lapack,$F77_DGESVD,[HAVE_LAPACK=yes;LIBLAPACK="-llapack"] +- )] +-) ++ ++if test "$LAPACKNAME" = NONE; then ++ AC_CHECK_FUNC($F77_DGESVD,HAVE_LAPACK=yes,[ ++ AC_CHECK_LIB(lapack,$F77_DGESVD,[HAVE_LAPACK=yes;LIBLAPACK="-llapack"] ++ )] ++ ) ++else ++ HAVE_LAPACK="yes" ++ LIBLAPACK="$LAPACKNAME" ++fi ++ + AC_SUBST(HAVE_LAPACK) + if test X$HAVE_LAPACK != Xyes; then + echo "Could not link to the LAPACK library. It can be obtained at" diff -urN /work/cvsup/ports/science/mpqc/files/patch-misc::scint.h mpqc/files/patch-misc::scint.h --- /work/cvsup/ports/science/mpqc/files/patch-misc::scint.h Thu Jan 1 09:00:00 1970 +++ mpqc/files/patch-misc::scint.h Sat Jul 6 01:47:15 2002 @@ -0,0 +1,11 @@ +--- src/lib/util/misc/scint.h.org Sat May 4 13:26:17 2002 ++++ src/lib/util/misc/scint.h Sat May 4 13:26:30 2002 +@@ -117,7 +117,7 @@ + + # ifdef ULLONG_MAX + //# if ULLONG_MAX == 18446744073709551615 // 2**64 - 1 +-# if ULONGLONG_MAX == (0xffffffffffffffffuLL) // uLL reqd for xlC ++# if ULLONG_MAX == (0xffffffffffffffffuLL) // uLL reqd for xlC + typedef long long sc_intmax_t; + typedef unsigned long long sc_uintmax_t; + typedef long long sc_int64_t; # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # mpqc-mpich/Makefile # echo x - mpqc-mpich/Makefile sed 's/^X//' >mpqc-mpich/Makefile << 'END-of-mpqc-mpich/Makefile' X# New ports collection makefile for: mpqc-mpich X# Date created: 27 April 2001 X# Whom: Nakata Maho <chat95@mbox.kyoto-inet.or.jp> X# X# $FreeBSD$ X# X XMASTERDIR= ${.CURDIR}/../mpqc/ X X.include "${.CURDIR}/../mpqc/Makefile" X XLIB_DEPENDS= lapack:${PORTSDIR}/math/lapack \ X atlas:${PORTSDIR}/math/atlas XBUILD_DEPENDS= ${LOCALBASE}/mpich/lib/libmpich.a:${PORTSDIR}/net/mpich X X# MPICH implimentation is not thread safe XCONFIGURE_ARGS= --with-libdirs="-L${PREFIX}/lib -L${PREFIX}/mpich/lib" --prefix=${PREFIX} --with-blas="-lf77blas -latlas" --with-lapack="-lalapack -lcblas" --with-coptflags="${CFLAGS}" --with-cxxoptflags="${CFLAGS}" --with-f77optflags="${FFLAGS}" --with-include=-I${PREFIX}/mpich/include --enable-always-use-mpi --enable-threads=no END-of-mpqc-mpich/Makefile exit >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200207152246.g6FMkEqa091026>