Newer Older
1 2 3 4 5 6 7 8 9
How to install ELPA:

ELPA is shipped with a typical "configure" and "make" procedure. It is
recommended to use this way to install ELPA, see (A). If you do not want to 
install ELPA as library, but to include it in your source code, please refer 
to point (B). An example makefile "Makefile.example" can be found in ./test, 
to give some hints how this is done. Please distibute then all files of ELPA 
with your code. Please note, that usage of ELPA as described in Section (B) 
10 11 12
requires advanced knowledge about compilers, preprocessor flags, and
optimizations. Please also not, that we cannot give any official support if
ELPA is used as described in Section (B)!
13 14 15 16 17 18 19 20 21 22 23 24

(A): Installing ELPA as library with configure

The configure installation is best done in four steps

1) run configure: 
   Check the available options with "configure --help". 
   ELPA is shipped with several different versions of the
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
   elpa2-kernel, each is optimized and tuned for a different

1.1) Choice of ELPA2 kernels

   With this release of ELPA (2014.06 or newer) it is _not_
   mandatory anymore to define the (real and complex) kernels
   at build time. The configure procedure will build all the
   kernels which can be used on the build system. The choice of 
   the kernels is now a run-time option. This is the most 
   convenient and also recommended way. It is intended to augment
   this with an auto-tuning feature.

   Nevertheless, one can still define at build-time _one_
   specific kernel (for the real and the complex case each). 
   Then, ELPA is configured only with this real (and complex) 
   kernel, and all run-time checking is disabled. Have a look
   at the "configure --help" messages and please refer to the
   file "./src/elpa2_kernels/README_elpa2_kernels.txt".

1.2 Setting up blacs/scalapack
47 48 49

   Please point to your blacs/scalapack installation and the
   linkline with the variables "BLACS_LDFLAGS" and "BLACS_FCFLAGS".
   "BLACS_LDFLAGS" should  contain the correct linkline for your
51 52 53 54 55 56 57 58 59
   blacs/scalapack installation and "BLACS_FCFLAGS" the include path
   and any other flags you need at compile time.

   It is recommended that you use the "rpath functionality" in the linkline,
   otherwise it will be necessary to update the LD_LIBRARY_PATH environment

   You can either specify your own builds of lapack/blacs/scalapack
   or use specialized Vendor packages, e.g. if available you can use 
60 61 62 63 64 65 66
   Intel's MKL. 

   The configure procedure will check whether blacs/scalapack is available
   at build-time. If you do not set the variables "BLACS_LDFLAGS" and 
   "BLACS_FCFLAGS" the chances are high that ELPA will not build.

1.3 Setting optimizations
67 68 69 70 71

   Please set the optimisation that you would like with the
   variable "FCFLAGS", "CFLAGS", and "CXXFLAGS", e.g. FCFLAGS="-O3 -xAVX",
   please see "./src/elpa2_kernels/README_elpa2_kernels.txt".

72 73 74 75 76 77 78 79 80
   Setting the optimization flags for the AVX kernels can be a hazel. If AVX 
   kernels are build for your system, you can set the configure option
   "--with-avx-optimizations=yes". This will automatically set a few compiler
   optimization flags which turned out to be beneficial for AVX support.
   However, it might be that on your system/compiler version etc. other flags
   are the better choice.

1.4 Installation location

81 82 83
   Set the "prefix" - flag, if you wish another installation location than
   the default "/usr/local/".

84 85
1.5 Hybrid OpenMP support

   If you want to use the hybrid MPI/OpenMP version of ELPA please specify
   "--enable-openmp" or "--with-openmp".

1.6 Other
90 91 92 93 94 95 96 97 98

   Note, that at the moment we do not officially support "cross compilation"
   allthough it should work.

2) run "make"

3) run "make check"
   a simple test of ELPA is done. At the moment the usage of "mpiexec"
   is required. If this is not possible at your system, you can run the
99 100 101
   binaries "test_real", "test_real2", "test_complex", "test_complex2",
   "test_complex2_default_kernel", "test_complex2_choose_kernel_with_api",
   "test_real2_default_kernel", and "test_real2_choose_kernel_with_api"
102 103 104
   yourself. At the moment the tests check whether the residual and the
   orthogonality of the found eigenvectors are lower than a threshold of
   5e-12. If this test fails, or if you believe the threshold should be
105 106 107 108
   even lower, please talk to us. Furthermore, your run-time choice of
   ELPA kernels is tested. This is intended as a help to get used to this
   new feature. With the same thought in mind a binary "print_available_elpa2_kernels"
   is provided, which is rather self-explanatory.
109 110 111 112 113 114 115 116 117 118 119 120 121 122

4) run "make install"
   Note that a pckconfig file for ELPA is produced. You should then be
   able to link the ELPA library to your own applications.

B) Installing ELPA without the autotools procedure
    You can find an example makefile "Makefile.example" in "./test",
    to see how you can use ELPA directly in your code, and not as library. 
    If you do so, please distibute then all files of ELPA with your code.

    However, this is not the recommended way for several reasons:
     - for several releases, ELPA has grown substantially in performance
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
       optimizations but also complexity. The simple "just use elpa source
       files in your code" approach is becoming more and more difficult.
    - you still have to choose an elpa2-kernel (see at (A)). Getting them
      build from hand might be tedious.
    - the file elpa2.F90 uses preprocessor defines for the different kernels.
      you will have to do this by hand, if you do not use the autotools 
    - also the test programs now use preprocessor defines, discriminating
      between version with and without OpenMP
    - it is entirely possible that due to ever growing complexity of ELPA
      in future releases the build procedure without autotools will not be 
      supported anymore

    Thus, if you really want to use ELPA this way and not with the autotools
    please ensure the following
    - make yourself familiar with the preprocessor flags you will need
      for your configuration of ELPA and define them in a file "config-f90.h"
    - adapte the Makefile.example accordingly to your needs
    Again, it is strongly encouraged to use the autotools build procedure!

How to use ELPA:
Using ELPA should be quite simple. It is similiar to ScalaPack but the API
is different. See the examples in the directory "./test". There is shown how
to evoke ELPA from a Fortran code.

If you installed ELPA with the build procedure a pk-config file is produced,
which will tell you how to link against ELPA.