Skip to content
Snippets Groups Projects
Commit 02ea1f7e authored by Philipp Rüssmann's avatar Philipp Rüssmann
Browse files

Add compile options for rllsll standalone test

parent 973cd685
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,12 @@ option(COMPILE_KKRSUSC "Compile KKRsusc" OFF)
option(COMPILE_PKKPRIME "Compile PKKprime" ON)
option(COMPILE_VORONOI "Compile voronoi" ON)
option(COMPILE_RHOQ "Compile rhoq" ON)
option(WRITE_RLLSLL_STANDALONE_INPUT "Set option to write out rllsll input files" OFF)
option(ENABLE_RLLSLL_STANDALONE "Compile rllsll standalone test exec" OFF)
if(ENABLE_RLLSLL_STANDALONE)
include( ./cmake/source_list_rllsll_test.txt )
endif()
if(COMPILE_KKRHOST)
include( ./cmake/source_list_KKRhost.txt )
......
......@@ -24,6 +24,12 @@ endif()
#set_source_files_properties(source/KKRhost/rhoval.F90 PROPERTIES COMPILE_FLAGS "${ompflags}")
# special option, preparation for rllsll standalone test
if(WRITE_RLLSLL_STANDALONE_INPUT)
add_definitions(-Dtest_prep)
endif()
# some static dimensions used in Dirac solver
execute_process(COMMAND ln -s ../source/KKRhost/sprkkr_rmesh.dim .)
......@@ -385,5 +391,4 @@ if(ENABLE_BdG)
if(CMAKE_Fortran_COMPILER_ID MATCHES GNU)
target_link_libraries(kkr_BdG_radial.x ${lapackblas_libraries})
endif()
endif()
# deal with OpenMP flags:
set_source_files_properties(source/common/radial_solver_Chebychev/rllsll.F90 PROPERTIES COMPILE_FLAGS "${ompflags}")
add_definitions(-Dtest_run)
add_executable(
rllsll_standalone.x
source/common/radial_solver_Chebychev/rllsll.F90
source/common/radial_solver_Chebychev/chebint.f90
source/common/DataTypes.f90
source/common/timing.F90
source/common/constants.f90
source/common/types.F90
source/common/global_variables.F90
source/common/version_info.F90
source/common/version.F90
)
if(CMAKE_Fortran_COMPILER_ID MATCHES GNU)
target_link_libraries(rllsll_standalone.x ${lapackblas_libraries})
endif()
......@@ -254,7 +254,7 @@ if (my_rank==0) then
write(*,*) ' ########## MPI Initialization ############'
write(*,*) ' ###############################################'
write(*,*) ' ### using ',mpi_size,' processors'
if(t_inc%i_write) write(1337,*) ' ### using ',mpi_size,' processors'
if(t_inc%i_write>0) write(1337,*) ' ### using ',mpi_size,' processors'
write(*,*) ' ###############################################'
end if
#endif
......
......@@ -767,16 +767,18 @@ end module mod_rllsll
!-------------------------------------------------------------------------------
program test_rllsll
use :: mod_timing, only:
use :: mod_constants, only:
use omp_lib, only: omp_get_num_threads, omp_get_thread_num
use :: mod_timing, only: timing_start, timing_init, timing_stop
use :: mod_constants, only: czero
use :: mod_datatypes, only: dp
use :: mod_rllsll, only: rllsll
implicit none
integer :: ir
logical, parameter :: output = .true.
logical :: output = .true.
integer :: ncheb, npan, lmsize, lmsize2, nvec, nrmax, lbessel, use_sratrick1
integer :: ncheb, npan, lmsize, lmsize2, nvec, nrmax, lbessel, use_sratrick1, write_output
complex (kind=dp) :: gmatprefactor
character (len=1) :: cmoderll, cmodesll, cmodetest
......@@ -793,18 +795,20 @@ program test_rllsll
write (*, '(A)') ' start reading data from file data_rllsll.txt'
open (1234, file='data_rllsll.txt')
read (1234, *) write_output
if (write_output==0) output = .false.
read (1234, '(7i9)') lbessel, nrmax, lmsize, nvec, npan, ncheb, use_sratrick1
read (1234, '(3a5)') cmoderll, cmodesll, cmodetest
lmsize2 = nvec*lmsize
write (*, '(A)') ' read in parameters:'
write (*, '(A,3I9)') ' lbessel, nrmax, lmsize, nvec = ', lbessel, nrmax, lmsize, nvec
write (*, '(A,4I9)') ' lbessel, nrmax, lmsize, nvec = ', lbessel, nrmax, lmsize, nvec
write (*, '(A,2I9)') ' npan, ncheb = ', npan, ncheb
write (*, '(A,I9)') ' use_sratrick1 = ', use_sratrick1
write (*, '(A,3A9)') ' cmoderll, cmodesll, cmodetest = ', cmoderll, cmodesll, cmodetest
write (*, '(A)') ' reding in arrays ...'
write (*, '(A)') ' reading in arrays ...'
allocate (hlk(lbessel,nrmax), jlk(lbessel,nrmax), hlk2(lbessel,nrmax), jlk2(lbessel,nrmax))
allocate (jlk_index(nvec*lmsize))
......@@ -832,10 +836,15 @@ program test_rllsll
write (*, '(A)')
write (*, '(A)') ' starting rllsll ...'
!$OMP PARALLEL
if(omp_get_thread_num()==0) then
write (*, '(A,i5,A)') ' use', omp_get_num_threads(), ' OpenMP threads'
end if
!$OMP END PARALLEL
write (*, '(A)')
call timing_start('total rllsll')
call rllsll(rpanbound, rmesh, vll, rll, sll, tllp, ncheb, npan, lmsize, lmsize2, lbessel, nrmax, nrmax, nvec, jlk_index, hlk, jlk, hlk2, jlk2, gmatprefactor, cmoderll, &
call rllsll(rpanbound, rmesh, vll, rll, sll, tllp, ncheb, npan, lmsize, lmsize2, lbessel, nrmax, nvec, jlk_index, hlk, jlk, hlk2, jlk2, gmatprefactor, cmoderll, &
cmodesll, cmodetest, use_sratrick1, alphaget) ! lly
call timing_stop('total rllsll')
......@@ -894,7 +903,7 @@ subroutine write_rllsll_test_input(ncheb,npan,lmsize,nvec,nrmax,lbessel,
use_sratrick1,gmatprefactor,cmoderll,cmodesll,cmodetest,hlk,jlk,hlk2,jlk2, &
jlk_index,rpanbound,rmesh,sll,rll,tllp,vll,alphaget)
use :: mod_datatypes, only :: dp
use mod_datatypes, only: dp
implicit none
integer :: ir
......@@ -913,6 +922,7 @@ subroutine write_rllsll_test_input(ncheb,npan,lmsize,nvec,nrmax,lbessel,
write (*, '(A)') ' === starting writeout routine for rllsll ==='
open (1234, file='data_rllsll.txt')
write (1234, '(i9)') 1 ! first number says whether or not output files are written, can be set manually to 0 if no output files are desired
write (1234, '(7i9)') lbessel, nrmax, lmsize, nvec, npan, ncheb, use_sratrick1
write (1234, '(3a5)') cmoderll, cmodesll, cmodetest
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment