Main Page Class Hierarchy Compound List File List Compound Members Related Pages
Compiling
These instructions are for a machine running Unix or a Unix-like system. The codes work under recent versions of Linux, AIX, and IRIX at least. The vendor's compiler for each of these systems should work.
Prerequisites
Make sure that you have the following programs available. Most can be found at any GNU software FTP repository.
- 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
--without-f77
as an option to the configure script, however, this will cause problems unless you only want the utility libraries. The compilers listed below are known to work. Other ISO C++ compilers should work as well.
- GCC 2.96 and later, available from http://gcc.gnu.org. However, the 3.0 and 3.0.1 releases of GCC are not recommended.
- 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:
--with-cxx='xlC_r -qrtti'
.
- Compaq/Alpha/Linux with Compaq C++ 6.3.6.8 and later work. Special configure options are needed:
--with-cxx='cxx -D__USE_STD_IOSTREAM'
- The Intel 5.0.1 Linux compilers for IA-32 work. Version 5.0.1 for IA-64 will not work.
- The KAI version 4.0e1 compiler works. Special configure options are needed:
--with-cxx='KCC --one_instantiation_per_object' --with-ar=KCC --with-ar-flags=-o
- The Basic Linear Algebra Subprograms (BLAS) are required. They can be obtained from http://www.netlib.org/blas. 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.
- The Linear Algebra Package (LAPACK) 3.0 is required. It can be obtained from http://www.netlib.org/lapack. If 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.
- GNU flex, version 2.5.4a, patched: This is a lexical analyzer generator used to generate code to read input files. A patch is needed to support ISO C++: patch-flex-2.5.4a-snl.gz. Make sure that
FlexLexer.h
from flex is in your include path. You may need to give the path to FlexLexer.h
to configure with an argument that looks something like: --with-include=-I/usr/local/include
- GNU bison (version 1.24 or greater): This is a parser generator used to generate code to read input files.
- GNU gmake (version 3.70 or greater): GNU specific extensions to make are used extensively.
- 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.
- A library supporting the Message Passing Interface (MPI) is required to use MPQC in parallel on distributed memory machines. To use MP2 in parallel a thread-safe MPI is needed. For Linux, MPI Software Technology,
Inc. has developed a thread-safe MPI.
Configuration
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. mpqc.i686-linux
) and will be referred to as the target directory below.
In the target directory execute the configure
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 configure --help
to see a list of options. Options are specified with an equals sign, as in configure --prefix=/usr/local
. Some options, such as all the enable
and disable
options, do not require an argument. Useful options to configure include:
--prefix
- Specifies the installation directory. The default is
/usr/local/mpqc/
version-number
--enable-debug
- Options for debugging will be given to the compiler. Use
--enable-debug=opt
to use both debugging and optimization options.
--disable-parallel
- Do not try to find communications libraries.
--disable-threads
- Do not try to find the multi-thread libraries.
--enable-shared
- Use shared libraries. This will reduce the size of executables, if shared libraries are supported on your system.
--disable-static
- Do not build libraries for static linking.
--enable-stl
- Use the Standard Template Library for some of the container classes. Your compiler must have a working STL implementation.
--enable-ref-debug
- Check for overwrites and overflows of reference counts. Implied by ``--enable-debug''.
--disable-ref-macros
- Use template classes for reference counting. The default is to use a CPP macro to generate a class definition.
--enable-cross-compile
- If this option is set then the configure script will take care to not execute any compiled test programs.
--enable-shared-libs
- This will generate shared objects and link with them instead of standard ``.a'' libraries. This works on a Linux-ELF system.
--with-cc
- Gives the name of the C compiler.
--with-cxx
- Gives the name of the C++ compiler.
--with-f77
- Gives the name of the FORTRAN compiler.
--without-f77
- configure will not try to find a FORTRAN compiler. This can only be used if nothing more than the utility libraries are needed.
--with-ranlib
- Gives the name of the archive indexing utility.
--with-ar
- Gives the name of the program that makes libraries.
--with-ld
- Gives the name of the object linker.
--with-include
- Gives directories in which include files should be sought. For example,
--with-include="-I/u/local/inc -I/u/cljanss/include"
--with-libs
- Specifies libraries that executables should be linked with. For example,
--with-libs=-llapack_IRIX.a
.
--with-libdirs
- Gives the directories in which libraries should be sought. For example,
--with-libdirs=-L/usr/local/lib64
.
If you would like to further customize your target directory, you can edit src/lib/scconfig.h
and lib/LocalMakefile
to suit your needs. The next time you run configure, these files and all the makefiles will be overwritten.
Compilation
Now you are ready to build the libraries and executables. Do this by typing make
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 make -j4
. This feature works correctly with GNU make version 3.78.1 or later; for older versions of GNU make use make JOBS=-j4
.
You can install the executables and data files with make install
.
You can install the libraries and header files with make install_devel
, however, make install
must be also be run to install the files needed for run-time support.
Generated at Thu Oct 4 18:10:14 2001 for MPQC
2.0.0 using the documentation package Doxygen
1.2.5.