Research Group of Prof. Dr. M. Griebel
Institute for Numerical Simulation
maximize
next up previous
Next: Tested Compilers Up: Installation Previous: Download & Unpack the


Configuration

Up to now we do not provide automatic configuration. Therefore, you have to make some changes in the root-Makefile AWFD/Makefile by hand.

  1. Set global parameters:

    LMAX         the maximal number of levels for univariate and multivariate codes.
      Since several vectors of size 1«LMAX are allocated, you should
      set LMAX to a rather moderate value, e.g. 20
    DMAX the maximal dimension of the computational domain [0,1]^D
      You should set DMAX as small as possible to improve code efficiency.
    SMPPROCS the number of available processors on your SMP machine. SMPPROCS = 1 means
      you have a singleprocessor mainboard, values greater than 1 will produce special threaded smp code.
    ROOT the AWFD root directory

  2. Set machine dependent things like compile flags. Furthermore the root-directory for e.g. the FFTW must be set. These are used to generate appropriate include and lib paths. To make the changes, find and edit the block starting with ifeq ($(HOSTNAME),_YOUR_HOST_) if you're using LINUX, and edit the block starting with ifeq ($(SYSTEM),_YOUR_SYSTEM_) otherwise.

  3. Built the AWFD libraries by just gmake in the AWFD/ directory. The libraries should compile without any errors or serious warnings.

  4. It is a good idea to test your settings with some examples. You find them in Sources/Examples. Just do gmake all.

Attention: If _SMP_PROC_ is larger than 1 special threaded code is generated. In this case you must disable any compile flags which cause interprocedural optimization! Read the man pages of your compiler if you are not sure.

However, if you don't want to waive this aggressive optimization to achieve a maximum performance, the following trick will do:

  1. Compile the libraries (see the next section) with the optimal compile flags
  2. Compile the file Sources/MultiVariat/SMPPoll.cc with disabled interprocedural optimization
  3. Remake the archive in Sources/MultiVariat, i.e. ar -rs libMultiVariat.a AdaptiveLevels.o SMPPoll.o Function.o SolverResidualCriteria.o SparseMatrixIO.o Operations.o
  4. Compile/link your main program with disabled interprocedural optimization

This should work. At least on our IRIX machines it does. Typically more than 80% of the computing times are spent on functions compiled with optimal settings. Therefore, you will almost get the maximum performance.
The reason for all the trouble is the polling loop, in which the main program waits for some flags to be set by the other threads. This inelegant mechanism to exchange status information between threads and the main program was necessary, as the standard way via semaphores and mutexes had the tendency to crash when called billions of times as it may happen in our examples.


next up previous
Next: Tested Compilers Up: Installation Previous: Download & Unpack the
koster 2003-07-29