KTH framework for Nek5000 toolboxes; testing version  0.0.1
frame.f
Go to the documentation of this file.
1 
6 !=======================================================================
11  subroutine frame_start
12  implicit none
13 
14  include 'SIZE'
15  include 'PARALLEL'
16  include 'FRAMELP'
17 
18  ! local variables
19  integer log_thr, slen, ierr
20  character*18 log_cval
21 !-----------------------------------------------------------------------
22  ! check logging threshold
23  if (nid.eq.0) then
24  call getenv('FRAMELOGL',log_cval)
25  slen = len_trim(log_cval)
26  if (slen.gt.0) then
27  read(log_cval,'(I2)',iostat=ierr) log_thr
28  if (ierr.gt.0) log_thr = lp_inf
29  else
30  log_thr = lp_inf
31  endif
32  endif
33 
34  call bcast(log_thr,isize)
35 
36  ! register backbone modules na runtime parameters
37  call mntr_register_mod(log_thr)
38  call rprm_register()
39  call mntr_register_par()
40  call io_register()
41 
42  ! regisred user specified moduels
43  call frame_usr_register
44 
45  ! get runtime parameters from Nek5000 dictionary
46  call rprm_dict_get()
47  call mntr_init()
48  call rprm_init()
49 
50  ! initialise user specified modules
51  call frame_usr_init()
52 
53  return
54  end subroutine
55 !=======================================================================
58  subroutine frame_monitor
59  implicit none
60 
61  include 'SIZE'
62  include 'FRAMELP'
63 
64 !-----------------------------------------------------------------------
65  ! monitor simulation wall clock
66  call mntr_wclock
67 
68  ! place for other monitoring operations
69 
70  return
71  end subroutine
72 !=======================================================================
75  subroutine frame_end
76  implicit none
77 
78  include 'SIZE'
79  include 'FRAMELP'
80 
81 !-----------------------------------------------------------------------
82  ! finalilse user specified modules
83  call frame_usr_end
84 
85  ! close all opened files
86  call io_file_close
87 
88  ! place for timers summary
90 
91  return
92  end subroutine
93 !=======================================================================
97  integer function frame_get_master()
98  implicit none
99 !-----------------------------------------------------------------------
100  frame_get_master = 0
101 
102  return
103  end function
104 !=======================================================================
105 
106 
subroutine bcast(buf, len)
Definition: comm_mpi.f:431
subroutine frame_monitor
Simulataion monitoring.
Definition: frame.f:59
subroutine frame_start
Start framework.
Definition: frame.f:12
subroutine frame_end
Finalise framework.
Definition: frame.f:76
integer function frame_get_master()
Specify master node id.
Definition: frame.f:98
subroutine io_file_close()
Close all opened files up to sotred max unit numer.
Definition: io_tools.f:81
subroutine io_register()
Register io tool module.
Definition: io_tools.f:11
subroutine mntr_tmr_summary_print()
Print registered timers showing tree structure.
Definition: mntrtmr.f:269
subroutine mntr_wclock
Monitor simulation wall clock.
Definition: mntrlog.f:191
subroutine mntr_register_mod(log_thr)
Initialise monitor by registering framework and monitor.
Definition: mntrlog.f:11
subroutine mntr_init
Initialise monitor module.
Definition: mntrlog.f:135
subroutine mntr_register_par
Register monitor runtime parameters.
Definition: mntrlog.f:100
subroutine rprm_register
Register runtime parameters database.
Definition: rprm.f:10
subroutine rprm_init
Initialise modules runtime parameters and write summary.
Definition: rprm.f:87
subroutine rprm_dict_get()
Get runtime parameter from nek parser dictionary.
Definition: rprm.f:933