Commit c7a581e1 authored by Andreas Marek's avatar Andreas Marek
Browse files

ELPA_development_version_OpenMP: bester test examples

The test examples are a little bit more verbose if OpenMP is
used
parent 48e712ef
......@@ -39,6 +39,7 @@
! the original distribution, the GNU Lesser General Public License.
!
!
#include "config-f90.h"
program test_complex
!-------------------------------------------------------------------------------
......@@ -87,7 +88,9 @@ program test_complex
integer :: iseed(4096) ! Random seed, size should be sufficient for every generator
integer :: STATUS
#ifdef WITH_OPENMP
integer :: omp_get_max_threads
#endif
logical :: write_to_file
!-------------------------------------------------------------------------------
! Parse command line argumnents, if given
......@@ -128,7 +131,13 @@ program test_complex
call mpi_comm_rank(mpi_comm_world,myid,mpierr)
call mpi_comm_size(mpi_comm_world,nprocs,mpierr)
STATUS = 0
#ifdef WITH_OPENMP
if (myid .eq. 0) then
print *,"Threaded version of test program"
print *,"Using ",omp_get_max_threads()," threads"
print *," "
endif
#endif
if (arg4 .eq. "output") then
write_to_file = .true.
if (myid .eq. 0) print *,"Writing output files"
......@@ -259,9 +268,10 @@ program test_complex
print *
end if
if(myid == 0) print *,'Time tridiag_complex :',time_evp_fwd
if(myid == 0) print *,'Time solve_tridi :',time_evp_solve
if(myid == 0) print *,'Time trans_ev_complex:',time_evp_back
if(myid == 0) print *,'Time tridiag_complex :',time_evp_fwd
if(myid == 0) print *,'Time solve_tridi :',time_evp_solve
if(myid == 0) print *,'Time trans_ev_complex :',time_evp_back
if(myid == 0) print *,'Total time (sum above):',time_evp_back+time_evp_solve+time_evp_fwd
if(write_to_file) then
if (myid == 0) then
......
......@@ -39,6 +39,7 @@
! the original distribution, the GNU Lesser General Public License.
!
!
#include "config-f90.h"
program test_complex2
!-------------------------------------------------------------------------------
......@@ -89,7 +90,9 @@ program test_complex2
integer :: iseed(4096) ! Random seed, size should be sufficient for every generator
integer :: STATUS
#ifdef WITH_OPENMP
integer :: omp_get_max_threads
#endif
logical :: write_to_file
!-------------------------------------------------------------------------------
! Parse command line argumnents, if given
......@@ -132,6 +135,43 @@ program test_complex2
STATUS = 0
#ifdef WITH_OPENMP
if (myid .eq. 0) then
print *,"Threaded version of test program"
print *,"Using ",omp_get_max_threads()," threads"
print *," "
endif
#endif
if (myid .eq. 0) then
print *," "
print *,"This ELPA2 is build with"
#ifdef WITH_AVX_COMPLEX_BLOCK2
print *,"AVX optimized kernel (2 blocking) for complex matrices"
#endif
#ifdef WITH_AVX_COMPLEX_BLOCK1
print *,"AVX optimized kernel (1 blocking) for complex matrices"
#endif
#ifdef WITH_AVX_SANDYBRIDGE
print *,"AVX SANDYBRIDGE optimized kernel for complex matrices"
#endif
#ifdef WITH_GENERIC
print *,"GENERIC kernel for complex matrices"
#endif
#ifdef WITH_GENERIC_SIMPLE
print *,"GENERIC SIMPLE kernel for complex matrices"
#endif
#ifdef WITH_SSE_AS
print *,"SSE ASSEMBLER kernel for complex matrices"
#endif
#ifdef WITH_BGP
print *,"BGP kernel for complex matrices"
#endif
#ifdef WITH_BGQ
print *,"BGQ kernel for complex matrices"
#endif
endif
if (arg4 .eq. "output") then
write_to_file = .true.
if (myid .eq. 0) print *,"Writing output files"
......@@ -238,6 +278,7 @@ program test_complex2
if(myid == 0) print *,'Time transform to tridi :',time_evp_fwd
if(myid == 0) print *,'Time solve tridi :',time_evp_solve
if(myid == 0) print *,'Time transform back EVs :',time_evp_back
if(myid == 0) print *,'Total time (sum above) :',time_evp_back+time_evp_solve+time_evp_fwd
if(write_to_file) then
if (myid == 0) then
......
......@@ -39,6 +39,7 @@
! the original distribution, the GNU Lesser General Public License.
!
!
#include "config-f90.h"
program test_real
!-------------------------------------------------------------------------------
......@@ -86,7 +87,9 @@ program test_real
integer :: STATUS
#ifdef WITH_OPENMP
integer :: omp_get_max_threads
#endif
logical :: write_to_file
!-------------------------------------------------------------------------------
! Parse command line argumnents, if given
......@@ -139,7 +142,13 @@ program test_real
STATUS = 0
#ifdef WITH_OPENMP
if (myid .eq. 0) then
print *,"Threaded version of test program"
print *,"Using ",omp_get_max_threads()," threads"
print *," "
endif
#endif
do np_cols = NINT(SQRT(REAL(nprocs))),2,-1
if(mod(nprocs,np_cols) == 0 ) exit
enddo
......@@ -254,10 +263,10 @@ program test_real
print *
end if
if(myid == 0) print *,'Time tridiag_real :',time_evp_fwd
if(myid == 0) print *,'Time solve_tridi :',time_evp_solve
if(myid == 0) print *,'Time trans_ev_real:',time_evp_back
if(myid == 0) print *,'Time tridiag_real :',time_evp_fwd
if(myid == 0) print *,'Time solve_tridi :',time_evp_solve
if(myid == 0) print *,'Time trans_ev_real :',time_evp_back
if(myid == 0) print *,'Total time (sum above):',time_evp_back+time_evp_solve+time_evp_fwd
if(write_to_file) then
if (myid == 0) then
open(17,file="EVs_real_out.txt",form='formatted',status='new')
......
......@@ -39,6 +39,7 @@
! the original distribution, the GNU Lesser General Public License.
!
!
#include "config-f90.h"
program test_real2
!-------------------------------------------------------------------------------
......@@ -85,7 +86,9 @@ program test_real2
integer :: iseed(4096) ! Random seed, size should be sufficient for every generator
integer :: STATUS
#ifdef WITH_OPENMP
integer :: omp_get_max_threads
#endif
logical :: write_to_file
!-------------------------------------------------------------------------------
! Parse command line argumnents, if given
......@@ -126,7 +129,45 @@ program test_real2
call mpi_comm_size(mpi_comm_world,nprocs,mpierr)
STATUS = 0
#ifdef WITH_OPENMP
if (myid .eq. 0) then
print *,"Threaded version of test program"
print *,"Using ",omp_get_max_threads()," threads"
print *," "
endif
#endif
if (myid .eq. 0) then
print *," "
print *,"This ELPA2 is build with"
#ifdef WITH_AVX_REAL_BLOCK2
print *,"AVX optimized kernel (2 blocking) for real matrices"
#endif
#ifdef WITH_AVX_REAL_BLOCK4
print *,"AVX optimized kernel (4 blocking) for real matrices"
#endif
#ifdef WITH_AVX_REAL_BLOCK6
print *,"AVX optimized kernel (6 blocking) for real matrices"
#endif
#ifdef WITH_AVX_SANDYBRIDGE
print *,"AVX SANDYBRIDGE optimized kernel for real matrices"
#endif
#ifdef WITH_GENERIC
print *,"GENERIC kernel for real matrices"
#endif
#ifdef WITH_GENERIC_SIMPLE
print *,"GENERIC SIMPLE kernel for real matrices"
#endif
#ifdef WITH_SSE_AS
print *,"SSE ASSEMBLER kernel for real matrices"
#endif
#ifdef WITH_BGP
print *,"BGP kernel for real matrices"
#endif
#ifdef WITH_BGQ
print *,"BGQ kernel for real matrices"
#endif
endif
if (arg4 .eq. "output") then
write_to_file = .true.
if (myid .eq. 0) print *,"Writing output files"
......@@ -257,6 +298,9 @@ program test_real2
if(myid == 0) print *,'Time transform to tridi :',time_evp_fwd
if(myid == 0) print *,'Time solve tridi :',time_evp_solve
if(myid == 0) print *,'Time transform back EVs :',time_evp_back
if(myid == 0) print *,'Total time (sum above) :',time_evp_back+time_evp_solve+time_evp_fwd
if(write_to_file) then
if (myid == 0) then
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment