From: bangerth
- Perl: Any Perl 5.x version should work.
+ GNU make, version
+ 3.78 or later. Non-GNU versions of this program will usually fail
+ to work and are not supported.
- Make: We use GNU make, version 3.78 or later. Other make
- programs (i.e. non-GNU) will usually fail
- to work and are not supported.
+ CMake version 2.8.8 or later.
+
+ Perl 5.x.
For debugging programs, we have found that the
- GNU
- debugger gdb is a valuable tool. Other options
- are DDD
- and kdbg, both of
- which have graphical user interfaces. Most integrated development
- environments like kdevelop or
- Eclipse have built
- in debuggers as well.
+ GNU
+ debugger GDB is a invaluable tool. GDB is a text-based tool
+ not always easy to use; kdbg, is one of many graphical user interfaces
+ for it. Most integrated development environments
+ like kdevelop
+ or Eclipse have built
+ in debuggers as well.
- In case you want to generate the documentation locally on your
- machine from the header deal.II files, you need a
- copy of doxygen
+ To generate the documentation locally on your
+ machine from the deal.II header files, you need
+ doxygen
on your machine. If not, you can still work with the library and
- use the documentation provided on our homepage for reference. Note
- that in order to generate inheritance graphs for classes, doxygen
- can use the
- Unpacking will create a subdirectory deal.II. First run
+ The whole library usually comes as a .tar.gz file, that is a
+ tarred file archive which is compressed with gzip. After downloading it,
+ unpack it using either
-
dot
program, which is part of the GraphViz
+ use the documentation provided on our homepage for reference.
+ In order to generate inheritance graphs for classes, doxygen
+ can use the dot
program, which is part of the
+ GraphViz
package. If this program is not available, then doxygen attempts to
generate text-mode graphs; these are much less nice, though.
Unpacking
- The whole library usually comes as a .tar.gz file, that is a
- tarred file archive which is compressed with gzip. After downloading this
- tar file, please unpack it at the position where you want to install the
- deal.II library using either
-
-
- gunzip deal.II-X.Y.Z.tar.gz
- tar xf deal.II-X.Y.Z.tar
-
- or, if you have GNU tar with
-
-
- tar xzf deal.II-X.Y.Z.tar.gz
-
- Unpacking will create a subdirectory deal.II with
- the whole library wherever you do it. Since deal.II does not have
- a make install which would copy the libraries to a final position,
- this subdirectory is where the built library will reside.
-
-
- Configuration
- cd deal.II
- ./configure
+ gunzip deal.II-X.Y.Z.tar.gz
+ tar xf deal.II-X.Y.Z.tar
- to set some paths and find out your system parameters. configure
- supports several flags which are discussed
- further down below.
-
-+ Note: You will want to hang on to the source files + of deal.II after installation as it makes developing + much simpler. Consequently, you should do the steps above in a permanent + directory, not on-
./configure
creates the - filedeal.II/common/Make.global_options
, - which remembers paths and configuration options. Please note that it is not - possible to move the library directory after configuration. Neither will - the library compile, nor will your application programs be able to use it. - You can - usedeal.II/common/Make.global_options
in the - Makefiles - of your own projects to set relevant paths and parameters correctly. + tar xzf deal.II-X.Y.Z.tar.gz +
/tmp
as one often does when installing
+ software.
-
- - ======================================================================== - = Global Makefile for the deal.II libraries = - ======================================================================== - = = - = The following targets exist: = - = all : debug and optimized libraries = - = debug : the debug version of the deal.II library = - = optimized : the optimized version of the deal.II library = - = = - = contrib : additional libraries in contrib, if there are any = - = = - = online-doc : generate the documentation in HTML format = - = TODO : create a "TODO" file from the source files = - = TAGS : create a TAGS file from include and source files = - = = - = clean : removes all object files in subdirs = - = distclean : removes all object files, libraries, etc in subdirs = - ======================================================================== -+ +
- To execute one of the commands, type for example make
- all
. Building all libraries takes somewhere between 4 minutes
- and several hours, depending on the number of processors your machine
- has, and requires about 2 GB of free disk space. If you have a
- multi-processor machine, you can call make -j16 all
- to let make
call multiple instances of the compiler
- (in this case sixteen). This speeds up compilation by about
- the factor given after -j
, at least if you have as many
- processors.
+ deal.II uses the
+ CMake
+ integrated configuration and build system. Unpacking will create a
+ subdirectory deal.II/ in the current directory. Then do the
+ following steps:
+
+ + mkdir build + cd build + cmake -DCMAKE_INSTALL_PREFIX=/path/install/dir ../deal.II + make + make install ++ These steps compile, link and install the deal.II libraries and should + take between a few minutes and an hour. Note the following: +
/path/install/dir
is the directory where you want to
+ install the deal.II header files and libraries to. This can be a
+ directory in your home directory (e.g., ~/bin
) or a
+ directory such as /usr
if you have root privileges.
+
+ make -jN
in
+ the last two steps where N
is the number of processors you
+ want make
to use at any given
+ time. Allowing make
to use more processors (assuming
+ you have that many) will greatly accelerate building the library.
+
+ cmake
system can accept a
+ significant number of configuration parameters. See the
+ discussion below.
+ - The deal.II libraries come in two versions - corresponding to their respective targets: + The commands above build and install the deal.II + libraries in two variants:
lib/libdeal_II.g
: This is the
- debug version of the library. It is compiled with compiler flags so
- that the library contains information that can be used by debuggers. (The
- infix .g
was historically chosen because gcc uses the
- flag -g
to request debugging information).
+
Debug mode: This version of the + library is compiled with compiler flags so + that the library contains information that can be used by debuggers.
@@ -281,35 +253,28 @@ invaluable means to finding programming bugs since they will almost always abort your program if something goes wrong. In our experience, more than ninety per cent of all errors are invalid - parameters (such as vectors having the wrong size, etc) and they - are usually found almost instantaneously displaying the file + parameters (such as vectors having the wrong size, etc.) and they + are usually found almost instantaneously, displaying the file name and line number of where the problem occurred.
-lib/libdeal_II
: This is the
- optimized version of the library. You will want to link with it
- once you know that your program is working as expected. This
- version of the library does not contain the safety checks any more
+
.a
. For shared
- libraries, it is .so
(for most Unix-like and Linux
- systems), .dylib
(for Mac OS X), or .dll
- (for Cygwin/Windows).
- Apart from the libraries, you can generate the full set of
- documentation files, by typing make online-doc
; this takes
- some minutes but you will
- have (almost) all the documentation locally on your computer. You
- will then be able to access it through this page.
+ Apart from the libraries, the steps above install all necessary header
+ files you need to develop programs based on deal.II
+ as well as generate the full set of
+ documentation files so that it can be used locally on your computer. You
+ will then be able to access it through
+ this page.
configure
to use a particular compiler, there are two
- options: first, you can prepend your search path by the directory
- of the desired compiler. Alternatively, if your full compiler paths are
- mycc and myc++ (for example) for your C and C++ compilers,
- respectively, type into your csh:
- - setenv CC mycc - setenv CXX myc++ - ./configure -- or into your bash -
- export CC=mycc - export CXX=myc++ - ./configure -- -
- The paths to these compilers are stored in the
- common/Make.global_options
files, so the compilers
- are always used when compiling the library even if the environment
- variables are not set later on any more (for example if you are working
- within another window, or have unset the variables for other
- purposes).
-
- If all you want to do is pass different compiler flags to the
- compiler, set the standard environment variables CXXFLAGS,
- CFLAGS, LDFLAGS
before calling
- ./configure
. For example, to produce
- gprof
output, do:
-
- setenv CXXFLAGS -pg - setenv LDFLAGS -pg - ./configure <configure-options> -- The flags so set are used for both optimized and debug mode. If you want to - set flags for only one of these two cases, you should - set
CXXFLAGSO
or CXXFLAGSG
, respectively.
-
-
- For specific problems, send email to either - Wolfgang.Bangerth, Timo.Heister, - Guido.Kanschat, or simply authors at - dealii.org. -
-We are interested in any feedback, whether positive or negative, in order to determine the directions of future work on the library. We are also very much interested in incorporating any work and bug fixes by third parties into the library. Of course, - you will be credited for this on our home page. + you will be credited for this on the authors page.