Commit 1ddd915b authored by Matthias Redies's avatar Matthias Redies

pre-valgrind session

parent 6c236cdc
......@@ -11,7 +11,7 @@ if (${CMAKE_Fortran_COMPILER_ID} MATCHES "Intel")
else()
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -mkl -r8 -qopenmp -assume byterecl")
endif()
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -xHost -O2 -g")
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -xHost -O0 -g")
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -C -traceback -O0 -g -ftrapuv -check uninit -check pointers -CB -DCPP_DEBUG")
elseif(${CMAKE_Fortran_COMPILER_ID} MATCHES "PGI")
message("PGI Fortran detected")
......
......@@ -229,6 +229,7 @@ subroutine save_kinED(xcpot, input, noco, stars, cell, sym)
use m_types
use m_pw_tofrom_grid
use m_judft_stop
use m_metagga, only: give_stats
implicit none
CLASS(t_xcpot),INTENT(IN) :: xcpot
......@@ -246,11 +247,30 @@ subroutine save_kinED(xcpot, input, noco, stars, cell, sym)
do dim_idx = 1,3
call pw_to_grid(xcpot, input%jspins, noco%l_noco, stars, cell, &
xcpot%comparison_kinED_pw(dim_idx)%pw, grad, tmp)
if(.not. allocated(kinED)) allocate(kinED, mold=tmp)
if(any(tmp > 1e5)) then
write (*,*) "tmp > 1e5 for", dim_idx
call give_stats(tmp, "tmp(dim_idx)")
endif
if(.not. allocated(kinED)) then
allocate(kinED, mold=tmp)
kinED = 0.0
endif
kinEd = kinED + tmp
enddo
open(unit=69, file="kin_ED_rezi_x.dat")
write (69,'(ES17.10)') xcpot%comparison_kinED_pw(1)%pw
close(69)
open(unit=69, file="kin_ED_rezi_y.dat")
write (69,'(ES17.10)') xcpot%comparison_kinED_pw(2)%pw
close(69)
open(unit=69, file="kin_ED_rezi_z.dat")
write (69,'(ES17.10)') xcpot%comparison_kinED_pw(3)%pw
close(69)
kinED = 0.5 * kinED
call finish_pw_grid()
......
......@@ -22,20 +22,22 @@ CONTAINS
REAL, PARAMETER :: eps = 1e-15
!implicit allocation
call give_stats(EnergyDen_RS, array_name="ED_RS")
call give_stats(vTot_RS, array_name="vTot_RS")
call give_stats(den_RS, array_name="den_RS")
kinEnergyDen_RS = EnergyDen_RS - vTot_RS * den_RS
call give_stats(kinEnergyDen_RS, array_name="kin_ED_RS")
if(all(shape(kinEnergyDen_RS) == [6144,1])) then
call give_stats(EnergyDen_RS, array_name="ED_RS")
call give_stats(vTot_RS, array_name="vTot_RS")
call give_stats(den_RS, array_name="den_RS")
call give_stats(kinEnergyDen_RS, array_name="kin_ED_RS")
endif
write (*,*) ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
if(any(kinEnergyDen_RS < eps)) then
write (6,*) " lowest kinetic energy density cutoff = ", minval(kinEnergyDen_RS)
kinEnergyDen_RS = max(kinEnergyDen_RS, eps)
endif
write (*,*) "kinED shape:", shape(kinEnergyDen_RS)
if(all(shape(kinEnergyDen_RS) == [6144,1])) then
write (*,*) "kinED shape:", shape(kinEnergyDen_RS)
write (*,*) "write old"
open(unit=69, file="kinED_pw_schroeway.dat")
write (69,'(ES17.10)') kinEnergyDen_RS
......
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