ALBERTA is an Adaptive multi-Level finite element toolbox using Bisectioning refinement and Error control by Residual Techniques for scientific Applications. ------------------------------------------------------------------------------- Contents ======== I. Introduction II. External Packages (both required and optional packages) 1.) Required Packages OpenGL BLAS (with examples) 2.) Optional Packages gltools GRAPE alternate compilers III. Configure Options 1.) Non-standard behaviour of ALBERTA 2.) Options affecting which versions of ALBERTA are built 3.) Options controlling the search-path for external libraries IV. Compiler flags (with examples) ------------------------------------------------------------------------------- I) Introduction =============== This is ALBERTA Version 1.2. Generic installation instructions can be found in the file `INSTALL' in this directory. ALBERTA has a web-page at http://www.mathematik.uni-freiburg.de/IAM/ALBERTA Please see the file `COPYING' for information about the availability of ALBERTA. The directory layout Contained in the package are the following sub-packages: __________ ALBERTA/ __________ src/ ______|--- 1d/ / \ |--- 2d/ / -- doc/ |--- 3d/ / |--- Common/ /_____________ DEMO/ __ src/ _______|--- 1d/ |--- ALBERTA??_?/ alberta-1.2/| |--- 2d/ \_____________ ALBERTA_UTIL/ |--- 3d/ \ |--- Common/ \___________ PLOT_ANSI/ __ src/ \ \_________ SOLVER/ __ src/ \ \_______ GRAPE/ __ mesh/ ____|--- 2d/ \ |--- 3d/ \ |--- Common/ \ \ \_ configure.ac and other distribution files 1) ALBERTA The main package. 2) DEMO The sub-directory DEMO/ contains a few demonstration programs. After running "make install" (see file ./INSTALL) a tar-ball containing all demo programs will be installed in PREFIX/share/alberta/. The tar-ball can be extracted elsewhere; the make-files contained in the tar-ball have apropriate defaults for the location of the (installed) ALBERTA libraries and header files. 3) ALBERTA_UTIL This package contains the old ALBERTA util.c file, now split into several smaller source files. It is compiled to form a separate utility library (message macros, ALBERTA memory allocation routines, etc.) and should linked to any program using the ALBERTA package. It can also be used as a standalone utility library. 4) PLOT_ANSI PLOT_ANSI provides tools for displaying X11 graphics, if gltools is not used. 5) SOLVER Linear and nonlinear solver routines for ALBERTA. 6) GRAPE GRAPE interface for ALBERTA. Only for non-parametric FE of dimension 2 and 3. The GRAPE-interface consists of "make" will create "alberta_grapeXX" and alberta_moviXX" where XX is in {22, 33}. "make install" will install those programs below PREFIX/bin. The GRAPE interface is only installed when the GRAPE library and header file are available on your system (determined at configure time, use "configure --help" for appropriate command line switches for "configure"). II) External packages ===================== 1) Required Packages -------------------- The software-packages mentioned here are mandatory. You will not be able to compile and use ALBERTA without them. The configure-script will attempt to detect them at build-time (see "Configure Options" below). OpenGL -- you need some implementation of SGI's 3D-API. If your system does not have OpenGL you can fetch the free OpenGL implementation "MesaGL" from http://www.mesa3d.org/ If you don't have a clue what this is all about then ask your system-administrator. BLAS -- "Basic Linear Algebra Subprograms" You definitely need some version of the BLAS. Often the BLAS can be found at "/usr/lib/libblas.a", but this need not be the case. You should have a look at http://www.netlib.org/blas/faq.html which lists some URLs to optimized BLAS-implementations for some architectures. For an optimized version for AMD's Athlon and Opteron CPUs you should have a look at AMD's web-site (www.amd.com) and search for "acml". Known quirks and specific BLAS implementations: Compiler dependence ------------------- In general, you need a version of the BLAS which was compiled by the Fortran compiler you are using to compile (parts of) the ALBERTA package. Sometimes it is possible to get around this restriction by linking in additional libraries, as shown in some of the examples listed below. Intel's "math core library" libmkl: ------------------------------------ Make sure to also link with libguide, this can be achieved by the following configure switches: --with-blas-lib=/opt/intel/mkl61/lib/32/ --with-blas-name="mkl -lguide" You also need to set the LD_LIBRARY_PATH variable appropriately: export LD_LIBRARY_PATH=/opt/intel/mkl61/lib/32 or setenv LD_LIBRARY_PATH /opt/intel/mkl61/lib/32 g77-compiled libblas on Linux, but Intel's ifc compiler for ALBERTA ------------------------------------------------------------------- NOTE: this probably doesn't make to much sense, but you can try the following --with-blas-name="blas -lg2c" SunOS (Solaris), using libsunperf: ---------------------------------- Find out about the location of libsunperf, then using Sun's f77 compiler you need the following switches: --with-blas-lib=LOCATION --with-blas-name=sunperf However, with gcc the following might work: --with-blas-lib=LOCATION --with-blas-name="sunperf -lfui -lfsu -lsunmath" Alpha AXP with Compaq's extended math-library libcxml: ------------------------------------------------------ The following might work (UNTESTED!!!) --with-blas-lib=LOCATION --with-blas-name="cxml -lcpml" 2) Optional Packages -------------------- The software-packages mentioned here are not required to compile and use ALBERTA. They are detected by the configure-script at build-time and are used when available (see "Configure Options" below). gltools -- OpenGL toolkit We strongly recommend that you install the gltools package; you can fetch it from http://www.wias-berlin.de/software/gltools/ gltools provides a more flexible graphical output than would be otherwise available with ALBERTA. NOTE: you need at least gltools-2-4. Version 2-3 will _not_ work. "configure" does not check for right version, it's up to yourself. GRAPE -- Graphics Programming Environment If GRAPE is present, the four programs alberta_grape22, alberta_grape33, alberta_movi22 and alberta_movi33 are compiled and installed in PREFIX/bin/. They can be used to display data-files created by ALBERTA during your numerical simulations. GRAPE is available from http://www.mathematik.uni-freiburg.de/IAM/Research/grape/GENERAL/ alternate compilers Many CPU-vendors distribute highly optimizing compilers for their specific CPU architecture. Often those compilers generate much faster code than even a modern gcc. Sometimes they are available at no costs, at least for private and academical use. III) Configure Options ====================== "configure --help" will give you a summary of available options. The file "INSTALL" contains generic configuration instructions and a description of generic command line options for configure. The remaining (i.e. ALBERTA specific) options are explained here: 1.) Non-standard behaviour of ALBERTA ------------------------------------- BIG FAT NOTE: the _default_ installation prefix of the ALBERTA-package is _NOT_ the default GNU installation prefix which would be /usr/local/ on Un*x systems, but it is the build-directory. Of course, you can change the default behavior by using the "--prefix=PREFIX" switch when running configure (see ./INSTALL). However, the default layout is like follows: When compiling ALBERTA below /usr/people/claus/alberta-1.2/ then the libraries will go to /usr/people/claus/alberta-1.2/lib/ the header-files and Makefile.alberta will end up in /usr/people/claus/alberta-1.2/include/ libtool.alberta will reside in /usr/people/claus/alberta-1.2/libexec/ and finally the demo package (under the name alberta-1.2.demo.tar.gz) will be copied to /usr/people/claus/alberta-1.2/share/ This will be the layout after running "make install". 2.) Options affecting which versions of ALBERTA are built --------------------------------------------------------- Compiling all flavours of the ALBERTA libraries takes a long time. The ALBERTA libraries are all named libALBERTA$(DIM)$(DIM_OF_WORLD)_$(DEBUG)$(EL_INDEX) The options below control which of them are actually created. --disable-alberta-11 Disable building of an ALBERTA library for Finite Elements of dimension 1. (default: enabled) --disable-alberta-22 Disable building of an ALBERTA library for Finite Elements of dimension 2. (default: enabled) --disable-alberta-33 Disable building of an ALBERTA library for Finite Elements of dimension 3. (default: enabled) --enable-alberta-12 Enable building of an ALBERTA library for parametric Finite Elements of dimension 1 where the surrounding space has dimension 2. (default: disabled) --enable-alberta-13 Enable building of an ALBERTA library for parametric Finite Elements of dimension 1 where the surrounding space has dimension 3. (default: disabled) --enable-alberta-23 Enable building of an ALBERTA library for parametric Finite Elements of dimension 2 where the surrounding space has dimension 3. (default: disabled) --enable-el-index Additionally build ALBERTA libraries which assigns an unique index to each element. Normally, this is not needed but it can be handy for debugging purposes. (default: disabled) --disable-debug Disable building of ALBERTA libraries with debugging information. On some systems (or better: with some compilers) optimization and debugging are mutual exclusive, therefore there are separate ALBERTA libraries which are compiled with optimization, but without debugging information, and other versions which are compiled without optimization, but with debugging. (default: enabled) 3.) Options controlling the search-path for external libraries -------------------------------------------------------------- See also "External Packages" above. For each external package PKG the configure script provides the following options: --without-PKG Prohibit the use of this package, even if it is installed on your system. Obviously, this affects only the two optional packages "gltools" and "GRAPE" . --with-PKG-name=NAME Alter the default name of the package, e.g. "--with-opengl-name=MesaGL" or "--with-blas-name=cxml". NOTE: it is possible to specify more than one library. For example on (some versions of?) Solaris the BLAS-library is called "libsunperf.so". If you want to link with this library using gcc and g77, then you need to specify "--with-blas-name=sunperf -lfui -lfsu -lsunmath" Note the "-l" in front of the additional libraries. (of course, in addition to --with-blas-name you also need --with-blas-lib=WHATEVER) --with-PKG-dir=DIR Search for header-files and for the library itself below DIR, e.g. "--with-gltools-dir=/foo/bar/gltools-2.4". --with-PKG-lib=DIR Search for the library below DIR, e.g. "--with-blas-lib=/usr/people/claus/software/lib/". --with-PKG-headers=DIR Use DIR as search-path for the include-files for PKG, e.g. "--with-opengl-include=/usr/people/claus/software/include/". The following quotes the relevant fragment of the online-help obtained by running "configure --help". Please see the file ./INSTALL for the notation (e.g. PREFIX, EPREFIX etc.). --with-blas-name=NAME use NAME as the name of the blas library (without leading "lib" prefix and trailing suffix). Default: "blas" --with-blas-lib=DIR use blas library below directory DIR (default: EPREFIX/lib/) --with-opengl-name=NAME use NAME as the name of the opengl library (without leading "lib" prefix and trailing suffix). Default: "GL" --with-opengl-dir=DIR use opengl library (and headers) below directory DIR (no default) --with-opengl-lib=DIR use opengl library below directory DIR (default: EPREFIX/lib/) --with-opengl-headers=DIR use opengl include files below directory DIR (default: PREFIX/include/) --without-gltools disable use of package gltools (default: autodetect) --with-gltools-name=NAME use NAME as the name of the gltools library (without leading "lib" prefix and trailing suffix). Default: "gltools" --with-gltools-dir=DIR use gltools library (and headers) below directory DIR (no default) --with-gltools-lib=DIR use gltools library below directory DIR (default: EPREFIX/lib/) --with-gltools-headers=DIR use gltools include files below directory DIR (default: PREFIX/include/) --without-grape disable use of package grape (default: autodetect) --with-grape-name=NAME use NAME as the name of the grape library (without leading "lib" prefix and trailing suffix). Default: "gr" --with-grape-dir=DIR use grape library (and headers) below directory DIR (no default) --with-grape-lib=DIR use grape library below directory DIR (default: EPREFIX/lib/) --with-grape-headers=DIR use grape include files below directory DIR (default: PREFIX/include/) IV. Compiler flags ================== The default flags for the optimized libraries are "-O3" when using gcc and "-O" otherwise. The default flags for the debugging-enabled libraries are "-O0 -ggdb -fno-inline -fno-builtin" with gcc and "-g" otherwise. The relevant environment- respectively make-variables are CFLAGS C-compiler flags used for _both_, optimized and debug enabled libraries ALBERTA_OPTIMIZE_CFLAGS C-compiler flags used fo the optimized library. They are prepended to the CFLAGS variable. ALBERTA_DEBUG_CFLAGS C-compiler flags used fo the debug enabled library. They are prepended to the CFLAGS variable. FFLAGS Fortran-compiler flags. They are separated from the CFLAGS because in general the Fortran compiler can come from a different vendor than the C-compiler in which case the flags understood by the Fortran compiler are different from the flags understood by the C-compiler. You have to consult the documentation for the compiler(s) you are using to determine the appropriate switches for your setup. There are three ways to set those flags: a.) arguments to configure b.) environment variables (have to be defined _before_ running configure) c.) arguments to make We recommend using a.). Examples: --------- 1.) gcc with a Pentium 4 ./configure [OTHER OPTIONS] \ CFLAGS="-march=pentium4 -mfpmath=sse" \ FFLAGS="-march=pentium4 -mfpmath=sse" make make install or (assuming a Bourne-shell) CFLAGS="-march=pentium4 -mfpmath=sse" FFLAGS="-march=pentium4 -mfpmath=sse" export CFLAGS FFLAGS ./configure [OTHER OPTIONS] make make install or ./configure [OTHER OPTIONS] make CFLAGS="-march=pentium4 -mfpmath=sse" \ FFLAGS="-march=pentium4 -mfpmath=sse" make install 2.) Pentium 4 with icc and with Intel "math kernel library" (BLAS implementation) ./configure [OTHER OPTIONS] \ CC=icc CFLAGS="-xW" ALBERTA_OPTIMIZE_CFLAGS="-O3" \ ALBERTA_DEBUG_CFLAGS="-O0 -g" \ F77=ifc FFLAGS="-xW -O3" \ --with-blas-name=mkl --with-blas-lib=/opt/intel/mkl61/lib/32/ make make install or set environment variables or use arguments to "make" as shown in example 1.) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PLEASE LEAVE HERE FOR ISPELL: LocalWords: src alberta UTIL ac in's installdir util gltools FE grapeXX SGI's LocalWords: moviXX OpenGL API MesaGL BLAS AMD's Athlon Opteron acml movi gcc LocalWords: libtool libALBERTA PKG GL cxml blas libNAME libPKG dir DIR opengl LocalWords: EPREFIX gr CFLAGS FFLAGS ggdb fno inline pentium sse LocalWords: mfpmath