Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 247b28499c443e092731ffba814075f2 > files > 1026

mpqc-html-2.3.1-9mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>MPQC: Compiling</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.9 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li class="current"><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1><a class="anchor" name="compile">Compiling </a></h1><ul>
<li>
<a class="el" href="compile.html#compilepre">Prerequisites</a> </li>
<li>
<a class="el" href="compile.html#compilepreopt">Optional Packages</a> </li>
<li>
<a class="el" href="compile.html#compileconf">Configuration</a> <ul>
<li>
<a class="el" href="compile.html#compilecca">Notes on CCA Configuration</a> </li>
</ul>
</li>
<li>
<a class="el" href="compile.html#compilecomp">Compilation</a> </li>
<li>
<a class="el" href="compile.html#compilecheck">Checking the Compilation</a> </li>
</ul>
<h2><a class="anchor" name="compilepre">
Prerequisites</a></h2>
Make sure that you have the following programs available. Most can be found at any GNU software FTP repository.<p>
<ul>
<li>
Compilers for the C, C++, and FORTRAN languages are needed. The FORTRAN compiler is used to determine the linkage conventions for the BLAS libraries, however, you can turn off the use of a FORTRAN compiler by giving <code>--without-f77</code> as an option to the configure script, however, this will not work unless you only want the utility libraries. The compilers listed below are known to work. Other ISO C++ compilers should work as well.<p>
<ul>
<li>
GCC 2.96 and later, available from <a href="http://gcc.gnu.org">http://gcc.gnu.org</a>. However, the 3.0 and 3.0.1 releases of GCC are not recommended.<p>
</li>
<li>
IBM xlC 5.0.2 and later work with both 32 and 64 bit modes Use the versions of the compilers with the "_r" appended to the name, since SC uses multi-threading. You must also specify that RTTI is used: <code>--with-cxx='xlC_r -qrtti'</code>.<p>
</li>
<li>
Compaq/Alpha/Linux with Compaq C++ 6.3.6.8 and later work. Special configure options are needed: <code>--with-cxx='cxx -D__USE_STD_IOSTREAM'</code><p>
</li>
<li>
The Intel 5.0.1 Linux compilers for IA-32 work. Version 5.0.1 for IA-64 will not work.<p>
</li>
<li>
The KAI version 4.0e1 compiler works. Special configure options are needed: <code>--with-cxx='KCC --one_instantiation_per_object' --with-ar=KCC --with-ar-flags=-o</code><p>
</li>
</ul>
<p>
</li>
<li>
The Basic Linear Algebra Subprograms (BLAS) are required. A prepackaged version of BLAS is available for most machines. Consult you operating system documentation for more information. If precompiled BLAS routines are not available for your machine, the source can be obtained from <a href="http://www.netlib.org/blas">http://www.netlib.org/blas</a>. The file blas.tgz contains the source for all of the BLAS routines. If the BLAS library is not named libblas.a or is not installed in the default library search path, then configure must be given --with-libs, --with-libdirs, or both.<p>
</li>
<li>
The Linear Algebra Package (LAPACK) 3.0 is required. A prepackaged version of LAPACK is available for most machines. Consult you operating system documentation for more information. If a precompiled LAPACK is not available for your machine, the source can be obtained from <a href="http://www.netlib.org/lapack">http://www.netlib.org/lapack</a>. The file lapack.tgz contains the source for all of the LAPACK routines. If the LAPACK library is not named liblapack.a or is not installed in the default library search path, then configure must be given --with-libs, --with-libdirs, or both.<p>
</li>
<li>
If you modify the scanner source file, then a lexical analyzer generator is required to generate code to read input files. The flex program is used for this purpose. However, the most common version of flex, 2.5.4a, does not generate legal C++. It may be necessary to download, compile, and install a more recent version of flex from <a href="http://lex.sourceforge.net">http://lex.sourceforge.net</a>.<p>
Make sure that <code>FlexLexer.h</code> from flex is in your include path. You may need to give the path to <code>FlexLexer.h</code> to configure with an argument that looks something like: <code>--with-include=-I/usr/local/include</code><p>
</li>
<li>
If you modify a parser source file, then GNU bison (version 1.24 or greater) is needed. This is a parser generator used to generate code to read input files.<p>
</li>
<li>
GNU gmake (version 3.70 or greater): GNU specific extensions to make are used extensively.<p>
</li>
<li>
perl: This is used to convert template classes to macros, generate and check the validation suite etc. To compile SC, either perl 4 or perl 5 will work. To generate the validation inputs and automatically check the outputs, perl 5.003 or later is needed.<p>
</li>
</ul>
<h2><a class="anchor" name="compilepreopt">
Optional Packages</a></h2>
The following packages are not necessary to compile MPQC, but may provide additional features.<p>
<ul>
<li>
A Message Passing Interface (MPI) is required to use MPQC in parallel on distributed memory machines.<p>
</li>
<li>
The parallel MP2 and MP2-R12 methods require direct access to remote memory. This requires one of two features: A thread-safe MPI (<a href="http://www.mpi-softtech.com">MPI Software Technology, Inc.</a> has developed a thread-safe MPI) or the <a href="http://www.emsl.pnl.gov/docs/parsoft/armci/">Aggregate Remote Memory Copy Interface (ARMCI)</a>. These respectively permit remote memory access through the ARMCIMemoryGrp and the MTMPIMemoryGrp classes, respectively.<p>
</li>
<li>
Libint (version 1.1.0 or higher): This is a machine-generated library that can be used for evaluation of certain molecular integrals. IntegralCints and MBPT2_R12 classes depend on this library. The library is freely available under GNU Public License (GPL) from <a href="http://www.ccmst.gatech.edu/evaleev/libint/">www.ccmst.gatech.edu/evaleev/libint/</a>.<p>
</li>
<li>
Cca-chem-generic (version 0.2.0 or higher, and associated CCA tools): This package allows both stand-alone and embedded component applications to be formed using MPQC-based components. Visit the <a href="http://cca-forum.org/~cca-chem">CCA Chemistry Component Toolkit Homepage</a> for information on the freely available source code.<p>
</li>
</ul>
<h2><a class="anchor" name="compileconf">
Configuration</a></h2>
You can build MPQC in the source code directory or you can make a companion directory which will be used to hold all of the files generated by the compilation. You may name this directory anything you want. Typically, this directory is named to indicate the architecture (e.g. <code>mpqc.i686-linux</code>) and will be referred to as the target directory below.<p>
In the target directory execute the <code>configure</code> command which is located in the SC source directory. Use the absolute pathname to the configure script. This command should build a hierarchy of target directories and the necessary makefiles. Do a <code>configure --help</code> to see a list of options. Options are specified with an equals sign, as in <code>configure --prefix=/usr/local</code>. Some options, such as all the <code>enable</code> and <code>disable</code> options, do not require an argument. Useful options to configure include:<p>
<dl>
<dt><code>--prefix</code></dt>
<dd>Specifies the installation directory. The default is <code>/usr/local/mpqc/</code><em>version-number</em><p>
</dd>
<dt><code>--enable-debug</code></dt>
<dd>Options for debugging will be given to the compiler. Use <code>--enable-debug=opt</code> to use both debugging and optimization options.<p>
</dd>
<dt><code>--with-default-parallel</code></dt>
<dd>Gives the default parallism specializations. Can be <code>none</code> for no default or <code>mtmpi</code> for MTMPIMemoryGrp (MPI must be fully thread-safe) and MPIMessageGrp specializations. The parallelism model can be overridden with command line arguments or environmental variables.<p>
</dd>
<dt><code>--enable-always-use-mpi</code>This can be given if MPIMessageGrp is to be the only MessageGrp that will be used. This option should be given if the real argc and argv must be given to MPI_Init. </dt>
<dd></dd>
<dt><code>--disable-parallel</code></dt>
<dd>Do not try to find communications libraries.<p>
</dd>
<dt><code>--disable-threads</code></dt>
<dd>Do not try to find the multi-thread libraries.<p>
</dd>
<dt><code>--enable-shared</code></dt>
<dd>Use shared libraries. This will reduce the size of executables, if shared libraries are supported on your system.<p>
</dd>
<dt><code>--disable-static</code></dt>
<dd>Do not build libraries for static linking.<p>
</dd>
<dt><code>--enable-ref-debug</code></dt>
<dd>Check for overwrites and overflows of reference counts. Implied by ``--enable-debug''.<p>
</dd>
<dt><code>--disable-ref-macros</code></dt>
<dd>Use template classes for reference counting. The default is to use a CPP macro to generate a class definition.<p>
</dd>
<dt><code>--enable-cross-compile</code></dt>
<dd>If this option is set then the configure script will take care to not execute any compiled test programs.<p>
</dd>
<dt><code>--enable-shared-libs</code></dt>
<dd>This will generate shared objects and link with them instead of standard ``.a'' libraries. This works on a Linux-ELF system.<p>
</dd>
<dt><code>--enable-components</code></dt>
<dd>This will generate CCA components and enable embedded CCA frameworks within MPQC.<p>
</dd>
<dt><code>--with-build-id</code></dt>
<dd>This is used to generate unique shared library names and a unique default prefix for an MPQC installation. Unique shared library names must be used used by package distributors if a non-official ABI is used. The official ABI is GCC-3.2. Earlier versions of GCC are not compatible. Installations with multiple C++ compilers that use shared libraries should use --with-build-id to avoid accidentally dynamically linking with the wrong libraries.<p>
</dd>
<dt><code>--with-default-memory</code></dt>
<dd>This specifies the default memory allocation, which is used in absense of the memory&gt; keyword in user's input. The default is 32 million bytes (roughly, 32 MB).<p>
</dd>
<dt><code>--with-cc</code></dt>
<dd>Gives the name of the C compiler.<p>
</dd>
<dt><code>--with-cc-optflags</code></dt>
<dd>By default configure will attempt to guess a reasonable set of optimization flags. These flags will be overridden by the argument given to this keyword.<p>
</dd>
<dt><code>--with-cxx</code></dt>
<dd>Gives the name of the C++ compiler.<p>
</dd>
<dt><code>--with-cxx-optflags</code></dt>
<dd>By default configure will attempt to guess a reasonable set of optimization flags. These flags will be overridden by the argument given to this keyword.<p>
</dd>
<dt><code>--with-f77</code></dt>
<dd>Gives the name of the FORTRAN compiler.<p>
</dd>
<dt><code>--without-f77</code></dt>
<dd>configure will not try to find a FORTRAN compiler. This can only be used if nothing more than the utility libraries are needed.<p>
</dd>
<dt><code>--with-ranlib</code></dt>
<dd>Gives the name of the archive indexing utility.<p>
</dd>
<dt><code>--with-ar</code></dt>
<dd>Gives the name of the program that makes libraries.<p>
</dd>
<dt><code>--with-ld</code></dt>
<dd>Gives the name of the object linker.<p>
</dd>
<dt><code>--with-include</code></dt>
<dd>Gives directories in which include files should be sought. For example, <code>--with-include="-I/u/local/inc -I/u/cljanss/include"</code><p>
</dd>
<dt><code>--with-libs</code></dt>
<dd>Specifies libraries that executables should be linked with. For example, <code>--with-libs=-llapack_IRIX.a</code>.<p>
</dd>
<dt><code>--with-libdirs</code></dt>
<dd>Gives the directories in which libraries should be sought. For example, <code>--with-libdirs=-L/usr/local/lib64</code>.<p>
</dd>
<dt><code>--with-cca-chem-config</code></dt>
<dd>Specifies the config script for the cca-chem-generic package (prerequisite for CCA components).<p>
</dd>
</dl>
<p>
If you would like to further customize your target directory, you can edit <code><a class="el" href="scconfig_8h_source.html">src/lib/scconfig.h</a></code> and <code>lib/LocalMakefile</code> to suit your needs. The next time you run configure, these files and all the makefiles will be overwritten.<h3><a class="anchor" name="compilecca">
Notes on CCA Configuration</a></h3>
<ul>
<li>
Use the <code>--enable-components</code> flag to generate CCA components and enable embedded frameworks within MPQC. </li>
<li>
The <code>cca-chem-config</code> script must be found in the user's path or specified using the <code>--with-cca-chem-config</code>. </li>
<li>
To fully support runtime configuration of component applications, compile using <code>--enable-shared</code>. </li>
<li>
Run <code>make install_devel</code> after compiling to install the <code>sc-config</code> script (required by <code>cca-chem-apps</code>). </li>
</ul>
<h2><a class="anchor" name="compilecomp">
Compilation</a></h2>
Now you are ready to build the libraries and executables. Do this by typing <code>make</code> in your target directory. If you are running on a symmetric multi-processor, you can use GNU make to parallelize the compilation. To compile four files at a time, type <code>make -j4</code>. This feature works correctly with GNU make version 3.78.1 or later; for older versions of GNU make use <code>make JOBS=-j4</code>.<p>
You can install the executables and data files with <code>make install</code>.<p>
You can install the libraries and header files with <code>make install_devel</code>, however, <code>make install</code> must be also be run to install the files needed for run-time support.<h2><a class="anchor" name="compilecheck">
Checking the Compilation</a></h2>
See <a class="el" href="mpqcval.html">Validating MPQC</a> for instructions for checking your compilation. </div>
<hr>
<address>
<small>

Generated at Wed Oct 14 14:12:12 2009 for <a
href="http://www.mpqc.org">MPQC</a>
2.3.1 using the documentation package <a
href="http://www.doxygen.org">Doxygen</a>
1.5.9.

</small>
</address>
</body>
</html>