elpa2_print_kernels.F90 4.32 KB
Newer Older
Andreas Marek's avatar
Andreas Marek committed
1 2
!    This file is part of ELPA.
!
3
!    The ELPA library was originally created by the ELPA consortium,
Andreas Marek's avatar
Andreas Marek committed
4 5
!    consisting of the following organizations:
!
6 7
!    - Max Planck Computing and Data Facility (MPCDF), formerly known as
!      Rechenzentrum Garching der Max-Planck-Gesellschaft (RZG),
Andreas Marek's avatar
Andreas Marek committed
8 9 10
!    - Bergische Universität Wuppertal, Lehrstuhl für angewandte
!      Informatik,
!    - Technische Universität München, Lehrstuhl für Informatik mit
11 12
!      Schwerpunkt Wissenschaftliches Rechnen ,
!    - Fritz-Haber-Institut, Berlin, Abt. Theorie,
13
!    - Max-Plack-Institut für Mathematik in den Naturwissenschaften,
14 15
!      Leipzig, Abt. Komplexe Strukutren in Biologie und Kognition,
!      and
Andreas Marek's avatar
Andreas Marek committed
16 17 18 19
!    - IBM Deutschland GmbH
!
!
!    More information can be found here:
20
!    http://elpa.mpcdf.mpg.de/
Andreas Marek's avatar
Andreas Marek committed
21 22
!
!    ELPA is free software: you can redistribute it and/or modify
23 24
!    it under the terms of the version 3 of the license of the
!    GNU Lesser General Public License as published by the Free
Andreas Marek's avatar
Andreas Marek committed
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
!    Software Foundation.
!
!    ELPA is distributed in the hope that it will be useful,
!    but WITHOUT ANY WARRANTY; without even the implied warranty of
!    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
!    GNU Lesser General Public License for more details.
!
!    You should have received a copy of the GNU Lesser General Public License
!    along with ELPA.  If not, see <http://www.gnu.org/licenses/>
!
!    ELPA reflects a substantial effort on the part of the original
!    ELPA consortium, and we ask you to respect the spirit of the
!    license that we chose: i.e., please contribute any changes you
!    may have back to the original ELPA library distribution, and keep
!    any derivatives of ELPA under the same license that we chose for
!    the original distribution, the GNU Lesser General Public License.
!
! ELPA2 -- 2-stage solver for ELPA
43
!
Andreas Marek's avatar
Andreas Marek committed
44 45 46 47
! Copyright of the original code rests with the authors inside the ELPA
! consortium. The copyright of any additional modifications shall rest
! with their original authors, but shall adhere to the licensing terms
! distributed along with the original code in the file "COPYING".
48 49
!
! This file was written by A. Marek, MPCDF
Andreas Marek's avatar
Andreas Marek committed
50 51

#include "config-f90.h"
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66

!> \file print_available_elpa2_kernels.F90
!> \par
!> \brief Provide information which ELPA2 kernels are available on this system
!>
!> \details
!> It is possible to configure ELPA2 such, that different compute intensive
!> "ELPA2 kernels" can be choosen at runtime.
!> The service binary print_available_elpa2_kernels will query the library and tell
!> whether ELPA2 has been configured in this way, and if this is the case which kernels can be
!> choosen at runtime.
!> It will furthermore detail whether ELPA has been configured with OpenMP support
!>
!> Synopsis: print_available_elpa2_kernels
!>
67
!> \author A. Marek (MPCDF)
Andreas Marek's avatar
Andreas Marek committed
68 69
program print_available_elpa2_kernels

Andreas Marek's avatar
Andreas Marek committed
70
   use precision
Andreas Marek's avatar
Andreas Marek committed
71 72 73
   use ELPA1
   use ELPA2

74 75
   use elpa2_utilities

Andreas Marek's avatar
Andreas Marek committed
76 77
   implicit none

Andreas Marek's avatar
Andreas Marek committed
78
   integer(kind=ik) :: i
Andreas Marek's avatar
Andreas Marek committed
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97

   print *, "This program will give information on the ELPA2 kernels, "
   print *, "which are available with this library and it will give "
   print *, "information if (and how) the kernels can be choosen at "
   print *, "runtime"
   print *
   print *
#ifdef WITH_OPENMP
   print *, " ELPA supports threads: yes"
#else
   print *, " ELPA supports threads: no"
#endif

   print *, "Information on ELPA2 real case: "
   print *, "=============================== "
#ifdef HAVE_ENVIRONMENT_CHECKING
   print *, " choice via environment variable: yes"
   print *, " environment variable name      : REAL_ELPA_KERNEL"
#else
98
   print *, " choice via environment variable: no"
Andreas Marek's avatar
Andreas Marek committed
99 100 101
#endif
   print *
   print *, " Available real kernels are: "
102 103 104
#ifdef HAVE_AVX2
   print *, " AVX kernels are optimized for FMA (AVX2)"
#endif
Andreas Marek's avatar
Andreas Marek committed
105 106 107 108 109 110 111 112 113 114
   call print_available_real_kernels()

   print *
   print *
   print *, "Information on ELPA2 complex case: "
   print *, "=============================== "
#ifdef HAVE_ENVIRONMENT_CHECKING
   print *, " choice via environment variable: yes"
   print *, " environment variable name      : COMPLEX_ELPA_KERNEL"
#else
115
   print *,  " choice via environment variable: no"
Andreas Marek's avatar
Andreas Marek committed
116 117 118
#endif
   print *
   print *, " Available complex kernels are: "
119 120 121
#ifdef HAVE_AVX2
   print *, " AVX kernels are optimized for FMA (AVX2)"
#endif
Andreas Marek's avatar
Andreas Marek committed
122 123 124
   call print_available_complex_kernels()

end program print_available_elpa2_kernels