source: codes/icosagcm/trunk/src/trace.F90 @ 379

Last change on this file since 379 was 327, checked in by ymipsl, 10 years ago

Merge recent developments from saturn branch onto trunk.

  • lmdz generic physics interface
  • performance improvment on mix mpi/openmp
  • asynchrone and overlaping communication
  • best domain distribution between process and threads
  • ....

This version is compatible with the actual saturn version and the both branches are considered merged on dynamico component.

YM

File size: 1.8 KB
RevLine 
[145]1MODULE trace
2
[151]3  INTEGER,SAVE :: markId
4 
[145]5CONTAINS
6
[151]7  SUBROUTINE init_trace
8  IMPLICIT NONE
9#ifdef VTRACE
10#include <vt_user.inc>
11#endif 
12
13#ifdef VTRACE
14     VT_MARKER_DEF("marker", VT_MARKER_TYPE_HINT, markId)
15#endif
16 
17  END SUBROUTINE init_trace
18 
[186]19  SUBROUTINE trace_on
20  IMPLICIT NONE
21#ifdef VTRACE
22#include <vt_user.inc>
23#endif 
24!$OMP MASTER
25#ifdef VTRACE
26     VT_ON()
27#endif
28!$OMP END MASTER
29     
30  END SUBROUTINE trace_on
[151]31 
[186]32  SUBROUTINE trace_off
33  IMPLICIT NONE
34#ifdef VTRACE
35#include <vt_user.inc>
36#endif 
37
38!$OMP MASTER
39#ifdef VTRACE
40   VT_OFF()
41#endif
42!$OMP END MASTER
43     
44  END SUBROUTINE trace_off
[327]45
[186]46   
[145]47  SUBROUTINE trace_start(name)
48  IMPLICIT NONE
49    CHARACTER(LEN=*),INTENT(IN) :: name 
50#ifdef VTRACE
51#include <vt_user.inc>
52#endif 
53
[151]54!$OMP MASTER
[145]55#ifdef VTRACE
56     VT_USER_START(name)
57#endif
[151]58!$OMP END MASTER
[145]59
60  END SUBROUTINE trace_start   
61
[327]62
[145]63  SUBROUTINE trace_end(name)
64  IMPLICIT NONE
65#ifdef VTRACE
66#include <vt_user.inc>
67#endif
68
69    CHARACTER(LEN=*),INTENT(IN) :: name
70
[151]71!$OMP MASTER
[145]72#ifdef VTRACE
73     VT_USER_END(name)
74#endif
[151]75!$OMP END MASTER
[145]76
77  END SUBROUTINE trace_end   
78
[327]79
80
[186]81  SUBROUTINE trace_start2(name)
82  IMPLICIT NONE
83    CHARACTER(LEN=*),INTENT(IN) :: name 
84#ifdef VTRACE
85#include <vt_user.inc>
86#endif 
87
88!$OMP MASTER
89#ifdef VTRACE
90     VT_USER_START(name)
91#endif
92!$OMP END MASTER
93
94  END SUBROUTINE trace_start2   
95
96  SUBROUTINE trace_end2(name)
97  IMPLICIT NONE
98#ifdef VTRACE
99#include <vt_user.inc>
100#endif
101
102    CHARACTER(LEN=*),INTENT(IN) :: name
103
104!$OMP MASTER
105#ifdef VTRACE
106     VT_USER_END(name)
107#endif
108!$OMP END MASTER
109
110  END SUBROUTINE trace_end2   
111
112
113
[151]114  SUBROUTINE Marker(name)
115  IMPLICIT NONE
116  CHARACTER(LEN=*),INTENT(IN) :: name
117#ifdef VTRACE
118#include <vt_user.inc>
119#endif 
120
121!$OMP MASTER
122#ifdef VTRACE
123     VT_MARKER(markId,name)
124#endif
125!$OMP END MASTER
126
127  END SUBROUTINE Marker
128
[145]129END MODULE trace
Note: See TracBrowser for help on using the repository browser.