The primary reason to use libint compiler is to generate custom Libint libraries. Most advanced customization, such as implementation of new integral types, recurrence relations, and computation strategies, will require making changes to the compiler. If you are interested in working on the compiler code please consider consulting with one of Libint authors, if possible, to avoid duplication of effort.
prerequisites
Robust C++ compiler with "some" C++0x support. On a Mac, clang and icc both work with '-std=c++0x' flag;
make a separate directory where you will build the compiler (WARNING: BUILD DIRECTORY CANNOT BE LOCATED WITHIN THE SOURCE TREE), and enter that directory
pick the appropriate configure command-line options (see the next section for more info). All available options can be listed as such: [libint_srcdir]/configure --help. Some information can be passed to configure via standard environmental variables:
CPPFLAGS can be used if boost library is not in the default compiler search path: configure CPPFLAGS='-I/path/to/boost'
CXX can be used to specify the C++ compiler to be used: configure CXX='clang++'
CXXFLAGS can be used to specify the C++ compiler flags: configure CXXFLAGS='-std=c++0x'
run configure
configuring libint compiler
These are the most useful configure options:
--enable-eri=N Use this option to enable support for N-th order
derivatives of (4-center) electron repulsion integrals. To disable support for ERIs set N to 'no', or use the --disable-eri option. By default, N=0 (i.e. no derivatives are requested).
--enable-eri3=N Same as --enable-eri, except for 3-center ERIs.
--enable-eri2=N Same as --enable-eri, except for 2-center ERIs.
--with-max-am=L Species the maximum angular momentum
level for the Gaussian basis functions when computing electron repul-
sion integrals. By default, integrals over g-type functions (L=4) are
supported.
--with-cartgauss-ordering=ORDER Specifies the ordering of cartesian Gaussians in shells. The known values are:
standard (default) standard ordering (xxx, xxy, xxz, xyy, xyz, xzz, yyy, ...)
this will produce a tarball of libint library that is suitable for independent distribution (it will have its own configure, etc.):
1. make export
compiling libint library
Compilation of the generated library is straightforward:
1. Unpack the library: tar -xvzf libint-2.0.0-stable.tgz
2. cd libint-2.0.0-stable
3. ./configure --prefix=.... CXX=... CXXFLAGS=....
4. make
5. make install
It is very important to use the C++ compiler and compiler options that are appropriate for the given platform. It is impossible to provide specific recommendations for specific platforms. We recommend to use a vendor compiler (e.g., Intel) before trying clang++ and g++. In some situations, however, clang++ and g++ are known to outperform the x86 vendor compiler, so we recommend trying several compilers.
Other important configure flags are described in the next section.
libint library configure options
Besides --prefix and CXX and CXXFLAGS, the following configure options may be necessary/useful:
--with-real-type=TYPE specifies the data type used by the library. The default is "double" (double-precision floating-point real). The following values are also valid:
"libint2::simd::VectorSSEDouble" -- vector of 2 packed doubles that can be used with SSE2 instructions available on all x86 platforms;
"libint2::simd::VectorSSEFloat" -- vector of 4 packed floats that can be used with SSE instructions available on all x86 platforms;
"libint2::simd::VectorAVXDouble" -- vector of 4 packed doubles that can be used with AVX instructions available on recent x86 hardware (Intel Sandy Bridge and AMD Bulldozer);
"libint2::simd::VectorQPXDouble" -- vector of 4 packed doubles that can be used with QPX instructions available on recent PowerPC hardware (IBM Blue Gene/Q);
"libint2::simd::VectorFP2Double" -- vector of 2 packed doubles that can be used with FP2 (Double Hummer) instructions available on older PowerPC hardware (IBM Blue Gene/P).
N.B. When SIMD data types are used by Libint, integral sets will be computed in sets of 2 (4). To activate support SIMD it may be necessary provide additional compiler flags -- please refer to your compiler documentation.
why use the libint compiler
The primary reason to use libint compiler is to generate custom Libint libraries. Most advanced customization, such as implementation of new integral types, recurrence relations, and computation strategies, will require making changes to the compiler. If you are interested in working on the compiler code please consider consulting with one of Libint authors, if possible, to avoid duplication of effort.
prerequisites
getting the source code
The only way to get the compiler source is via the source code repository:
hg clone http://hg.code.sf.net/p/libint/mercurial libint-mercurial
compiling libint compiler
configuring libint compiler
These are the most useful configure options:
derivatives of (4-center) electron repulsion integrals. To disable support for ERIs set N to 'no', or use the --disable-eri option. By default, N=0 (i.e. no derivatives are requested).
level for the Gaussian basis functions when computing electron repul-
sion integrals. By default, integrals over g-type functions (L=4) are
supported.
generating libint library
this will produce a tarball of libint library that is suitable for independent distribution (it will have its own configure, etc.):
1. make export
compiling libint library
Compilation of the generated library is straightforward:
1. Unpack the library: tar -xvzf libint-2.0.0-stable.tgz
2. cd libint-2.0.0-stable
3. ./configure --prefix=.... CXX=... CXXFLAGS=....
4. make
5. make install
It is very important to use the C++ compiler and compiler options that are appropriate for the given platform. It is impossible to provide specific recommendations for specific platforms. We recommend to use a vendor compiler (e.g., Intel) before trying clang++ and g++. In some situations, however, clang++ and g++ are known to outperform the x86 vendor compiler, so we recommend trying several compilers.
Other important configure flags are described in the next section.
libint library configure options
Besides --prefix and CXX and CXXFLAGS, the following configure options may be necessary/useful:
N.B. When SIMD data types are used by Libint, integral sets will be computed in sets of 2 (4). To activate support SIMD it may be necessary provide additional compiler flags -- please refer to your compiler documentation.
using libint library
refer to Libint Programmer's Manual for (brief) information on how to use the library in your code.
Last edit: Edward Valeev 2012-08-27