[5117] | 1 | module lmdz_vampir |
---|
[761] | 2 | |
---|
[5117] | 3 | INTEGER, parameter :: VTcaldyn = 1 |
---|
| 4 | INTEGER, parameter :: VTintegre = 2 |
---|
| 5 | INTEGER, parameter :: VTadvection = 3 |
---|
| 6 | INTEGER, parameter :: VTdissipation = 4 |
---|
| 7 | INTEGER, parameter :: VThallo = 5 |
---|
| 8 | INTEGER, parameter :: VTphysiq = 6 |
---|
| 9 | INTEGER, parameter :: VTinca = 7 |
---|
| 10 | |
---|
| 11 | INTEGER, parameter :: nb_inst = 7 |
---|
[772] | 12 | INTEGER :: MPE_begin(nb_inst) |
---|
| 13 | INTEGER :: MPE_end(nb_inst) |
---|
[5117] | 14 | |
---|
[5119] | 15 | CONTAINS |
---|
[761] | 16 | |
---|
[5103] | 17 | SUBROUTINE InitVampir |
---|
[5113] | 18 | IMPLICIT NONE |
---|
[772] | 19 | |
---|
[761] | 20 | #ifdef USE_VT |
---|
[5134] | 21 | INCLUDE 'VT.inc' |
---|
[5116] | 22 | INTEGER :: ierr |
---|
[761] | 23 | |
---|
[5101] | 24 | CALL VTSYMDEF(VTcaldyn,"caldyn","caldyn",ierr) |
---|
| 25 | CALL VTSYMDEF(VTintegre,"integre","integre",ierr) |
---|
| 26 | CALL VTSYMDEF(VTadvection,"advection","advection",ierr) |
---|
| 27 | CALL VTSYMDEF(VTdissipation,"dissipation","dissipation",ierr) |
---|
| 28 | CALL VTSYMDEF(VThallo,"hallo","hallo",ierr) |
---|
| 29 | CALL VTSYMDEF(VTphysiq,"physiq","physiq",ierr) |
---|
| 30 | CALL VTSYMDEF(VTinca,"inca","inca",ierr) |
---|
[772] | 31 | #endif |
---|
| 32 | |
---|
| 33 | #ifdef USE_MPE |
---|
[5134] | 34 | INCLUDE 'mpe_logf.h' |
---|
[5116] | 35 | INTEGER :: ierr,i |
---|
[772] | 36 | |
---|
| 37 | DO i=1,nb_inst |
---|
| 38 | ierr = MPE_Log_get_state_eventIDs( MPE_begin(i), MPE_end(i) ) |
---|
| 39 | ENDDO |
---|
| 40 | |
---|
| 41 | ierr = MPE_Describe_state( MPE_begin(VTcaldyn), MPE_end(VTcaldyn),"caldyn", "yellow" ) |
---|
| 42 | ierr = MPE_Describe_state( MPE_begin(VTintegre), MPE_end(VTintegre),"integre", "blue" ) |
---|
| 43 | ierr = MPE_Describe_state( MPE_begin(VTadvection), MPE_end(VTadvection),"advection", "green" ) |
---|
| 44 | ierr = MPE_Describe_state( MPE_begin(VTdissipation), MPE_end(VTdissipation),"dissipation", "ivory" ) |
---|
| 45 | ierr = MPE_Describe_state( MPE_begin(VThallo), MPE_end(VThallo),"hallo", "orange" ) |
---|
| 46 | ierr = MPE_Describe_state( MPE_begin(VTphysiq), MPE_end(VTphysiq),"physiq", "purple" ) |
---|
| 47 | ierr = MPE_Describe_state( MPE_begin(VTinca), MPE_end(VTinca),"inca", "LightBlue" ) |
---|
| 48 | #endif |
---|
[5103] | 49 | END SUBROUTINE InitVampir |
---|
[772] | 50 | |
---|
[5103] | 51 | SUBROUTINE VTb(number) |
---|
[5113] | 52 | IMPLICIT NONE |
---|
[761] | 53 | INTEGER :: number |
---|
| 54 | #ifdef USE_VT |
---|
[5134] | 55 | INCLUDE 'VT.inc' |
---|
[5116] | 56 | INTEGER :: ierr |
---|
[761] | 57 | |
---|
[5101] | 58 | CALL VTBEGIN(number,ierr) |
---|
[772] | 59 | #endif |
---|
| 60 | #ifdef USE_MPE |
---|
[5134] | 61 | INCLUDE 'mpe_logf.h' |
---|
[5116] | 62 | INTEGER :: ierr,i |
---|
[772] | 63 | ierr = MPE_Log_event( MPE_begin(number), 0, '' ) |
---|
[761] | 64 | #endif |
---|
[772] | 65 | |
---|
[5103] | 66 | END SUBROUTINE VTb |
---|
[772] | 67 | |
---|
[5103] | 68 | SUBROUTINE VTe(number) |
---|
[5113] | 69 | IMPLICIT NONE |
---|
[761] | 70 | INTEGER :: Number |
---|
| 71 | #ifdef USE_VT |
---|
[5134] | 72 | INCLUDE 'VT.inc' |
---|
[5116] | 73 | INTEGER :: ierr |
---|
[761] | 74 | |
---|
[5101] | 75 | CALL VTEND(number,ierr) |
---|
[761] | 76 | #endif |
---|
| 77 | |
---|
[772] | 78 | #ifdef USE_MPE |
---|
[5134] | 79 | INCLUDE 'mpe_logf.h' |
---|
[5116] | 80 | INTEGER :: ierr,i |
---|
[772] | 81 | ierr = MPE_Log_event( MPE_end(number), 0, '' ) |
---|
| 82 | #endif |
---|
| 83 | |
---|
[5103] | 84 | END SUBROUTINE VTe |
---|
[5117] | 85 | |
---|
[5119] | 86 | END MODULE lmdz_vampir |
---|