Skip to content

Commit

Permalink
add cpu timings to sandbox/atlas_filter.F90
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrdar committed Nov 14, 2023
1 parent 38f9ad9 commit ca64f48
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/sandbox/interpolation/atlas-filter.F90
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ program filtering
type(atlas_MeshGenerator) :: meshgen
type(atlas_Output) :: gmsh

real :: start_time, end_time
real(kind=JPRB), pointer :: sfield_v(:)

call atlas_library%initialise()
Expand All @@ -195,9 +196,10 @@ program filtering
gmsh = atlas_output_Gmsh("mesh.msh", "w")
call gmsh%write(mesh)

print *, " == setting up atlas_Filter ..."
call cpu_time(start_time)
filter = atlas_Filter(grid, mesh)
print *, " == atlas_Filter is set up"
call cpu_time(end_time)
print *, " filter.setup in seconds: ", start_time - end_time

fspace = filter%source()
sfield = fspace%create_field(name="sfield", kind=atlas_real(JPRB))
Expand All @@ -206,7 +208,10 @@ program filtering

call gmsh%write(sfield)

call cpu_time(start_time)
call filter.execute(sfield)
call cpu_time(end_time)
print *, " filter.exe in seconds: ", start_time - end_time

call gmsh%write(sfield)

Expand Down

0 comments on commit ca64f48

Please sign in to comment.