There is a maintenance of MPCDF Gitlab on Thursday, April 22st 2020, 9:00 am CEST - Expect some service interruptions during this time

Commit 0f63f761 authored by Andreas Marek's avatar Andreas Marek

Merge branch 'master' into ELPA_GPU

parents 2c93331c e7917ad5
...@@ -182,6 +182,7 @@ shared_sources = test/shared_sources/util.F90 \ ...@@ -182,6 +182,7 @@ shared_sources = test/shared_sources/util.F90 \
test/shared_sources/check_correctnes.F90 \ test/shared_sources/check_correctnes.F90 \
test/shared_sources/setup_mpi.F90 \ test/shared_sources/setup_mpi.F90 \
test/shared_sources/blacs_infrastructure.F90 \ test/shared_sources/blacs_infrastructure.F90 \
test/shared_sources/mod_output_types.F90 \
test/shared_sources/prepare_matrix.F90 test/shared_sources/prepare_matrix.F90
elpa1_test_real_c_version@SUFFIX@_SOURCES = test/c_test_programs/elpa1_test_real_c_version.c $(shared_sources) $(redirect_sources) elpa1_test_real_c_version@SUFFIX@_SOURCES = test/c_test_programs/elpa1_test_real_c_version.c $(shared_sources) $(redirect_sources)
......
...@@ -180,8 +180,12 @@ ...@@ -180,8 +180,12 @@
endif endif
#endif /* ELPA1 */ #endif /* ELPA1 */
if (write_to_file) then if (write_to_file%eigenvectors) then
if (myid .eq. 0) print *,"Writing output files" if (myid .eq. 0) print *,"Writing Eigenvectors to files"
endif
if (write_to_file%eigenvalues) then
if (myid .eq. 0) print *,"Writing Eigenvalues to files"
endif endif
...@@ -92,6 +92,7 @@ program test_complex ...@@ -92,6 +92,7 @@ program test_complex
#ifdef HAVE_DETAILED_TIMINGS #ifdef HAVE_DETAILED_TIMINGS
use timings use timings
#endif #endif
use output_types
implicit none implicit none
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
...@@ -120,8 +121,10 @@ program test_complex ...@@ -120,8 +121,10 @@ program test_complex
#ifdef WITH_OPENMP #ifdef WITH_OPENMP
integer(kind=ik) :: omp_get_max_threads, required_mpi_thread_level, provided_mpi_thread_level integer(kind=ik) :: omp_get_max_threads, required_mpi_thread_level, provided_mpi_thread_level
#endif #endif
logical :: write_to_file type(output_t) :: write_to_file
logical :: success logical :: success
character(len=8) :: task_suffix
integer(kind=ik) :: j
success = .true. success = .true.
! read input parameters if they are provided ! read input parameters if they are provided
...@@ -273,15 +276,30 @@ program test_complex ...@@ -273,15 +276,30 @@ program test_complex
if(myid == 0) print *,'Time trans_ev_complex :',time_evp_back 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(myid == 0) print *,'Total time (sum above):',time_evp_back+time_evp_solve+time_evp_fwd
if(write_to_file) then if(write_to_file%eigenvectors) then
write(unit = task_suffix, fmt = '(i8.8)') myid
open(17,file="EVs_complex_out_task_"//task_suffix(1:8)//".txt",form='formatted',status='new')
write(17,*) "Part of eigenvectors: na_rows=",na_rows,"of na=",na," na_cols=",na_cols," of na=",na
do i=1,na_rows
do j=1,na_cols
write(17,*) "row=",i," col=",j," element of eigenvector=",z(i,j)
enddo
enddo
close(17)
endif
if(write_to_file%eigenvalues) then
if (myid == 0) then if (myid == 0) then
open(17,file="EVs_complex_out.txt",form='formatted',status='new') open(17,file="Eigenvalues_complex_out.txt",form='formatted',status='new')
do i=1,na do i=1,na
write(17,*) i,ev(i) write(17,*) i,ev(i)
enddo enddo
close(17) close(17)
endif endif
endif endif
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
! Test correctness of result (using plain scalapack routines) ! Test correctness of result (using plain scalapack routines)
allocate(tmp1(na_rows,na_cols)) allocate(tmp1(na_rows,na_cols))
......
...@@ -100,6 +100,7 @@ program test_complex2 ...@@ -100,6 +100,7 @@ program test_complex2
#ifdef HAVE_DETAILED_TIMINGS #ifdef HAVE_DETAILED_TIMINGS
use timings use timings
#endif #endif
use output_types
implicit none implicit none
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
...@@ -130,7 +131,10 @@ program test_complex2 ...@@ -130,7 +131,10 @@ program test_complex2
#ifdef WITH_OPENMP #ifdef WITH_OPENMP
integer(kind=ik) :: omp_get_max_threads, required_mpi_thread_level, provided_mpi_thread_level integer(kind=ik) :: omp_get_max_threads, required_mpi_thread_level, provided_mpi_thread_level
#endif #endif
logical :: write_to_file type(output_t) :: write_to_file
logical :: success
character(len=8) :: task_suffix
integer(kind=ik) :: j
logical :: successELPA, success logical :: successELPA, success
...@@ -282,15 +286,28 @@ program test_complex2 ...@@ -282,15 +286,28 @@ program test_complex2
if(myid == 0) print *,'Time transform back EVs :',time_evp_back 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(myid == 0) print *,'Total time (sum above) :',time_evp_back+time_evp_solve+time_evp_fwd
if(write_to_file) then if(write_to_file%eigenvectors) then
write(unit = task_suffix, fmt = '(i8.8)') myid
open(17,file="EVs_complex2_out_task_"//task_suffix(1:8)//".txt",form='formatted',status='new')
write(17,*) "Part of eigenvectors: na_rows=",na_rows,"of na=",na," na_cols=",na_cols," of na=",na
do i=1,na_rows
do j=1,na_cols
write(17,*) "row=",i," col=",j," element of eigenvector=",z(i,j)
enddo
enddo
close(17)
endif
if(write_to_file%eigenvalues) then
if (myid == 0) then if (myid == 0) then
open(17,file="EVs_complex2_out.txt",form='formatted',status='new') open(17,file="Eigenvalues_complex2_out.txt",form='formatted',status='new')
do i=1,na do i=1,na
write(17,*) i,ev(i) write(17,*) i,ev(i)
enddo enddo
close(17) close(17)
endif endif
endif endif
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
! Test correctness of result (using plain scalapack routines) ! Test correctness of result (using plain scalapack routines)
allocate(tmp1(na_rows,na_cols)) allocate(tmp1(na_rows,na_cols))
......
...@@ -102,6 +102,7 @@ program test_complex2 ...@@ -102,6 +102,7 @@ program test_complex2
#ifdef HAVE_DETAILED_TIMINGS #ifdef HAVE_DETAILED_TIMINGS
use timings use timings
#endif #endif
use output_types
implicit none implicit none
...@@ -133,10 +134,12 @@ program test_complex2 ...@@ -133,10 +134,12 @@ program test_complex2
#ifdef WITH_OPENMP #ifdef WITH_OPENMP
integer(kind=ik) :: omp_get_max_threads, required_mpi_thread_level, provided_mpi_thread_level integer(kind=ik) :: omp_get_max_threads, required_mpi_thread_level, provided_mpi_thread_level
#endif #endif
logical :: write_to_file
logical :: successELPA, success logical :: successELPA, success
integer(kind=ik) :: numberOfDevices integer(kind=ik) :: numberOfDevices
logical :: gpuAvailable logical :: gpuAvailable
type(output_t) :: write_to_file
character(len=8) :: task_suffix
integer(kind=ik) :: j
successELPA = .true. successELPA = .true.
gpuAvailable = .false. gpuAvailable = .false.
...@@ -180,10 +183,6 @@ program test_complex2 ...@@ -180,10 +183,6 @@ program test_complex2
call timer%start("program") call timer%start("program")
#endif #endif
if (write_to_file) then
if (myid .eq. 0) print *,"Writing output files"
endif
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
! Selection of number of processor rows/columns ! Selection of number of processor rows/columns
! We try to set up the grid square-like, i.e. start the search for possible ! We try to set up the grid square-like, i.e. start the search for possible
...@@ -375,15 +374,30 @@ program test_complex2 ...@@ -375,15 +374,30 @@ program test_complex2
if(myid == 0) print *,'Time transform back EVs :',time_evp_back 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(myid == 0) print *,'Total time (sum above) :',time_evp_back+time_evp_solve+time_evp_fwd
if(write_to_file) then if(write_to_file%eigenvectors) then
write(unit = task_suffix, fmt = '(i8.8)') myid
open(17,file="EVs_complex2_out_task_"//task_suffix(1:8)//".txt",form='formatted',status='new')
write(17,*) "Part of eigenvectors: na_rows=",na_rows,"of na=",na," na_cols=",na_cols," of na=",na
do i=1,na_rows
do j=1,na_cols
write(17,*) "row=",i," col=",j," element of eigenvector=",z(i,j)
enddo
enddo
close(17)
endif
if(write_to_file%eigenvalues) then
if (myid == 0) then if (myid == 0) then
open(17,file="EVs_complex2_out.txt",form='formatted',status='new') open(17,file="Eigenvalues_complex2_out.txt",form='formatted',status='new')
do i=1,na do i=1,na
write(17,*) i,ev(i) write(17,*) i,ev(i)
enddo enddo
close(17) close(17)
endif endif
endif endif
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
! Test correctness of result (using plain scalapack routines) ! Test correctness of result (using plain scalapack routines)
allocate(tmp1(na_rows,na_cols)) allocate(tmp1(na_rows,na_cols))
......
...@@ -102,6 +102,7 @@ program test_complex2 ...@@ -102,6 +102,7 @@ program test_complex2
#ifdef HAVE_DETAILED_TIMINGS #ifdef HAVE_DETAILED_TIMINGS
use timings use timings
#endif #endif
use output_types
implicit none implicit none
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
...@@ -133,10 +134,14 @@ program test_complex2 ...@@ -133,10 +134,14 @@ program test_complex2
#ifdef WITH_OPENMP #ifdef WITH_OPENMP
integer(kind=ik) :: omp_get_max_threads, required_mpi_thread_level, provided_mpi_thread_level integer(kind=ik) :: omp_get_max_threads, required_mpi_thread_level, provided_mpi_thread_level
#endif #endif
logical :: write_to_file
logical :: successELPA, success logical :: successELPA, success
integer(kind=ik) :: numberOfDevices integer(kind=ik) :: numberOfDevices
logical :: gpuAvailable logical :: gpuAvailable
type(output_t) :: write_to_file
character(len=8) :: task_suffix
integer(kind=ik) :: j
success = .true.
successELPA = .true. successELPA = .true.
gpuAvailable = .false. gpuAvailable = .false.
...@@ -313,15 +318,30 @@ program test_complex2 ...@@ -313,15 +318,30 @@ program test_complex2
if(myid == 0) print *,'Time transform back EVs :',time_evp_back 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(myid == 0) print *,'Total time (sum above) :',time_evp_back+time_evp_solve+time_evp_fwd
if(write_to_file) then if(write_to_file%eigenvectors) then
write(unit = task_suffix, fmt = '(i8.8)') myid
open(17,file="EVs_complex2_out_task_"//task_suffix(1:8)//".txt",form='formatted',status='new')
write(17,*) "Part of eigenvectors: na_rows=",na_rows,"of na=",na," na_cols=",na_cols," of na=",na
do i=1,na_rows
do j=1,na_cols
write(17,*) "row=",i," col=",j," element of eigenvector=",z(i,j)
enddo
enddo
close(17)
endif
if(write_to_file%eigenvalues) then
if (myid == 0) then if (myid == 0) then
open(17,file="EVs_complex2_out.txt",form='formatted',status='new') open(17,file="Eigenvalues_complex2_out.txt",form='formatted',status='new')
do i=1,na do i=1,na
write(17,*) i,ev(i) write(17,*) i,ev(i)
enddo enddo
close(17) close(17)
endif endif
endif endif
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
! Test correctness of result (using plain scalapack routines) ! Test correctness of result (using plain scalapack routines)
allocate(tmp1(na_rows,na_cols)) allocate(tmp1(na_rows,na_cols))
......
...@@ -93,6 +93,7 @@ program test_real ...@@ -93,6 +93,7 @@ program test_real
#ifdef HAVE_DETAILED_TIMINGS #ifdef HAVE_DETAILED_TIMINGS
use timings use timings
#endif #endif
use output_types
implicit none implicit none
...@@ -121,11 +122,10 @@ program test_real ...@@ -121,11 +122,10 @@ program test_real
integer(kind=ik) :: omp_get_max_threads, required_mpi_thread_level, & integer(kind=ik) :: omp_get_max_threads, required_mpi_thread_level, &
provided_mpi_thread_level provided_mpi_thread_level
#endif #endif
logical :: write_to_file type(output_t) :: write_to_file
logical :: success logical :: success
character(len=8) :: task_suffix
integer :: j integer(kind=ik) :: j
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
success = .true. success = .true.
...@@ -267,9 +267,23 @@ program test_real ...@@ -267,9 +267,23 @@ program test_real
if(myid == 0) print *,'Time solve_tridi :',time_evp_solve 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 trans_ev_real :',time_evp_back
if(myid == 0) print *,'Total time (sum above):',time_evp_back+time_evp_solve+time_evp_fwd if(myid == 0) print *,'Total time (sum above):',time_evp_back+time_evp_solve+time_evp_fwd
if(write_to_file) then
if(write_to_file%eigenvectors) then
write(unit = task_suffix, fmt = '(i8.8)') myid
open(17,file="EVs_real_out_task_"//task_suffix(1:8)//".txt",form='formatted',status='new')
write(17,*) "Part of eigenvectors: na_rows=",na_rows,"of na=",na," na_cols=",na_cols," of na=",na
do i=1,na_rows
do j=1,na_cols
write(17,*) "row=",i," col=",j," element of eigenvector=",z(i,j)
enddo
enddo
close(17)
endif
if(write_to_file%eigenvalues) then
if (myid == 0) then if (myid == 0) then
open(17,file="EVs_real_out.txt",form='formatted',status='new') open(17,file="Eigenvalues_real_out.txt",form='formatted',status='new')
do i=1,na do i=1,na
write(17,*) i,ev(i) write(17,*) i,ev(i)
enddo enddo
...@@ -277,6 +291,7 @@ program test_real ...@@ -277,6 +291,7 @@ program test_real
endif endif
endif endif
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
! Test correctness of result (using plain scalapack routines) ! Test correctness of result (using plain scalapack routines)
allocate(tmp1(na_rows,na_cols)) allocate(tmp1(na_rows,na_cols))
......
...@@ -100,6 +100,7 @@ program test_real2 ...@@ -100,6 +100,7 @@ program test_real2
#ifdef HAVE_DETAILED_TIMINGS #ifdef HAVE_DETAILED_TIMINGS
use timings use timings
#endif #endif
use output_types
implicit none implicit none
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
...@@ -126,10 +127,12 @@ program test_real2 ...@@ -126,10 +127,12 @@ program test_real2
#ifdef WITH_OPENMP #ifdef WITH_OPENMP
integer(kind=ik) :: omp_get_max_threads, required_mpi_thread_level, provided_mpi_thread_level integer(kind=ik) :: omp_get_max_threads, required_mpi_thread_level, provided_mpi_thread_level
#endif #endif
logical :: write_to_file
logical :: successELPA, success logical :: successELPA, success
integer(kind=ik) :: numberOfDevices integer(kind=ik) :: numberOfDevices
logical :: gpuAvailable logical :: gpuAvailable
type(output_t) :: write_to_file
character(len=8) :: task_suffix
integer(kind=ik) :: j
successELPA = .true. successELPA = .true.
gpuAvailable = .false. gpuAvailable = .false.
...@@ -280,15 +283,30 @@ program test_real2 ...@@ -280,15 +283,30 @@ program test_real2
if(myid == 0) print *,'Total time (sum above) :',time_evp_back+time_evp_solve+time_evp_fwd if(myid == 0) print *,'Total time (sum above) :',time_evp_back+time_evp_solve+time_evp_fwd
if(write_to_file) then if(write_to_file%eigenvectors) then
write(unit = task_suffix, fmt = '(i8.8)') myid
open(17,file="EVs_real2_out_task_"//task_suffix(1:8)//".txt",form='formatted',status='new')
write(17,*) "Part of eigenvectors: na_rows=",na_rows,"of na=",na," na_cols=",na_cols," of na=",na
do i=1,na_rows
do j=1,na_cols
write(17,*) "row=",i," col=",j," element of eigenvector=",z(i,j)
enddo
enddo
close(17)
endif
if(write_to_file%eigenvalues) then
if (myid == 0) then if (myid == 0) then
open(17,file="EVs_real2_out.txt",form='formatted',status='new') open(17,file="Eigenvalues_real2_out.txt",form='formatted',status='new')
do i=1,na do i=1,na
write(17,*) i,ev(i) write(17,*) i,ev(i)
enddo enddo
close(17) close(17)
endif endif
endif endif
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
! Test correctness of result (using plain scalapack routines) ! Test correctness of result (using plain scalapack routines)
allocate(tmp1(na_rows,na_cols)) allocate(tmp1(na_rows,na_cols))
......
...@@ -103,7 +103,7 @@ program test_real2 ...@@ -103,7 +103,7 @@ program test_real2
#ifdef HAVE_DETAILED_TIMINGS #ifdef HAVE_DETAILED_TIMINGS
use timings use timings
#endif #endif
use output_types
implicit none implicit none
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
...@@ -130,10 +130,12 @@ program test_real2 ...@@ -130,10 +130,12 @@ program test_real2
#ifdef WITH_OPENMP #ifdef WITH_OPENMP
integer(kind=ik) :: omp_get_max_threads, required_mpi_thread_level, provided_mpi_thread_level integer(kind=ik) :: omp_get_max_threads, required_mpi_thread_level, provided_mpi_thread_level
#endif #endif
logical :: write_to_file
logical :: successELPA, success logical :: successELPA, success
integer(kind=ik) :: numberOfDevices integer(kind=ik) :: numberOfDevices
logical :: gpuAvailable logical :: gpuAvailable
type(output_t) :: write_to_file
character(len=8) :: task_suffix
integer(kind=ik) :: j
successELPA = .true. successELPA = .true.
gpuAvailable = .false. gpuAvailable = .false.
...@@ -383,15 +385,29 @@ program test_real2 ...@@ -383,15 +385,29 @@ program test_real2
if(myid == 0) print *,'Time transform back EVs :',time_evp_back 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(myid == 0) print *,'Total time (sum above) :',time_evp_back+time_evp_solve+time_evp_fwd
if(write_to_file) then if(write_to_file%eigenvectors) then
write(unit = task_suffix, fmt = '(i8.8)') myid
open(17,file="EVs_real2_out_task_"//task_suffix(1:8)//".txt",form='formatted',status='new')
write(17,*) "Part of eigenvectors: na_rows=",na_rows,"of na=",na," na_cols=",na_cols," of na=",na
do i=1,na_rows
do j=1,na_cols
write(17,*) "row=",i," col=",j," element of eigenvector=",z(i,j)
enddo
enddo
close(17)
endif
if(write_to_file%eigenvalues) then
if (myid == 0) then if (myid == 0) then
open(17,file="EVs_real2_out.txt",form='formatted',status='new') open(17,file="Eigenvalues_real2_out.txt",form='formatted',status='new')
do i=1,na do i=1,na
write(17,*) i,ev(i) write(17,*) i,ev(i)
enddo enddo
close(17) close(17)
endif endif
endif endif
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
! Test correctness of result (using plain scalapack routines) ! Test correctness of result (using plain scalapack routines)