Salome HOME
Homard executable
[modules/homard.git] / src / tool / Gestion_MTU / gtmess.F
1       subroutine gtmess ( ulmess )
2 c ______________________________________________________________________
3 c
4 c                             H O M A R D
5 c
6 c Outil de Maillage Adaptatif par Raffinement et Deraffinement d'EDF R&D
7 c
8 c Version originale enregistree le 18 juin 1996 sous le numero 96036
9 c aupres des huissiers de justice Simart et Lavoir a Clamart
10 c Version 11.2 enregistree le 13 fevrier 2015 sous le numero 2015/014
11 c aupres des huissiers de justice
12 c Lavoir, Silinski & Cherqui-Abrahmi a Clamart
13 c
14 c    HOMARD est une marque deposee d'Electricite de France
15 c
16 c Copyright EDF 1996
17 c Copyright EDF 1998
18 c Copyright EDF 2002
19 c Copyright EDF 2020
20 c ______________________________________________________________________
21 c                                       premiere creation le 11.12.95 gn
22 c ______________________________________________________________________
23 c
24 c    'Gestion du Temps : unite de sortie des MESSages'
25 c     -          -                           ----
26 c ______________________________________________________________________
27 c .        .     .        .                                            .
28 c .  nom   . e/s . taille .           description                      .
29 c .____________________________________________________________________.
30 c . ulmess . e   .    1   . numero de l'unite logique ou imprimer      .
31 c .        .     .        . les messages du gestionnaire de temps      .
32 c ______________________________________________________________________
33 c
34 c====
35 c 0. declarations et dimensionnement
36 c====
37 c
38 c 0.1. ==> generalites
39 c
40       implicit none
41       save
42 c
43       character*6 nompro
44       parameter ( nompro = 'GTMESS' )
45 c
46 #include "genbla.h"
47 #include "gtnbse.h"
48 c
49 c 0.2. ==> communs
50 c
51 c 0.3. ==> arguments
52 c
53       integer ulmess
54 c
55 c 0.4. ==> variables locales
56 c
57 #include "gtdita.h"
58 c
59       logical imprim, dejavu
60 c
61       integer guimp, gmimp, raison
62       integer codret, ulsort
63 c
64       integer langue
65 c
66       integer iaux, code
67 c
68       integer nbmess
69       parameter ( nbmess = 10 )
70       character*80 texte(nblang,nbmess)
71 c
72 c 0.5. ==> initialisations
73 c
74       data dejavu / .false. /
75       data langue / 1 /
76 c ______________________________________________________________________
77 c
78 c====
79 c 1. initialisation
80 c====
81 c
82 c 1.1. ==> initialisation des messages
83 c
84 #include "impr01.h"
85 c
86       texte(1,10) = '(''Le numero d''''unite logique '',i2,'' voulu'')'
87       texte(1,4) =
88      >'(''pour les sorties GT n''''a pas le bon statut GU.'')'
89 c
90       texte(2,10) = '(''The logical unit # '',i2,'' wanted for'')'
91       texte(2,4) = '(''GT messages has not the right status in GU.'')'
92 c
93 c 1.2. ==> recuperation de l'information
94 c
95       code = 1
96       iaux = nbsep1
97       call gttabl ( code, iaux, nbrapp, ouvert, titsec, tpscpu )
98 c
99       if ( dejavu ) then
100         ulsort = nbrapp(0)
101       else
102         call gusost ( ulsort )
103       endif
104 c
105 c====
106 c 2. verification de la validite du numero. il faut que le statut soit :
107 c    2 : Sortie standard (sequentiel formate)
108 c    3 : Ouvert en acces sequentiel formate
109 c====
110 c
111       imprim = .false.
112       call guinfu ( ulmess, codret, imprim )
113 c
114       if ( codret.ne.2 .and. codret.ne.3 ) then
115 c
116         write (ulsort,texte(langue,1)) 'Sortie', nompro
117         call dmflsh (iaux)
118         write (ulsort,texte(langue,10)) ulmess
119         write (ulsort,texte(langue,4))
120 c
121         guimp = 1
122         gmimp = 0
123         raison = 1
124         call ugstop(nompro,ulsort,guimp, gmimp, raison)
125 c
126       endif
127 c
128 c====
129 c 3. on archive l'information
130 c====
131 c
132       nbrapp(0) = ulmess
133 c
134       code = 0
135       iaux = nbsep1
136       call gttabl ( code, iaux, nbrapp, ouvert, titsec, tpscpu )
137 c
138       dejavu = .true.
139 c
140 #ifdef _DEBUG_HOMARD_
141       write (ulsort,texte(langue,1)) 'Sortie', nompro
142       call dmflsh (iaux)
143 #endif
144 c
145       end