~fluidity-core/fluidity/sea-ice-coupling

« back to all changes in this revision

Viewing changes to femtools/Profiler_Fortran.F90

  • Committer: Simon Mouradian
  • Date: 2012-05-14 12:44:08 UTC
  • mfrom: (3520.32.263 fluidity)
  • Revision ID: mouradian@gmail.com-20120514124408-7b4c6o0ve4jtx4dj
mergeĀ fromĀ lp:fluidity

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
module Profiler
29
29
  use global_parameters, only : real_8
30
30
  use fields
 
31
 
31
32
  implicit none
32
33
  
33
34
  private
34
35
  
35
 
  public profiler_tic, profiler_toc, profiler_zero
 
36
  public profiler_tic, profiler_toc, profiler_zero, &
 
37
       profiler_minorpagefaults, profiler_majorpagefaults, &
 
38
       profiler_getresidence
36
39
  
37
40
  interface profiler_tic
38
41
    module procedure profiler_tic_scalar, profiler_tic_vector, &
72
75
      character(len = key_len), intent(in) :: key
73
76
      real(kind = real_8), intent(out) :: time
74
77
    end subroutine cprofiler_get
 
78
 
 
79
    subroutine cprofiler_minorpagefaults(faults)
 
80
      implicit none
 
81
      integer, intent(out) :: faults
 
82
    end subroutine cprofiler_minorpagefaults
 
83
 
 
84
    subroutine cprofiler_majorpagefaults(faults)
 
85
      implicit none
 
86
      integer, intent(out) :: faults
 
87
    end subroutine cprofiler_majorpagefaults
 
88
 
 
89
    subroutine cprofiler_getresidence(ptr, residence)
 
90
      use iso_c_binding, only : c_ptr
 
91
      implicit none
 
92
      type(c_ptr), intent(in) :: ptr
 
93
      integer, intent(out):: residence
 
94
    end subroutine cprofiler_getresidence
 
95
 
75
96
  end interface
76
97
 
77
98
contains
193
214
    call cprofiler_zero()
194
215
  end subroutine profiler_zero
195
216
 
 
217
  subroutine profiler_minorpagefaults(faults)
 
218
    integer, intent(out) :: faults
 
219
    call cprofiler_minorpagefaults(faults)
 
220
  end subroutine profiler_minorpagefaults
 
221
 
 
222
  subroutine profiler_majorpagefaults(faults)
 
223
    integer, intent(out) :: faults
 
224
    call cprofiler_majorpagefaults(faults)
 
225
  end subroutine profiler_majorpagefaults
 
226
 
 
227
  subroutine profiler_getresidence(ptr, residence)
 
228
    use iso_c_binding, only : c_ptr
 
229
    type(c_ptr), intent(in) :: ptr
 
230
    integer, intent(out) :: residence
 
231
    call cprofiler_getresidence(ptr, residence)
 
232
    end subroutine profiler_getresidence
 
233
 
196
234
end module Profiler