aboutsummaryrefslogtreecommitdiff
path: root/science
diff options
context:
space:
mode:
authorMaho Nakata <maho@FreeBSD.org>2004-03-20 04:50:45 +0000
committerMaho Nakata <maho@FreeBSD.org>2004-03-20 04:50:45 +0000
commit34ce1bef94b1614cf0abfd004fb5a497c2abad1b (patch)
tree1cb618dd8c722d335ab1ccab78d344ec2c0fb29b /science
parented5dc3580f7e41848e140521ab2fd025c1013539 (diff)
downloadports-34ce1bef94b1614cf0abfd004fb5a497c2abad1b.tar.gz
ports-34ce1bef94b1614cf0abfd004fb5a497c2abad1b.zip
A Density functional software. This software has a unique design
based upon the DFT++ algebraic framework introduced in Computer Physics Communications 128, 1-45 (June 2000). This framework allows us to transparently separate the computational guts (cache optimization, parallelization, etc.) from the introduction of new representations (plane waves, wavelets) and new physics (new density functionals, linear response theory, dielectric solutions). The software is fully cache and register optimized, and runs in serial, threaded, MPI and mixed threaded-MPI parallel environments.
Notes
Notes: svn path=/head/; revision=104696
Diffstat (limited to 'science')
-rw-r--r--science/Makefile1
-rw-r--r--science/dft++/Makefile83
-rw-r--r--science/dft++/distinfo8
-rw-r--r--science/dft++/files/patch-makefile-pw26
-rw-r--r--science/dft++/files/patch-makefile-wl11
-rw-r--r--science/dft++/files/patch-makefile.local-pw99
-rw-r--r--science/dft++/files/patch-makefile.local-wl99
-rw-r--r--science/dft++/pkg-descr20
-rw-r--r--science/dft++/pkg-plist11
9 files changed, 358 insertions, 0 deletions
diff --git a/science/Makefile b/science/Makefile
index 9f3cacd009a6..2e8074346b04 100644
--- a/science/Makefile
+++ b/science/Makefile
@@ -9,6 +9,7 @@
SUBDIR += chemtool
SUBDIR += chemtool-devel
SUBDIR += clhep
+ SUBDIR += dft++
SUBDIR += euler
SUBDIR += felt
SUBDIR += flounder
diff --git a/science/dft++/Makefile b/science/dft++/Makefile
new file mode 100644
index 000000000000..3477af569d5c
--- /dev/null
+++ b/science/dft++/Makefile
@@ -0,0 +1,83 @@
+# New ports collection makefile for: dft++
+# Date Created: 18 March 2004
+# Whom: NAKATA Maho <maho@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= dft++
+PORTVERSION= 3.0
+CATEGORIES= science
+MASTER_SITES= http://dft.physics.cornell.edu/src/ \
+ http://dft.physics.cornell.edu/example/:example
+DISTFILES= ${PORTNAME}.v${PORTVERSION}.tar.gz
+.if !defined(NOPORTDOCS)
+DISTFILES+= dft.in:example si_psp.tar:example output:example
+.endif
+DIST_SUBDIR= dft++
+EXTRACT_ONLY= ${PORTNAME}.v${PORTVERSION}.tar.gz
+
+MAINTAINER= maho@FreeBSD.org
+COMMENT= DFT++, A density functional software
+
+LIB_DEPENDS= atlas:${PORTSDIR}/math/atlas\
+ fftw.2:${PORTSDIR}/math/fftw
+
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
+USE_GMAKE= yes
+USE_REINPLACE= yes
+LAPACK= -lalapack -lcblas -lf77blas -lg2c -latlas
+FFTW= -lfftw
+
+.if defined(WITH_OPTIMIZED_FLAGS)
+OPTIMIZED_FLAGS+= -O3 -ffast-math -finline-functions -fomit-frame-pointer -funroll-loops -fexpensive-optimizations -malign-double
+.if (${MACHINE_ARCH} == "i386")
+OPTIMIZED_FLAGS+= -mcpu=i686 -march=i686 -mfancy-math-387 -mpreferred-stack-boundary=3
+.endif # i386
+.endif
+
+pre-patch:
+ ${CP} ${WRKSRC}/makefile ${WRKSRC}/makefile-pw
+ ${CP} ${WRKSRC}/makefile ${WRKSRC}/makefile-wl
+
+pre-configure:
+ @${ECHO} "You can optimize by setting WITH_OPTIMIZED_FLAGS=yes."
+ @${REINPLACE_CMD} -e ' s|%%FC%%|${FC}|g ; \
+ s|%%CC%%|${CC}|g ; \
+ s|%%CXX%%|${CXX}|g ; \
+ s|%%OPTIMIZED_FLAGS%%|${OPTIMIZED_FLAGS}|g ; \
+ s|%%LAPACK%%|${LAPACK}|g ; \
+ s|%%FFTW%%|${FFTW}|g ; \
+ s|%%LOCALBASE%%|${LOCALBASE}|g ; \
+ s|%%FFLAGS%%|${FFLAGS}|g ; \
+ s|%%CFLAGS%%|${CFLAGS}|g ; \
+ s|%%CXXFLAGS%%|${CXXFLAGS}|g ;' ${WRKSRC}/makefile.local-pw
+ @${REINPLACE_CMD} -e ' s|%%FC%%|${FC}|g ; \
+ s|%%CC%%|${CC}|g ; \
+ s|%%CXX%%|${CXX}|g ; \
+ s|%%LAPACK%%|${LAPACK}|g ; \
+ s|%%FFTW%%|${FFTW}|g ; \
+ s|%%OPTIMIZED_FLAGS%%|${OPTIMIZED_FLAGS}|g ; \
+ s|%%FFLAGS%%|${FFLAGS}|g ; \
+ s|%%CFLAGS%%|${CFLAGS}|g ; \
+ s|%%LOCALBASE%%|${LOCALBASE}|g ; \
+ s|%%CXXFLAGS%%|${CXXFLAGS}|g ;' ${WRKSRC}/makefile.local-wl
+
+do-build:
+ @cd ${WRKSRC} ; ${GMAKE} -f makefile-pw dft-pw
+ @cd ${WRKSRC} ; ${GMAKE} -f makefile-pw clean
+ @cd ${WRKSRC} ; ${GMAKE} -f makefile-wl dft-wl
+
+do-install:
+ @${INSTALL_PROGRAM} ${WRKSRC}/dft-pw ${PREFIX}/bin
+ @${INSTALL_PROGRAM} ${WRKSRC}/dft-wl ${PREFIX}/bin
+.if !defined(NOPORTDOCS)
+ @${MKDIR} ${EXAMPLESDIR}
+ @${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/dft.in ${EXAMPLESDIR}
+ @${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/output ${EXAMPLESDIR}
+ @${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/si_psp.tar ${EXAMPLESDIR}
+ @${TAR} xf ${DISTDIR}/${DIST_SUBDIR}/si_psp.tar -C ${EXAMPLESDIR}
+ @${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${EXAMPLESDIR}
+.endif
+
+.include <bsd.port.mk>
diff --git a/science/dft++/distinfo b/science/dft++/distinfo
new file mode 100644
index 000000000000..0f67c8718e04
--- /dev/null
+++ b/science/dft++/distinfo
@@ -0,0 +1,8 @@
+MD5 (dft++/dft++.v3.0.tar.gz) = c8272ef2b9bb955a2c9db8840d08424d
+SIZE (dft++/dft++.v3.0.tar.gz) = 356235
+MD5 (dft++/dft.in) = c8547142048315619f05b98d9041636f
+SIZE (dft++/dft.in) = 3203
+MD5 (dft++/si_psp.tar) = 9f9c86f4bc4b0e4e1c2b0dd46440c282
+SIZE (dft++/si_psp.tar) = 102400
+MD5 (dft++/output) = a33c69fff62e5be5a61c6acbc5ece822
+SIZE (dft++/output) = 245937
diff --git a/science/dft++/files/patch-makefile-pw b/science/dft++/files/patch-makefile-pw
new file mode 100644
index 000000000000..369fee0d0c59
--- /dev/null
+++ b/science/dft++/files/patch-makefile-pw
@@ -0,0 +1,26 @@
+--- makefile-pw~ Sat Mar 20 11:54:12 2004
++++ makefile-pw Sat Mar 20 11:55:09 2004
+@@ -95,18 +95,18 @@
+ # Decide, based on BASIS, which basis to use.
+ #
+ # For plane waves...
+-#BASISOPT = -DPLANEWAVES
+-#BASIS_OBJS = ${PW_OBJS}
++BASISOPT = -DPLANEWAVES
++BASIS_OBJS = ${PW_OBJS}
+ #
+ # For wavelets...
+-BASISOPT = -DWAVELETS -Dnewgridtype
+-BASIS_OBJS = ${WL_OBJS}
++#BASISOPT = -DWAVELETS -Dnewgridtype
++#BASIS_OBJS = ${WL_OBJS}
+
+ #
+ # Include the machine dependent (local) makefile defining compilers,
+ # Linking options, etc. etc.
+ #
+-include makefile.local
++include makefile.local-pw
+
+ #
+ # Object files used to interface to lapack routines (in plain C and F77)
diff --git a/science/dft++/files/patch-makefile-wl b/science/dft++/files/patch-makefile-wl
new file mode 100644
index 000000000000..36923f73645a
--- /dev/null
+++ b/science/dft++/files/patch-makefile-wl
@@ -0,0 +1,11 @@
+--- makefile-wl.org Fri May 23 10:49:12 2003
++++ makefile-wl Sat Mar 20 11:51:51 2004
+@@ -106,7 +106,7 @@
+ # Include the machine dependent (local) makefile defining compilers,
+ # Linking options, etc. etc.
+ #
+-include makefile.local
++include makefile.local-wl
+
+ #
+ # Object files used to interface to lapack routines (in plain C and F77)
diff --git a/science/dft++/files/patch-makefile.local-pw b/science/dft++/files/patch-makefile.local-pw
new file mode 100644
index 000000000000..735f841999da
--- /dev/null
+++ b/science/dft++/files/patch-makefile.local-pw
@@ -0,0 +1,99 @@
+--- /dev/null Sat Mar 20 00:09:42 2004
++++ makefile.local-pw Sat Mar 20 00:01:36 2004
+@@ -0,0 +1,96 @@
++#
++# This makefile is included from 'makefile'. It defines the
++# various machine dependent things such as compiler commands,
++# directories, libraries, etc.
++#
++
++#
++# FFTW directories
++#
++FFTW_DIR = -I%%LOCALBASE%%/include
++FFTW_LIB_DIR = -L%%LOCALBASE%%/lib
++
++#
++# The matrix diagonalization libraries, object, and and compile options
++# (LAPACK, ESSL, or the in-house supplied Jacobi diagonalizer).
++#
++# MATDIAG_OBJ must be either lapackdiagF77.o, essldiagF77.o, or jacobi.o
++# depending on which library you are going to use.
++#
++# MATDIAG_OPTS tells the system which library you will be using (i.e.
++# whether you're linking to lapackdiagF77.o, essldiagF77.o, or jacobi.o).
++# Set it to one of -DDFT_USE_LAPACK, -DDFT_USE_ESSL, or -DDFT_USE_JACOBI
++#
++# MATDIAG_LIB_DIR is the directory where the lapack library lives
++# (needed if the complier can't find it automatically)
++# If using jacobi.o, set it to ".".
++#
++MATDIAG_OBJ = matdiagC.o
++MATDIAG_OPTS = -DDFT_USE_LAPACK
++MATDIAG_LIB_DIR = -L.
++
++#
++# Our libraries: FFTW, math library, and possible LAPACK/BLAS libraries
++#
++LIBS = ${FFTW_LIB_DIR} ${MATDIAG_LIB_DIR} %%LAPACK%% %%FFTW%% -lm
++#
++
++#
++# Optimization options for all compilers
++#
++OPTIM_OPTS = %%OPTIMIZED_FLAGS%%
++
++#
++# Parallelization options: machine dependent ones go here, **PLUS**
++#
++# put -DDFT_THREAD to use POSIX threads (SMP)
++# put -DDFT_MPI to use MPI (DMP)
++# (you can specify both if needed)
++#
++PARALLEL_OPTS =
++
++#
++# Compiler flags for all compilers
++#
++COMPILE_OPTS = -g -I. -Icommands ${FFTW_DIR} \
++ ${OPTIM_OPTS} ${PARALLEL_OPTS} ${MATDIAG_OPTS}
++
++#
++# C++ compiler and options
++#
++CPLUSPLUS = %%CXX%%
++CPLUSPLUSOPTS = ${COMPILE_OPTS}
++
++#
++# C compiler and options
++#
++CC = %%CC%%
++CCOPTS = ${COMPILE_OPTS}
++
++#
++# F77 compiler and options
++#
++F77 = %%FC%%
++F77OPTS = ${COMPILE_OPTS}
++
++#
++# Linker to use
++#
++# Note: on some linux platforms, using ${F77} as the linker works
++# better (then you exclude any -lf2c libraries).
++#
++LINKER = ${CPLUSPLUS}
++
++#
++# Linking options: static/dynamic flags, etc., if any
++#
++LINKOPTS = ${CPLUSPLUSOPTS}
++
++
++
++
++
++
++
++
++
diff --git a/science/dft++/files/patch-makefile.local-wl b/science/dft++/files/patch-makefile.local-wl
new file mode 100644
index 000000000000..e528ab649c11
--- /dev/null
+++ b/science/dft++/files/patch-makefile.local-wl
@@ -0,0 +1,99 @@
+--- /dev/null Sat Mar 20 00:09:42 2004
++++ makefile.local-wl Sat Mar 20 00:01:30 2004
+@@ -0,0 +1,96 @@
++#
++# This makefile is included from 'makefile'. It defines the
++# various machine dependent things such as compiler commands,
++# directories, libraries, etc.
++#
++
++#
++# FFTW directories
++#
++FFTW_DIR = -I%%LOCALBASE%%/include
++FFTW_LIB_DIR = -L%%LOCALBASE%%/lib
++
++#
++# The matrix diagonalization libraries, object, and and compile options
++# (LAPACK, ESSL, or the in-house supplied Jacobi diagonalizer).
++#
++# MATDIAG_OBJ must be either lapackdiagF77.o, essldiagF77.o, or jacobi.o
++# depending on which library you are going to use.
++#
++# MATDIAG_OPTS tells the system which library you will be using (i.e.
++# whether you're linking to lapackdiagF77.o, essldiagF77.o, or jacobi.o).
++# Set it to one of -DDFT_USE_LAPACK, -DDFT_USE_ESSL, or -DDFT_USE_JACOBI
++#
++# MATDIAG_LIB_DIR is the directory where the lapack library lives
++# (needed if the complier can't find it automatically)
++# If using jacobi.o, set it to ".".
++#
++MATDIAG_OBJ = matdiagC.o
++MATDIAG_OPTS = -DDFT_USE_LAPACK
++MATDIAG_LIB_DIR = -L.
++
++#
++# Our libraries: FFTW, math library, and possible LAPACK/BLAS libraries
++#
++LIBS = ${FFTW_LIB_DIR} ${MATDIAG_LIB_DIR} %%LAPACK%% %%FFTW%% -lm
++#
++
++#
++# Optimization options for all compilers
++#
++OPTIM_OPTS = %%OPTIMIZED_FLAGS%%
++
++#
++# Parallelization options: machine dependent ones go here, **PLUS**
++#
++# put -DDFT_THREAD to use POSIX threads (SMP)
++# put -DDFT_MPI to use MPI (DMP)
++# (you can specify both if needed)
++#
++PARALLEL_OPTS =
++
++#
++# Compiler flags for all compilers
++#
++COMPILE_OPTS = -g -I. -Icommands ${FFTW_DIR} \
++ ${OPTIM_OPTS} ${PARALLEL_OPTS} ${MATDIAG_OPTS}
++
++#
++# C++ compiler and options
++#
++CPLUSPLUS = %%CXX%%
++CPLUSPLUSOPTS = ${COMPILE_OPTS}
++
++#
++# C compiler and options
++#
++CC = %%CC%%
++CCOPTS = ${COMPILE_OPTS}
++
++#
++# F77 compiler and options
++#
++F77 = %%FC%%
++F77OPTS = ${COMPILE_OPTS}
++
++#
++# Linker to use
++#
++# Note: on some linux platforms, using ${F77} as the linker works
++# better (then you exclude any -lf2c libraries).
++#
++LINKER = ${CPLUSPLUS}
++
++#
++# Linking options: static/dynamic flags, etc., if any
++#
++LINKOPTS = ${CPLUSPLUSOPTS}
++
++
++
++
++
++
++
++
++
diff --git a/science/dft++/pkg-descr b/science/dft++/pkg-descr
new file mode 100644
index 000000000000..afb9aa34a52c
--- /dev/null
+++ b/science/dft++/pkg-descr
@@ -0,0 +1,20 @@
+DFT++ is a density functional package,
+The software is fully cache and register optimized,
+and runs in serial, threaded, MPI and mixed threaded-MPI parallel
+environments.
+
+For academic users, authors request that publications using results
+obtained with this software reference
+"New algebraic formulation of density functional calculation,"
+by Sohrab Ismail-Beigi and T.A. Arias, Computer Physics Communications
+128:1-2, 1-45 (June 2000). and, if using the wavelet basis, further reference
+"Multiresolution analysis of electronic structure: semicardinal
+and wavelet bases,"
+T.A. Arias, Reviews of Modern Physics 71:1, 267-311 (January 1999).
+and "Robust ab initio calculation of condensed matter: transparent
+convergence through semicardinal multiresolution analysis,'' I.P. Daykov,
+T.A. Arias, and Torkel D. Engeness, Physical Review Letters,
+90:21, 216402 (May 2003).
+
+documents are available at http://dft.physics.cornell.edu/doc/
+WWW: http://dft.physics.cornell.edu/
diff --git a/science/dft++/pkg-plist b/science/dft++/pkg-plist
new file mode 100644
index 000000000000..200e8110e904
--- /dev/null
+++ b/science/dft++/pkg-plist
@@ -0,0 +1,11 @@
+bin/dft-pw
+bin/dft-wl
+%%EXAMPLESDIR%%/dft.in
+%%EXAMPLESDIR%%/output
+%%EXAMPLESDIR%%/si_psp.tar
+%%EXAMPLESDIR%%/Si/loc.1002.02
+%%EXAMPLESDIR%%/Si/nl.d.501.02
+%%EXAMPLESDIR%%/Si/nl.p.501.02
+%%EXAMPLESDIR%%/Si/si.pot
+@dirrm %%EXAMPLESDIR%%/Si
+@dirrm %%EXAMPLESDIR%%