Skip to content

Commit 473db03

Browse files
committed
Use zone instead of ctx
Signed-off-by: Igor S. Gerasimov <foxtranigor@gmail.com>
1 parent c96a05b commit 473db03

File tree

13 files changed

+141
-141
lines changed

13 files changed

+141
-141
lines changed

src/aespot.F90

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ subroutine setdqlist(nao,ndp,nqp,thr,dpint,qpint,matdlst,matqlst)
4747

4848
integer i,j,k,l,m,ii,jj,ll,kk,mq,md,ij
4949

50-
type(xtb_zone) :: ctx
50+
type(xtb_zone) :: zone
5151

52-
call ctx%start("src/aespot.F90", "setdqlist", __LINE__, color=TracyColors%OliveDrab1)
52+
call zone%start("src/aespot.F90", "setdqlist", __LINE__, color=TracyColors%OliveDrab1)
5353

5454
! INFO: this threshold must be slightly larger than max(0,thr2),
5555
! where thr2 is the one used in screening in routine aesdqint
@@ -151,8 +151,8 @@ subroutine mmompop(nat,nao,aoat2,xyz,p,s,dpint,qpint,dipm,qp)
151151
real(wp), intent(out):: dipm(:, :)
152152
real(wp), intent(out):: qp(:, :)
153153

154-
type(xtb_zone) :: ctx
155-
call ctx%start("src/aespot.F90", "mmompop", __LINE__, color=TracyColors%OliveDrab1)
154+
type(xtb_zone) :: zone
155+
call zone%start("src/aespot.F90", "mmompop", __LINE__, color=TracyColors%OliveDrab1)
156156

157157
#ifdef XTB_GPU
158158
call mmompop_gpu(nat,nao,aoat2,xyz,p,s,dpint,qpint,dipm,qp)
@@ -440,9 +440,9 @@ subroutine aniso_electro(aesData,nat,at,xyz,q,dipm,qp,gab3,gab5,e,epol)
440440
real(wp), intent(in) :: gab3(:,:),gab5(:,:)
441441
real(wp), intent(in) :: dipm(:,:),qp(:,:)
442442

443-
type(xtb_zone) :: ctx
443+
type(xtb_zone) :: zone
444444

445-
call ctx%start("src/aespot.F90", "aniso_electro", __LINE__, color=TracyColors%OliveDrab1)
445+
call zone%start("src/aespot.F90", "aniso_electro", __LINE__, color=TracyColors%OliveDrab1)
446446

447447
#ifdef XTB_GPU
448448
call aniso_electro_gpu(aesData,nat,at,xyz,q,dipm,qp,gab3,gab5,e,epol)
@@ -676,9 +676,9 @@ subroutine fockelectro(nat,nao,aoat2,p,s,dpint,qpint,vs,vd,vq,e)
676676
real(wp) eaes,pji,fji
677677
integer i,j,k,l,ii,jj,ij,kl,kj
678678

679-
type(xtb_zone) :: ctx
679+
type(xtb_zone) :: zone
680680

681-
call ctx%start("src/aespot.F90", "fockelectro", __LINE__, color=TracyColors%OliveDrab1)
681+
call zone%start("src/aespot.F90", "fockelectro", __LINE__, color=TracyColors%OliveDrab1)
682682

683683
! CAMM
684684
eaes = 0.0_wp
@@ -738,8 +738,8 @@ subroutine setvsdq(aesData,nat,at,xyz,q,dipm,qp,gab3,gab5,vs,vd,vq)
738738
real(wp) qs1,qs2
739739
integer i,j,k,l1,l2,ll,m,mx,ki,kj
740740

741-
type(xtb_zone) :: ctx
742-
call ctx%start("src/aespot.F90", "setvsdq", __LINE__, color=TracyColors%OliveDrab1)
741+
type(xtb_zone) :: zone
742+
call zone%start("src/aespot.F90", "setvsdq", __LINE__, color=TracyColors%OliveDrab1)
743743

744744
vs = 0.0_wp
745745
vd = 0.0_wp
@@ -877,8 +877,8 @@ subroutine setdvsdq(aesData,nat,at,xyz,q,dipm,qp,gab3,gab5,vs,vd,vq)
877877
real(wp) qs1,qs2
878878
integer i,j,k,l1,l2,ll,m,mx,ki,kj
879879

880-
type(xtb_zone) :: ctx
881-
call ctx%start("src/aespot.F90", "setdvsdq", __LINE__, color=TracyColors%OliveDrab1)
880+
type(xtb_zone) :: zone
881+
call zone%start("src/aespot.F90", "setdvsdq", __LINE__, color=TracyColors%OliveDrab1)
882882

883883
vs = 0.0_wp
884884
vd = 0.0_wp
@@ -977,8 +977,8 @@ subroutine molmom(iunit,n,xyz,q,dipm,qp,dip,d3)
977977
real(wp) rr1(3),rr2(3),tma(6),tmb(6),tmc(6),dum
978978
integer i,j,k,l
979979

980-
type(xtb_zone) :: ctx
981-
call ctx%start("src/aespot.F90", "molmom", __LINE__, color=TracyColors%OliveDrab1)
980+
type(xtb_zone) :: zone
981+
call zone%start("src/aespot.F90", "molmom", __LINE__, color=TracyColors%OliveDrab1)
982982

983983
rr1 = 0.0_wp
984984
rr2 = 0.0_wp
@@ -1098,8 +1098,8 @@ subroutine aniso_grad(nat,at,xyz,q,dipm,qp,kdmp3,kdmp5, &
10981098

10991099
integer i,j,k,l,m,ki,kj,kl
11001100

1101-
type(xtb_zone) :: ctx
1102-
call ctx%start("src/aespot.F90", "aniso_grad", __LINE__, color=TracyColors%OliveDrab1)
1101+
type(xtb_zone) :: zone
1102+
call zone%start("src/aespot.F90", "aniso_grad", __LINE__, color=TracyColors%OliveDrab1)
11031103

11041104
do i = 1,nat
11051105
q1 = q(i)
@@ -1247,8 +1247,8 @@ subroutine mmomgabzero(nat,at,xyz,kdmp3,kdmp5,radcn,gab3,gab5)
12471247
real(wp) tmp1,tmp2,rr(3)
12481248
integer i,j,k,l,lin
12491249

1250-
type(xtb_zone) :: ctx
1251-
call ctx%start("src/aespot.F90", "mmomgabzero", __LINE__, color=TracyColors%OliveDrab1)
1250+
type(xtb_zone) :: zone
1251+
call zone%start("src/aespot.F90", "mmomgabzero", __LINE__, color=TracyColors%OliveDrab1)
12521252

12531253
!!!!!!! set up damped Coulomb operators for multipole interactions
12541254
gab3 = 0.0_wp ! for r**-2 decaying q-dip term

src/disp/dftd4.F90

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ subroutine newD3Model(dispm,nat,at)
6565

6666
intrinsic :: nint
6767

68-
type(xtb_zone) :: ctx
69-
call ctx%start("src/disp/dftd4.F90", "newD3Model", __LINE__, color=TracyColors%SteelBlue1)
68+
type(xtb_zone) :: zone
69+
call zone%start("src/disp/dftd4.F90", "newD3Model", __LINE__, color=TracyColors%SteelBlue1)
7070

7171
call init(dispm, maxElem=maxval(at))
7272

@@ -121,8 +121,8 @@ subroutine newD4Model(dispm,g_a,g_c,mode)
121121

122122
intrinsic :: nint
123123

124-
type(xtb_zone) :: ctx
125-
call ctx%start("src/disp/dftd4.F90", "newD4Model", __LINE__, color=TracyColors%SteelBlue1)
124+
type(xtb_zone) :: zone
125+
call zone%start("src/disp/dftd4.F90", "newD4Model", __LINE__, color=TracyColors%SteelBlue1)
126126

127127
call init(dispm)
128128

@@ -611,8 +611,8 @@ subroutine d4(dispm,nat,ndim,at,wf,g_a,g_c,covcn,gw,c6abns)
611611

612612
intrinsic :: maxval
613613

614-
type(xtb_zone) :: ctx
615-
call ctx%start("src/disp/dftd4.F90", "d4", __LINE__, color=TracyColors%SteelBlue1)
614+
type(xtb_zone) :: zone
615+
call zone%start("src/disp/dftd4.F90", "d4", __LINE__, color=TracyColors%SteelBlue1)
616616

617617
allocate( itbl(7,nat), source = 0 )
618618

@@ -687,8 +687,8 @@ subroutine build_wdispmat(dispm,nat,ndim,at,itbl,xyz,par,c6abns,gw,wdispmat)
687687
real(wp), parameter :: rthr = 72.0_wp ! slightly larger than in gradient
688688
real(wp), parameter :: gwcut = 1.0e-7_wp
689689

690-
type(xtb_zone) :: ctx
691-
call ctx%start("src/disp/dftd4.F90", "build_wdispmat", __LINE__, color=TracyColors%SteelBlue1)
690+
type(xtb_zone) :: zone
691+
call zone%start("src/disp/dftd4.F90", "build_wdispmat", __LINE__, color=TracyColors%SteelBlue1)
692692

693693
! acc enter data create(wdispmat) copyin(at, xyz, itbl, dispm, dispm%nref, &
694694
! acc& c6abns, gw, par)
@@ -771,8 +771,8 @@ subroutine disppot(dispm,nat,ndim,at,itbl,q,g_a,g_c,wdispmat,gw,hdisp)
771771

772772
intrinsic :: sum,dble
773773

774-
type(xtb_zone) :: ctx
775-
call ctx%start("src/disp/dftd4.F90", "disppot", __LINE__, color=TracyColors%Steelblue1)
774+
type(xtb_zone) :: zone
775+
call zone%start("src/disp/dftd4.F90", "disppot", __LINE__, color=TracyColors%Steelblue1)
776776

777777
allocate( zetavec(ndim),zerovec(ndim),dumvec(ndim), source = 0._wp )
778778

@@ -1000,8 +1000,8 @@ subroutine weight_references(dispm, nat, atoms, g_a, g_c, wf, q, cn, zeff, gam,
10001000
real(wp) :: norm, dnorm, twf, gw, expw, expd, gwk, dgwk
10011001
real(wp) :: gi, zi
10021002

1003-
type(xtb_zone) :: ctx
1004-
call ctx%start("src/disp/dftd4.F90", "weight_references", __LINE__, color=TracyColors%SteelBlue1)
1003+
type(xtb_zone) :: zone
1004+
call zone%start("src/disp/dftd4.F90", "weight_references", __LINE__, color=TracyColors%SteelBlue1)
10051005

10061006
! acc enter data create(zetavec, zerovec, zetadq, zetadq, zetadcn, zerodcn) &
10071007
! acc& copyin(dispm, dispm%nref, dispm%ncount, dispm%cn, dispm%q, atoms, &
@@ -1114,8 +1114,8 @@ subroutine get_atomic_c6(dispm, nat, atoms, zetavec, zetadcn, zetadq, &
11141114
integer :: iat, jat, ati, atj, iref, jref
11151115
real(wp) :: refc6, dc6, dc6dcni, dc6dcnj, dc6dqi, dc6dqj
11161116

1117-
type(xtb_zone) :: ctx
1118-
call ctx%start("src/disp/dftd4.F90", "get_atomic_c6", __LINE__, color=TracyColors%SteelBlue1)
1117+
type(xtb_zone) :: zone
1118+
call zone%start("src/disp/dftd4.F90", "get_atomic_c6", __LINE__, color=TracyColors%SteelBlue1)
11191119

11201120
!$acc enter data create(c6, dc6dcn, dc6dq) copyin(atoms, dispm, dispm%nref, dispm%c6, &
11211121
!$acc& zetavec, zetadcn, zetadq)
@@ -1247,8 +1247,8 @@ subroutine d4_full_gradient_neigh &
12471247
real(wp), allocatable :: c6(:, :), dc6dcn(:, :), dc6dq(:, :)
12481248
real(wp), allocatable :: energies(:), energies3(:), dEdcn(:), dEdq(:)
12491249

1250-
type(xtb_zone) :: ctx
1251-
call ctx%start("src/disp/dftd4.F90", "d4_full_gradient_neigh", __LINE__, color=TracyColors%SteelBlue1)
1250+
type(xtb_zone) :: zone
1251+
call zone%start("src/disp/dftd4.F90", "d4_full_gradient_neigh", __LINE__, color=TracyColors%SteelBlue1)
12521252

12531253
nat = len(mol)
12541254
max_ref = maxval(dispm%nref(mol%at))
@@ -1355,8 +1355,8 @@ subroutine d4_gradient_neigh &
13551355
real(wp), allocatable :: c6(:, :), dc6dcn(:, :), dc6dq(:, :)
13561356
real(wp), allocatable :: energies(:), dEdcn(:), dEdq(:)
13571357

1358-
type(xtb_zone) :: ctx
1359-
call ctx%start("src/disp/dftd4.F90", "d4_gradient_neigh", __LINE__, color=TracyColors%SteelBlue1)
1358+
type(xtb_zone) :: zone
1359+
call zone%start("src/disp/dftd4.F90", "d4_gradient_neigh", __LINE__, color=TracyColors%SteelBlue1)
13601360

13611361
nat = len(mol)
13621362
max_ref = maxval(dispm%nref(mol%at))
@@ -1434,8 +1434,8 @@ subroutine disp_gradient_neigh &
14341434
real(wp) :: r4r2ij, r0, rij(3), r2, t6, t8, t10, d6, d8, d10
14351435
real(wp) :: dE, dG(3), dS(3, 3), disp, ddisp
14361436

1437-
type(xtb_zone) :: ctx
1438-
call ctx%start("src/disp/dftd4.F90", "disp_gradient_neigh", __LINE__, color=TracyColors%SteelBlue1)
1437+
type(xtb_zone) :: zone
1438+
call zone%start("src/disp/dftd4.F90", "disp_gradient_neigh", __LINE__, color=TracyColors%SteelBlue1)
14391439

14401440
!$omp parallel do default(none) &
14411441
!$omp reduction(+:energies, gradient, sigma, dEdcn, dEdq) &
@@ -1730,8 +1730,8 @@ subroutine d4_full_gradient_latp &
17301730
real(wp), allocatable :: c6(:, :), dc6dcn(:, :), dc6dq(:, :)
17311731
real(wp), allocatable :: energies(:), energies3(:), dEdcn(:), dEdq(:)
17321732

1733-
type(xtb_zone) :: ctx
1734-
call ctx%start("src/disp/dftd4.F90", "d4_full_gradient_latp", __LINE__, color=TracyColors%SteelBlue1)
1733+
type(xtb_zone) :: zone
1734+
call zone%start("src/disp/dftd4.F90", "d4_full_gradient_latp", __LINE__, color=TracyColors%SteelBlue1)
17351735

17361736
nat = len(mol)
17371737
max_ref = maxval(dispm%nref(mol%at))
@@ -1843,8 +1843,8 @@ subroutine d4_gradient_latp &
18431843
real(wp), allocatable :: c6(:, :), dc6dcn(:, :), dc6dq(:, :)
18441844
real(wp), allocatable :: energies(:), energies3(:), dEdcn(:), dEdq(:)
18451845

1846-
type(xtb_zone) :: ctx
1847-
call ctx%start("src/disp/dftd4.F90", "d4_gradient_latp", __LINE__, color=TracyColors%SteelBlue1)
1846+
type(xtb_zone) :: zone
1847+
call zone%start("src/disp/dftd4.F90", "d4_gradient_latp", __LINE__, color=TracyColors%SteelBlue1)
18481848

18491849
nat = len(mol)
18501850
max_ref = maxval(dispm%nref(mol%at))
@@ -1921,8 +1921,8 @@ subroutine disp_gradient_latp &
19211921
real(wp) :: r4r2ij, r0, rij(3), r2, t6, t8, t10, d6, d8, d10
19221922
real(wp) :: dE, dG(3), dS(3, 3), disp, ddisp
19231923

1924-
type(xtb_zone) :: ctx
1925-
call ctx%start("src/disp/dftd4.F90", "disp_gradient_latp", __LINE__, color=TracyColors%SteelBlue1)
1924+
type(xtb_zone) :: zone
1925+
call zone%start("src/disp/dftd4.F90", "disp_gradient_latp", __LINE__, color=TracyColors%SteelBlue1)
19261926

19271927
nat = len(mol)
19281928
cutoff2 = cutoff**2
@@ -2041,8 +2041,8 @@ subroutine d4_atm_gradient_latp &
20412041
real(wp), allocatable :: c6(:, :), dc6dcn(:, :), dc6dq(:, :)
20422042
real(wp), allocatable :: energies(:), energies3(:), dEdcn(:), dEdq(:)
20432043

2044-
type(xtb_zone) :: ctx
2045-
call ctx%start("src/disp/dftd4.F90", "d4_atm_gradient_latp", __LINE__, color=TracyColors%SteelBlue1)
2044+
type(xtb_zone) :: zone
2045+
call zone%start("src/disp/dftd4.F90", "d4_atm_gradient_latp", __LINE__, color=TracyColors%SteelBlue1)
20462046

20472047
nat = len(mol)
20482048
max_ref = maxval(dispm%nref(mol%at))
@@ -2105,8 +2105,8 @@ subroutine atm_gradient_latp &
21052105
real(wp), parameter :: sr = 4.0_wp/3.0_wp
21062106
logical :: doPBC
21072107

2108-
type(xtb_zone) :: ctx
2109-
call ctx%start("src/disp/dftd4.F90", "atm_gradient_latp", __LINE__, color=TracyColors%SteelBlue1)
2108+
type(xtb_zone) :: zone
2109+
call zone%start("src/disp/dftd4.F90", "atm_gradient_latp", __LINE__, color=TracyColors%SteelBlue1)
21102110

21112111
cutoff2 = cutoff**2
21122112
nat = len(mol) ! workaround for legacy Intel Fortran compilers

src/geoopt_driver.F90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,13 @@ subroutine geometry_optimization &
100100
type(lbfgs_input) :: opt_input
101101
type(cartesian_filter) :: filter
102102

103-
type(xtb_zone) :: ctx
103+
type(xtb_zone) :: zone
104104

105105
!----------------!
106106
! Initialization !
107107
!----------------!
108108

109-
call ctx%start("src/geoopt_driver.f90", source, __LINE__, color=TracyColors%Snow)
109+
call zone%start("src/geoopt_driver.f90", source, __LINE__, color=TracyColors%Snow)
110110

111111
final_sp = pr
112112

src/mctc/lapack/eigensolve.F90

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -225,34 +225,34 @@ subroutine mctc_dsygvd_factorized(self, env, amat, bmat_factorized, eval)
225225
real(dp), intent(out) :: eval(:)
226226
integer :: info, ldwork, liwork
227227

228-
type(xtb_zone) :: ctx
228+
type(xtb_zone) :: zone
229229

230230
ldwork = size(self%dwork)
231231
liwork = size(self%iwork)
232232

233-
call ctx%start("src/mctc/lapack/eigensolve.F90", source, __LINE__, zone_name="sygst", color=TracyColors%Pink)
233+
call zone%start("src/mctc/lapack/eigensolve.F90", source, __LINE__, zone_name="sygst", color=TracyColors%Pink)
234234

235235
CALL lapack_sygst( 1, 'u', self%n, amat, self%n, bmat_factorized, self%n, info )
236236
if (info /= 0) then
237237
call env%error("Failed to reduce eigenvalue problem", source)
238238
return
239239
end if
240240

241-
call ctx%end()
242-
call ctx%start("src/mctc/lapack/eigensolve.F90", source, __LINE__, zone_name="syevd", color=TracyColors%Purple)
241+
call zone%end()
242+
call zone%start("src/mctc/lapack/eigensolve.F90", source, __LINE__, zone_name="syevd", color=TracyColors%Purple)
243243

244244
CALL lapack_syevd( 'v', 'u', self%n, amat, self%n, eval, self%dwork, ldwork, self%iwork, liwork, info )
245245
if (info /= 0) then
246246
call env%error("Failed to compute eigenvalues and eigenvectors", source)
247247
return
248248
end if
249249

250-
call ctx%end()
251-
call ctx%start("src/mctc/lapack/eigensolve.F90", source, __LINE__, zone_name="trsm", color=TracyColors%Purple)
250+
call zone%end()
251+
call zone%start("src/mctc/lapack/eigensolve.F90", source, __LINE__, zone_name="trsm", color=TracyColors%Purple)
252252

253253
CALL blas_trsm( 'l', 'u', 'n', 'n', self%n, self%n, 1.0_dp, bmat_factorized, self%n, amat, self%n )
254254

255-
call ctx%end()
255+
call zone%end()
256256

257257
end subroutine mctc_dsygvd_factorized
258258

0 commit comments

Comments
 (0)