Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
95e9251
removing unused variables and take care of other warnings triggered b…
johanneshofmann87 Apr 1, 2026
8601be0
Update Prog/udv_state_mod.F90
johanneshofmann87 Apr 1, 2026
a6443c8
Add comments explaining INTENT(INOUT) for pointer targets in observab…
Copilot Apr 1, 2026
50ebe21
Merge branch 'master' into 625-pedantic-compiler-warnings
johanneshofmann87 Apr 3, 2026
3dd086f
Define pi and some accurences of Zero as constants
jonasschwab Apr 3, 2026
586c2d0
Remove unused variables in Libraries/Modules/entanglement_mod.F90 and…
jonasschwab Apr 3, 2026
beff85d
Remove further unused variables
jonasschwab Apr 3, 2026
cd2b216
Refactor constants in codebase to use Natural_Constants module
johanneshofmann87 Apr 7, 2026
81e7e68
Remove unused pi imports from Natural_Constants in 7 files
Copilot Apr 7, 2026
bb8977f
configure.sh DEVEL: Compile with -pedantic -Werror except for libqrre…
jonasschwab Apr 30, 2026
a688b1e
Fix compilation of entanglement_mod
jonasschwab Apr 30, 2026
3cf8574
Merge branch 'master' into 625-pedantic-compiler-warnings
johanneshofmann87 May 5, 2026
9506fd5
Hop_mod: Remove unused variable 'Zero'
jonasschwab May 5, 2026
63d6f14
Hop_mod: Remove unused module 'Natural_Constants'
jonasschwab May 5, 2026
72c6b3c
Merge branch 'master' into 625-pedantic-compiler-warnings
johanneshofmann87 Jun 3, 2026
c3688eb
fix another constant (1.d-12 to ems_machine) introduced by merge
johanneshofmann87 Jun 3, 2026
929e152
fix tests (pi now imported via maxent wrapper module)
johanneshofmann87 Jun 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions Analysis/Max_SAC.F90
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Program MaxEnt_Wrapper
!
!--------------------------------------------------------------------
Use runtime_error_mod
Use Natural_Constants, only: pi, Eps_small
Use MaxEnt_stoch_mod
Use MaxEnt_mod
use MaxEnt_Wrapper_mod
Expand All @@ -56,10 +57,10 @@ Program MaxEnt_Wrapper
Real (Kind=Kind(0.d0)), Dimension(:) , allocatable :: XQMC, XQMC_st, XTAU, Xtau_st, &
& Alpha_tot, om_bf, alp_bf, xom, A
Real (Kind=Kind(0.d0)), Dimension(:,:), allocatable :: XCOV, XCOV_st
Real (Kind=Kind(0.d0)) :: X_moments(2), Xerr_moments(2), ChiSq
Real (Kind=Kind(0.d0)) :: ChiSq
Character (Len=64) :: command, File1, File2
Complex (Kind=Kind(0.d0)) :: Z
Logical :: Test =.false.
Logical, parameter :: Test =.false.


Integer :: Ngamma, Ndis, NBins, NSweeps, Nwarm, N_alpha, N_cov
Expand All @@ -73,9 +74,10 @@ Program MaxEnt_Wrapper
Real (Kind=Kind(0.d0)), allocatable :: Xker_classic(:,:), A_classic(:), Default(:)

Integer :: nt, nt1, io_error, n,nw, nwp, ntau, N_alpha_1, i, nbin_qmc
Integer :: ntau_st, ntau_en, ntau_new, Ntau_old
Real (Kind=Kind(0.d0)) :: dtau, pi, xmom1, x,x1,x2, tau, omp, om, Beta,err, delta, Dom
Real (Kind=Kind(0.d0)) :: Zero, Alpha_classic_st=100000.d0
Integer :: ntau_st, ntau_en, Ntau_old
Real (Kind=Kind(0.d0)) :: dtau, xmom1, x,x1,x2, tau, omp, om, Beta,err, delta, Dom
Real (Kind=Kind(0.d0)), parameter :: Zero = Eps_small
Real (Kind=Kind(0.d0)) :: Alpha_classic_st=100000.d0
Integer :: N_BZ_Zones = 1
Logical :: Extended_Zone = .false.

Expand Down Expand Up @@ -159,8 +161,6 @@ Program MaxEnt_Wrapper
Write(50,13) "Alpha_st",alpha_st
Write(50,13) "R", R
endif
Zero= 1.D-10
pi = acos(-1.d0)
Ntau_st = 1
Ntau_en = Ntau
Select Case (str_to_upper(Channel))
Expand Down Expand Up @@ -420,7 +420,6 @@ Program MaxEnt_Wrapper

! Compute the real frequency Green function.
delta = Dom
pi = acos(-1.d0)
x = 0.d0
x1 = 0.d0
x2 = 0.d0
Expand Down
2 changes: 1 addition & 1 deletion Analysis/ana_hdf5.F90
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Program ana_hdf5
#endif
implicit none
Integer :: i, hdferr, nargs, storage_type, nlinks, max_corder
Character (len=64) :: File_out, File_in, name
Character (len=64) :: File_in, name
Character (len=64), allocatable :: names(:)
INTEGER(HID_T) :: file_id, group_id
INTEGER(HSIZE_T) :: n
Expand Down
32 changes: 15 additions & 17 deletions Analysis/ana_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ module ana_mod
!> Collection of routines for postprocessing the Monte Carlo bins
!
!--------------------------------------------------------------------
Use Natural_Constants, only: Eps_small, Eps_convergence
use iso_fortran_env, only: output_unit, error_unit
use Files_mod
Use Errors
Expand Down Expand Up @@ -171,9 +172,8 @@ Subroutine read_vec_hdf5(filename, groupname, sgn, bins, analysis_mode)

Character (len=64) :: file, obs_dsetname, sgn_dsetname
INTEGER :: rank, hdferr
INTEGER(HSIZE_T) :: mem_dims(1)
INTEGER(HSIZE_T), allocatable :: dims(:), maxdims(:)
INTEGER(HID_T) :: file_id, dset_id, dataspace, memspace
INTEGER(HID_T) :: file_id, dset_id, dataspace
TYPE(C_PTR) :: dat_ptr

file = 'data.h5'
Expand Down Expand Up @@ -267,7 +267,7 @@ Subroutine read_local(file, sgn, bins, Latt, Latt_unit, dtau, Channel)

Character (len=64) :: file_aux, str_temp1, str_temp2
Integer, allocatable :: List(:,:), Invlist(:,:) ! For orbital structure of Unit cell
Integer :: no, no1, n, nt, nb, Ntau, Ndim, Nbins, stat, Ndim_unit
Integer :: no, n, nt, nb, Ntau, Ndim, Nbins, stat, Ndim_unit
Real(Kind=Kind(0.d0)) :: X
Real(Kind=Kind(0.d0)), allocatable :: Xr_p(:,:), Orb_pos_temp(:)
Real(Kind=Kind(0.d0)) :: x_p(2), a1_p(2), a2_p(2), L1_p(2), L2_p(2)
Expand Down Expand Up @@ -1051,11 +1051,11 @@ Subroutine ana_tau(name_obs, sgn, bins_raw, bins0_raw, Latt, Latt_unit, dtau, Ch

Logical :: PartHole, L_Back, Extended_Zone
Character (len=64) :: File_out, command, xk1_str, xk2_str
Real (Kind=Kind(0.d0)), parameter :: Zero=1.D-8
Real (Kind=Kind(0.d0)), parameter :: Zero=Eps_small
Integer :: N_skip, N_rebin, N_Cov, N_Back, N_auto, N_BZ_Zones
Integer :: Nbins, LT, Lt_eff, n_mk
Integer :: nb, no, no1, no2, n,i, nt, nt1, ierr, Norb, NBZ_1, NBZ_2
Complex (Kind=Kind(0.d0)) :: Z, Zmean, Zerr
Complex (Kind=Kind(0.d0)) :: Z
Real (Kind=Kind(0.d0)), allocatable :: Phase(:)
Complex (Kind=Kind(0.d0)), allocatable :: V_help_loc(:,:,:,:), Bins_help(:,:,:,:)
Real (Kind=Kind(0.d0)), allocatable :: Xk_p(:,:), Xk_p1(:), Xk_extended_p(:), X
Expand Down Expand Up @@ -1156,8 +1156,7 @@ Subroutine ana_tau(name_obs, sgn, bins_raw, bins0_raw, Latt, Latt_unit, dtau, Ch
Xk_Extended_p(:) = Xk_p(:,n) + NBZ_1 * Latt%BZ1_p + NBZ_2 * Latt%BZ2_p
if ( Xk_Extended_p(1) >= -zero .and. XK_Extended_p(2) >= -zero ) then
L_back = .false.
if ( sqrt(Xk_extended_p(1)**2 + Xk_extended_p(2)**2) < 1.D-6 .and. N_Back == 1 ) L_back = .true.
! Set weights
if ( sqrt(Xk_extended_p(1)**2 + Xk_extended_p(2)**2) < Eps_convergence .and. N_Back == 1 ) L_back = .true.
If (Extended_Zone) then
do no = 1,Norb
X = 0.d0
Expand Down Expand Up @@ -1263,7 +1262,7 @@ Subroutine ana_tau(name_obs, sgn, bins_raw, bins0_raw, Latt, Latt_unit, dtau, Ch
enddo
if (PartHole) V_help_suscep = V_help_suscep * cmplx(2.d0,0.d0,Kind(0.d0))
L_back = .false.
if ( sqrt(Xk_p(1,n)**2 + Xk_p(2,n)**2) < 1.D-6 .and. N_Back == 1 ) L_back = .true.
if ( sqrt(Xk_p(1,n)**2 + Xk_p(2,n)**2) < Eps_convergence .and. N_Back == 1 ) L_back = .true.
call COV(V_help_suscep, phase, Xcov, Xmean, background, L_back, N_rebin, Weights )
Xmean_st(n) = Xmean(1)*dtau
Xerr_st(n) = Sqrt(Xcov(1,1))*dtau
Expand Down Expand Up @@ -1333,12 +1332,11 @@ Subroutine ana_local(name, sgn, bins_raw, Latt, Latt_unit)
Integer :: N_skip, N_rebin, N_Cov, N_Back, N_auto
Integer :: Nbins, N_BZ_Zones
Logical :: Extended_Zone
Integer :: i, n, nb, no, no1, ierr
Integer :: n, nb, no, ierr
Complex (Kind=Kind(0.d0)), allocatable :: Phase(:)
Complex (Kind=Kind(0.d0)), allocatable :: V_help(:)
Real (Kind=Kind(0.d0)) :: Xr_p(2)
Complex (Kind=Kind(0.d0)) :: Z, Xmean, Xerr, Xmean_r, Xerr_r
Real (Kind=Kind(0.d0)) :: Xm,Xe
Complex (Kind=Kind(0.d0)) :: Xmean, Xerr

NAMELIST /VAR_errors/ N_skip, N_rebin, N_Cov, N_Back, N_auto, N_BZ_Zones, Extended_Zone

Expand Down Expand Up @@ -1542,7 +1540,7 @@ Subroutine ana_eq(name, sgn, bins_raw, bins0_raw, Latt, Latt_unit)
do n = 1, Latt%N
Xk_Extended_p(:) = Xk_p_s(:,n) + NBZ_1 * Latt%BZ1_p + NBZ_2 * Latt%BZ2_p
L_back = .false.
if ( sqrt(Xk_Extended_p(1)**2 + Xk_Extended_p(2)**2) < 1.D-6 .and. N_Back == 1 ) L_back = .true.
if ( sqrt(Xk_Extended_p(1)**2 + Xk_Extended_p(2)**2) < Eps_convergence .and. N_Back == 1 ) L_back = .true.
do no = 1,Latt_unit%Norb
X = 0.d0
do i = 1,size(Latt%BZ1_p,1)
Expand Down Expand Up @@ -1575,7 +1573,7 @@ Subroutine ana_eq(name, sgn, bins_raw, bins0_raw, Latt, Latt_unit)
do nb = 1,Nbins
V_help(1,nb) = bins (n,nb)%el(no,no1)
enddo
if ( sqrt(Xk_p(1)**2 + Xk_p(2)**2) < 1.D-6 ) then
if ( sqrt(Xk_p(1)**2 + Xk_p(2)**2) < Eps_convergence ) then
do nb = 1,Nbins
V_help(2,nb) = Bins0(nb,no)*Latt%N
V_help(3,nb) = Bins0(nb,no1)
Expand Down Expand Up @@ -1865,7 +1863,7 @@ subroutine write_obs_vec_hdf5(filename, groupname, sgn, bins, analysis_mode)

Integer :: Nobs, Nbins

INTEGER :: i, ierr
INTEGER :: ierr
Character (len=64) :: obs_dsetname, sgn_dsetname
INTEGER(HID_T) :: file_id, group_id
logical :: file_exists, link_exists
Expand Down Expand Up @@ -1981,7 +1979,7 @@ subroutine write_obs_latt_hdf5(filename, groupname, sgn, bins, bins0, Latt, Latt

Integer :: Norb, Nunit, Ntau, Nbins

INTEGER :: i, ierr
INTEGER :: ierr
Character (len=64) :: obs_dsetname, bak_dsetname, sgn_dsetname
INTEGER(HID_T) :: file_id, group_id
logical :: file_exists, link_exists
Expand Down Expand Up @@ -2107,8 +2105,8 @@ subroutine write_obs_local_hdf5(filename, groupname, sgn, bins, Latt, Latt_unit,

Integer :: Norb, Nunit, Ntau, Nbins

INTEGER :: i, ierr
Character (len=64) :: obs_dsetname, bak_dsetname, sgn_dsetname
INTEGER :: ierr
Character (len=64) :: obs_dsetname, sgn_dsetname
INTEGER(HID_T) :: file_id, group_id
logical :: file_exists, link_exists
INTEGER(HSIZE_T), allocatable :: dims(:)
Expand Down
12 changes: 4 additions & 8 deletions Analysis/cov_eq.F90
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,15 @@ Program Cov_eq


Integer :: Nunit, Norb, ierr
Integer :: no, no1, n, n1,m, nbins, n_skip, nb, N_rebin, N_cov, N_Back
Integer :: no, no1, n, m, nbins, n_skip, nb, N_rebin, N_cov, N_Back
real (Kind=Kind(0.d0)):: X, Y
Complex (Kind=Kind(0.d0)), allocatable :: Phase(:)
Type (Mat_C), allocatable :: Bins (:,:), Bins_R(:,:)
Complex (Kind=Kind(0.d0)), allocatable :: Bins0(:,:)
Complex (Kind=Kind(0.d0)) :: Z, Xmean,Xerr, Xmean_r, Xerr_r
Real (Kind=Kind(0.d0)) :: Xm,Xe
Real (Kind=Kind(0.d0)) :: Xk_p(2), XR_p(2) , XR1_p(2)
Complex (Kind=Kind(0.d0)), allocatable :: V_help(:), V_help_R(:)
Real (Kind=Kind(0.d0)) :: Pi, a1_p(2), a2_p(2), L1_p(2), L2_p(2), del_p(2)
Real (Kind=Kind(0.d0)) :: Xk_p(2), XR_p(2)
Complex (Kind=Kind(0.d0)), allocatable :: V_help(:)
Real (Kind=Kind(0.d0)), allocatable :: AutoCorr(:),En(:)

Integer :: L1, L2, I, N_auto, Ndim
Expand All @@ -73,7 +72,6 @@ Program Cov_eq
Type(Unit_cell) :: Latt_Unit
Character (len=64) :: File_out


NAMELIST /VAR_Lattice/ L1, L2, Lattice_type, Model

NAMELIST /VAR_errors/ n_skip, N_rebin, N_Cov, N_Back, N_auto
Expand Down Expand Up @@ -101,7 +99,6 @@ Program Cov_eq


! Determine the number of bins.
Pi = acos(-1.d0)
Open ( Unit=10, File="ineq", status="unknown" )
nbins = 0
do
Expand Down Expand Up @@ -131,7 +128,7 @@ Program Cov_eq
endif

! Allocate space
Allocate ( bins(Nunit,Nbins), bins_r(Nunit,Nbins), Phase(Nbins), V_help(Nbins), V_help_R(Nbins), Bins0(Nbins,Norb))
Allocate ( bins(Nunit,Nbins), bins_r(Nunit,Nbins), Phase(Nbins), V_help(Nbins), Bins0(Nbins,Norb))
Do n = 1,Nunit
do nb = 1,nbins
Call Make_Mat(bins (n,nb),Norb)
Expand Down Expand Up @@ -294,7 +291,6 @@ end Program Cov_eq
!!$ Integer :: m
!!$
!!$ Zero = 1.D-4
!!$ pi = acos(-1.d0)
!!$ X1_p(1) = Xk_p(2,n)
!!$ X1_p(2) = -Xk_p(1,n)
!!$ if (X1_p(1) < -pi + Zero ) X1_p(1) = X1_p(1) + 2.0*pi
Expand Down
10 changes: 5 additions & 5 deletions Analysis/cov_tau.F90
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Program Cov_tau
Use Errors
Use MyMats
Use Matrix
Use Natural_Constants, only: Eps_small
use iso_fortran_env, only: output_unit, error_unit
#ifdef _OPENMP
use check_omp_num_threads_mod
Expand All @@ -53,11 +54,11 @@ Program Cov_tau
Integer :: Nunit, Norb, N_auto
Integer :: no, no1, n, nbins, n_skip, nb, NT, NT1, Lt, N_rebin, N_cov, ierr, N_Back
Integer :: Lt_eff
real (Kind=Kind(0.d0)):: X, Y, dtau, X_diag
real (Kind=Kind(0.d0)):: X, Y, dtau
Complex (Kind=Kind(0.d0)), allocatable :: Xmean(:), Xcov(:,:)
Complex (Kind=Kind(0.d0)) :: Zmean, Zerr
Complex (Kind=Kind(0.d0)) :: Z, Z_diag
Real (Kind=Kind(0.d0)) :: Zero=1.D-8
Real (Kind=Kind(0.d0)), parameter :: Zero=Eps_small
Real (Kind=Kind(0.d0)), allocatable :: Phase(:)
Complex (Kind=Kind(0.d0)), allocatable :: PhaseI(:)
Complex (Kind=Kind(0.d0)), allocatable :: Bins(:,:,:), Bins_chi(:,:), OneBin(:,:,:)
Expand Down Expand Up @@ -309,11 +310,10 @@ end Program Cov_tau
!!$ Real (Kind=Kind(0.d0)), INTENT(IN) :: Xk_p(2,Nunit)
!!$
!!$ !Local
!!$ real (Kind=Kind(0.d0)) :: X1_p(2), Zero, pi, X
!!$ real (Kind=Kind(0.d0)) :: X1_p(2), X
!!$ real (Kind=Kind(0.d0)), parameter :: Zero = 1.D-4, pi = acos(-1.d0)
!!$ Integer :: m
!!$
!!$ Zero = 1.D-4
!!$ pi = acos(-1.d0)
!!$ X1_p(1) = Xk_p(2,n)
!!$ X1_p(2) = -Xk_p(1,n)
!!$ if (X1_p(1) < -pi + Zero ) X1_p(1) = X1_p(1) + 2.0*pi
Expand Down
Loading
Loading