@@ -97,6 +97,12 @@ module xtb_modelhessian
97
97
! factor somewhere hidden in the implementation below.
98
98
! ! ------------------------------------------------------------------------
99
99
subroutine mh_swart (xyz ,n ,hess ,at ,modh )
100
+
101
+ #ifdef WITH_TRACY
102
+ use tracy
103
+ use iso_c_binding, only: c_int64_t
104
+ #endif
105
+
100
106
use xtb_mctc_constants
101
107
use xtb_mctc_convert
102
108
use xtb_mctc_param, only: rad = > covalent_radius_2009
@@ -118,6 +124,16 @@ subroutine mh_swart(xyz,n,hess,at,modh)
118
124
type (chrg_parameter) :: chrgeq
119
125
real (wp) :: kd
120
126
127
+ #ifdef WITH_TRACY
128
+ type (tracy_zone_context) :: ctx
129
+ integer (c_int64_t) :: srcloc_id
130
+ #endif
131
+
132
+ #ifdef WITH_TRACY
133
+ srcloc_id = tracy_alloc_srcloc(__LINE__, " src/model_hessian.F90" , " mh_swart" , color= TracyColors% HotPink2)
134
+ ctx = tracy_zone_begin(srcloc_id)
135
+ #endif
136
+
121
137
allocate ( lcutoff(n,n), source= .false. )
122
138
123
139
n3= 3 * n
@@ -138,6 +154,10 @@ subroutine mh_swart(xyz,n,hess,at,modh)
138
154
call mh_eeq(n,at,xyz,0.0_wp ,chrgeq,modh% kq,hess)
139
155
endif
140
156
157
+ #ifdef WITH_TRACY
158
+ call tracy_zone_end(ctx)
159
+ #endif
160
+
141
161
end subroutine mh_swart
142
162
143
163
pure subroutine mh_swart_stretch (n ,at ,xyz ,hess ,kr ,kd ,s6 ,rcov ,rvdw ,lcutoff ,rcut )
@@ -716,6 +736,10 @@ end subroutine mh_swart_outofp
716
736
! factor somewhere hidden in the implementation below.
717
737
! ! ------------------------------------------------------------------------
718
738
subroutine mh_lindh_d2 (xyz ,n ,hess ,at ,modh )
739
+ #ifdef WITH_TRACY
740
+ use tracy
741
+ use iso_c_binding, only: c_int64_t
742
+ #endif
719
743
use xtb_mctc_constants
720
744
use xtb_mctc_convert
721
745
@@ -748,6 +772,16 @@ subroutine mh_lindh_d2(xyz,n,hess,at,modh)
748
772
logical , allocatable :: lcutoff(:,:)
749
773
type (chrg_parameter) :: chrgeq
750
774
775
+ #ifdef WITH_TRACY
776
+ type (tracy_zone_context) :: ctx
777
+ integer (c_int64_t) :: srcloc_id
778
+ #endif
779
+
780
+ #ifdef WITH_TRACY
781
+ srcloc_id = tracy_alloc_srcloc(__LINE__, " src/model_hessian.F90" , " mh_lindh_d2" , color= TracyColors% HotPink2)
782
+ ctx = tracy_zone_begin(srcloc_id)
783
+ #endif
784
+
751
785
allocate ( lcutoff(n,n), source= .false. )
752
786
753
787
n3= 3 * n
@@ -768,6 +802,10 @@ subroutine mh_lindh_d2(xyz,n,hess,at,modh)
768
802
call mh_eeq(n,at,xyz,0.0_wp ,chrgeq,modh% kq,hess)
769
803
endif
770
804
805
+ #ifdef WITH_TRACY
806
+ call tracy_zone_end(ctx)
807
+ #endif
808
+
771
809
end subroutine mh_lindh_d2
772
810
773
811
! ! ========================================================================
@@ -797,6 +835,10 @@ end subroutine mh_lindh_d2
797
835
!
798
836
! ! ------------------------------------------------------------------------
799
837
subroutine mh_lindh (xyz ,n ,hess ,at ,modh )
838
+ #ifdef WITH_TRACY
839
+ use tracy
840
+ use iso_c_binding, only: c_int64_t
841
+ #endif
800
842
use xtb_mctc_constants
801
843
use xtb_mctc_convert
802
844
@@ -829,6 +871,16 @@ subroutine mh_lindh(xyz,n,hess,at,modh)
829
871
logical , allocatable :: lcutoff(:,:)
830
872
type (chrg_parameter) :: chrgeq
831
873
874
+ #ifdef WITH_TRACY
875
+ type (tracy_zone_context) :: ctx
876
+ integer (c_int64_t) :: srcloc_id
877
+ #endif
878
+
879
+ #ifdef WITH_TRACY
880
+ srcloc_id = tracy_alloc_srcloc(__LINE__, " src/model_hessian.F90" , " mh_lindh" , color= TracyColors% HotPink2)
881
+ ctx = tracy_zone_begin(srcloc_id)
882
+ #endif
883
+
832
884
allocate ( lcutoff(n,n), source= .false. )
833
885
834
886
n3= 3 * n
@@ -849,6 +901,10 @@ subroutine mh_lindh(xyz,n,hess,at,modh)
849
901
call mh_eeq(n,at,xyz,0.0_wp ,chrgeq,modh% kq,hess)
850
902
endif
851
903
904
+ #ifdef WITH_TRACY
905
+ call tracy_zone_end(ctx)
906
+ #endif
907
+
852
908
end subroutine mh_lindh
853
909
854
910
pure subroutine mh_lindh_stretch (n ,at ,xyz ,hess ,kr ,kd ,s6 ,aav ,rav ,dav ,lcutoff ,rcut )
@@ -1772,6 +1828,10 @@ pure elemental function fk_vdw(alpha,r0,r2) result(gmm)
1772
1828
end function fk_vdw
1773
1829
1774
1830
subroutine mh_eeq (n ,at ,xyz ,chrg ,chrgeq ,kq ,hess )
1831
+ #ifdef WITH_TRACY
1832
+ use tracy
1833
+ use iso_c_binding, only: c_int64_t
1834
+ #endif
1775
1835
use xtb_type_param
1776
1836
implicit none
1777
1837
@@ -1836,6 +1896,19 @@ subroutine mh_eeq(n,at,xyz,chrg,chrgeq,kq,hess)
1836
1896
integer :: info
1837
1897
real (wp) :: test(1 )
1838
1898
1899
+ ! !
1900
+ ! Tracy profiler
1901
+ ! !
1902
+ #ifdef WITH_TRACY
1903
+ type (tracy_zone_context) :: ctx
1904
+ integer (c_int64_t) :: srcloc_id
1905
+ #endif
1906
+
1907
+ #ifdef WITH_TRACY
1908
+ srcloc_id = tracy_alloc_srcloc(__LINE__, " src/model_hessian.F90" , " mh_eeq" , color= TracyColors% HotPink2)
1909
+ ctx = tracy_zone_begin(srcloc_id)
1910
+ #endif
1911
+
1839
1912
! ! ------------------------------------------------------------------------
1840
1913
! initizialization
1841
1914
! ! ------------------------------------------------------------------------
@@ -2078,11 +2151,19 @@ subroutine mh_eeq(n,at,xyz,chrg,chrgeq,kq,hess)
2078
2151
! call dgemm('n','t',3*n,m,3*n,+1.0_wp,dqdr,3*n,dAmat,3*n,1.0_wp,hessian,3*n)
2079
2152
! call dgemm('n','t',3*n,m,3*n,+1.0_wp,dAmat,3*n,dqdr,3*n,1.0_wp,hessian,3*n)
2080
2153
2154
+ #ifdef WITH_TRACY
2155
+ call tracy_zone_end(ctx)
2156
+ #endif
2157
+
2081
2158
end subroutine mh_eeq
2082
2159
2083
2160
end module xtb_modelhessian
2084
2161
2085
2162
subroutine ddvopt (Cart ,nAtoms ,Hess ,iANr ,s6 )
2163
+ #ifdef WITH_TRACY
2164
+ use tracy
2165
+ use iso_c_binding, only: c_int64_t
2166
+ #endif
2086
2167
Implicit Integer (i- n)
2087
2168
Implicit Real * 8 (a- h, o- z)
2088
2169
! include "common/real.inc" (molpro 2002.6)
@@ -2158,6 +2239,11 @@ subroutine ddvopt(Cart,nAtoms,Hess,iANr,s6)
2158
2239
& 46 * 2.d0 /
2159
2240
! cc End: VDWx ccccccccccccccccc
2160
2241
2242
+ #ifdef WITH_TRACY
2243
+ type (tracy_zone_context) :: ctx
2244
+ integer (c_int64_t) :: srcloc_id
2245
+ #endif
2246
+
2161
2247
!
2162
2248
!- ------ Statement functions
2163
2249
!
@@ -2167,6 +2253,11 @@ subroutine ddvopt(Cart,nAtoms,Hess,iANr,s6)
2167
2253
& Min (ixyz(i,iAtom),ixyz(j,jAtom)))
2168
2254
! end
2169
2255
2256
+ #ifdef WITH_TRACY
2257
+ srcloc_id = tracy_alloc_srcloc(__LINE__, " src/model_hessian.F90" , " ddvopt" , color= TracyColors% HotPink2)
2258
+ ctx = tracy_zone_begin(srcloc_id)
2259
+ #endif
2260
+
2170
2261
! cc VDWx cccccccccccccccccccc
2171
2262
c6 = 50.0
2172
2263
c6( 1 )= 0.14
@@ -2646,10 +2737,19 @@ subroutine ddvopt(Cart,nAtoms,Hess,iANr,s6)
2646
2737
End Do ! iAtom
2647
2738
End Do ! kAtom
2648
2739
End Do ! jAtom
2740
+
2741
+ #ifdef WITH_TRACY
2742
+ call tracy_zone_end(ctx)
2743
+ #endif
2744
+
2649
2745
Return
2650
2746
End
2651
2747
2652
2748
subroutine gff_ddvopt (Cart ,nAtoms ,Hess ,at ,s6 ,param ,topo ,neigh )
2749
+ #ifdef WITH_TRACY
2750
+ use tracy
2751
+ use iso_c_binding, only: c_int64_t
2752
+ #endif
2653
2753
use xtb_gfnff_data, only : TGFFData
2654
2754
use xtb_gfnff_topology, only : TGFFTopology
2655
2755
use xtb_gfnff_neighbor, only : TNeigh
@@ -2721,13 +2821,24 @@ subroutine gff_ddvopt(Cart,nAtoms,Hess,at,s6,param,topo,neigh)
2721
2821
& One2C2= 0.2662567690426443D-04 )
2722
2822
2723
2823
type (tb_timer) :: timer
2824
+
2825
+ #ifdef WITH_TRACY
2826
+ type (tracy_zone_context) :: ctx
2827
+ integer (c_int64_t) :: srcloc_id
2828
+ #endif
2829
+
2724
2830
! inline fct
2725
2831
lina(i,j)= min (i,j)+ max (i,j)* (max (i,j)- 1 )/ 2
2726
2832
ixyz(i,iAtom) = (iAtom-1 )* 3 + i
2727
2833
Jnd(i,j) = i* (i-1 )/ 2 + j
2728
2834
Ind(i,iAtom,j,jAtom)= Jnd(Max (ixyz(i,iAtom),ixyz(j,jAtom)),&
2729
2835
& Min (ixyz(i,iAtom),ixyz(j,jAtom)))
2730
2836
2837
+ #ifdef WITH_TRACY
2838
+ srcloc_id = tracy_alloc_srcloc(__LINE__, " src/model_hessian.F90" , " gff_ddvopt" , color= TracyColors% HotPink2)
2839
+ ctx = tracy_zone_begin(srcloc_id)
2840
+ #endif
2841
+
2731
2842
! map heavy atoms to Z<=54
2732
2843
do i= 1 ,nAtoms
2733
2844
iANr(i)= at(i)
@@ -3128,6 +3239,11 @@ subroutine gff_ddvopt(Cart,nAtoms,Hess,at,s6,param,topo,neigh)
3128
3239
3129
3240
if (profile) call timer% measure(3 )
3130
3241
if (profile) call timer% write (6 ,' modhes' )
3242
+
3243
+ #ifdef WITH_TRACY
3244
+ call tracy_zone_end(ctx)
3245
+ #endif
3246
+
3131
3247
Return
3132
3248
End
3133
3249
0 commit comments