1 subroutine utinit ( nfconf, lfconf, messag, nbrmes,
2 > ulsort, langue, codret )
3 c ______________________________________________________________________
7 c Outil de Maillage Adaptatif par Raffinement et Deraffinement d'EDF R&D
9 c Version originale enregistree le 18 juin 1996 sous le numero 96036
10 c aupres des huissiers de justice Simart et Lavoir a Clamart
11 c Version 11.2 enregistree le 13 fevrier 2015 sous le numero 2015/014
12 c aupres des huissiers de justice
13 c Lavoir, Silinski & Cherqui-Abrahmi a Clamart
15 c HOMARD est une marque deposee d'Electricite de France
21 c ______________________________________________________________________
23 c UTilitaire : INITialisation
25 c ______________________________________________________________________
27 c . nom . e/s . taille . description .
28 c .____________________________________________________________________.
29 c . nfconf . e . ch<200 . nom du fichier de configuration .
30 c . lfconf . e . 1 . longueur du nom du fichier .
31 c . messag . e . char40 . message d'en tete des listes .
32 c . nbrmes . e . 1 . nombres de messages .
33 c . ulsort . s . 1 . numero d'unite logique de la liste standard.
34 c . langue . es . 1 . langue des messages .
35 c . . . . 1 : francais, 2 : anglais .
36 c . codret . s . 1 . code de retour des modules .
37 c . . . . 0 : pas de probleme .
38 c . . . . 2x : probleme dans les memoires .
39 c . . . . 3 : probleme dans le decodage du fichier .
40 c . . . . de configuration .
41 c . . . . 3x : probleme dans les fichiers .
42 c . . . . 5 : deuxieme appel au programme .
43 c . . . . 7 : impossible de decoder le $HOME .
44 c . . . . 11 : date d'autorisation depassee .
45 c ______________________________________________________________________
48 c 0. declarations et dimensionnement
51 c 0.1. ==> generalites
57 parameter ( nompro = 'UTINIT' )
62 parameter ( nbcar = 6 )
74 integer ulsort, langue, codret
77 character*40 messag(nblang,nbrmes)
79 c 0.4. ==> variables locales
87 integer guimp, gmimp, raison
88 integer iaux, jaux, kaux
89 integer ulsost, ulmess
90 integer numann, datheu
94 character*50 nomare, nomais, typmac, noarch, systre, systve
101 parameter ( nbmess = 20 )
102 character*80 texte(nblang,nbmess)
104 c 0.5. ==> initialisations
105 c ______________________________________________________________________
113 texte(1,4) = '(//,''1. INITIALISATIONS'')'
114 texte(1,5) = '(18(''=''),/)'
115 texte(1,7) = '(/,''Ce calcul date du '',a48)'
116 texte(1,8) = '(''Il a eu lieu sur '',a)'
117 texte(1,9) = '(''. type de machine : '',a )'
118 texte(1,10) = '(''. systeme d''''exploitation : '',a)'
119 texte(1,11) = '('' release : '',a )'
120 texte(1,12) = '('' version : '',a ,//)'
122 texte(2,4) = '(//,''1. INITIALISATIONS'')'
123 texte(2,5) = '(18(''=''),/)'
124 texte(2,7) = '(/,''This computation ran '',a48)'
125 texte(2,8) = '(''It was done on '',a)'
126 texte(2,9) = '(''. machine type : '',a)'
127 texte(2,10) = '(''. operating system : '',a)'
128 texte(2,11) = '('' release : '',a)'
129 texte(2,12) = '('' version : '',a,//)'
132 > 15x,'..........................................')
134 > 15x,':........................................:')
137 51003 format (15x,':',a40,':')
140 > 'Copyright 1996 EDF',
141 > /,'Copyright 2015 EDF',
142 > /,'Copyright ',i4,' EDF',
143 > /,'------------------',/)
145 > 15x,': H O M A R D ',a8 ,' :')
150 c 2. premier appel de uginit pour initialisation du gestionnaire
152 c remarque : au premier appel, ulsort n'a pas besoin d'etre
158 if ( langue.le.0 .or. langue.gt.nblang ) then
162 #ifdef _DEBUG_HOMARD_
163 write (*,*) 'Appel de UGINIT par ', nompro
165 call uginit ( ulsort, langue, nfconf, lfconf, codret )
167 if ( codret.eq.0 ) then
169 call gusost ( ulsost )
174 c 3. le fichier associe a la sortie standard
176 #ifdef _DEBUG_HOMARD_
177 write (*,*) '3. sortie standard ; codret = ', codret
180 if ( codret.eq.0 ) then
182 c 3.1. ==> le nom de ce fichier
185 #ifdef _DEBUG_HOMARD_
186 write (*,*) 'Appel de UGFINO par ', nompro
188 call ugfino ( motcle, nfsort, lfsort,
190 > ulsost, langue, codret )
192 if ( codret.ne.0 .and. codret.ne.1 ) then
196 call ugstop (nompro, ulsost, guimp, gmimp, raison)
199 c 3.2. ==> l'unite logique associee a cette liste
200 c on redirige sur la sortie standard si le fichier
201 c n'a pas ete mentionne dans la configuration, sinon
202 c on ouvre le fichier correspondant.
204 if ( codret.eq.1 .or. lfsort.le.0 ) then
211 call guoufs ( nfsort, lfsort, ulsort, codret )
212 if ( codret.ne.0 ) then
216 call ugstop (nompro, ulsost, guimp, gmimp, raison)
219 call gurbbu ( ulsort, codret )
225 #ifdef _DEBUG_HOMARD_
226 if ( codret.eq.0 ) then
227 write (ulsort,texte(langue,1)) 'Entree', nompro
235 #ifdef _DEBUG_HOMARD_
236 write (ulsort,*) '4. environnement ; codret = ', codret
241 if ( codret.eq.0 ) then
242 #ifdef _DEBUG_HOMARD_
243 write (*,texte(1,3)) 'UTINLA', nompro
245 call utinla ( nfconf, lfconf,
246 > ulsort, langue, codret )
249 if ( codret.eq.0 ) then
250 #ifdef _DEBUG_HOMARD_
251 write (*,texte(1,3)) 'GULANM', nompro
253 call gulanm ( langue, codret )
256 c 4.2. ==> les dates et types de machines
258 if ( codret.eq.0 ) then
260 #ifdef _DEBUG_HOMARD_
261 write (*,texte(langue,3)) 'UTDHCO', nompro
263 call utdhco ( numann, datheu )
265 #ifdef _DEBUG_HOMARD_
266 write (*,texte(langue,3)) 'UTDHLG', nompro
268 call utdhlg ( ladate, langue )
270 #ifdef _DEBUG_HOMARD_
271 write (*,texte(langue,3)) 'DMMACH', nompro
273 call dmmach ( nomare, nomais, typmac,
274 > noarch, systre, systve,
282 #ifdef _DEBUG_HOMARD_
283 write (*,*) '5. en-tete ; codret = ', codret
286 if ( codret.eq.0 ) then
288 c 5.1. ==> debut de l'en-tete
292 write (ulmess,51011) numann
295 write (ulmess,51012) nuvers
300 c recopie prudente du message (40 caracteres utiles a priori)
303 do 511 , jaux = 1 , nbrmes
304 call dmcpch( messag(langue,jaux), 40, blabla, kaux )
305 write (ulmess,51003) blabla
312 call dmcpch( weba, 40, blabla, kaux )
313 write (ulmess,51003) blabla
314 if ( langue.eq.2 ) then
315 call dmcpch( web2, 40, blabla, kaux )
316 write (ulmess,51003) blabla
321 write (ulsort,texte(langue,7)) ladate
322 #ifdef _DEBUG_HOMARD_
323 write (ulsort,texte(langue,8)) nomare(1:lgcar(1))
324 write (ulsort,texte(langue,9)) typmac(1:lgcar(3))
325 write (ulsort,texte(langue,10)) noarch(1:lgcar(4))
326 write (ulsort,texte(langue,11)) systre(1:lgcar(5))
327 write (ulsort,texte(langue,12)) systve(1:lgcar(6))
330 c 5.2. ==> fin de l'en-tete
332 if ( codret.eq.0 ) then
333 write (ulsort,texte(langue,4))
334 write (ulsort,texte(langue,5))
340 c 6. second appel de uginit pour initialisation du gestionnaire
341 c de mesures de temps calcul et de memoire
343 #ifdef _DEBUG_HOMARD_
344 write (*,*) '6. second appel de uginit ; codret = ', codret
347 if ( codret.eq.0 ) then
349 #ifdef _DEBUG_HOMARD_
350 write (ulsort,texte(langue,3)) 'UGINIT', nompro
352 call uginit ( ulsort, langue, nfconf, lfconf, codret )
357 c 7. acquisition des noms des fichiers utiles au calcul
359 #ifdef _DEBUG_HOMARD_
360 write (*,*) '7. noms des fichiers ; codret = ', codret
363 if ( codret.eq.0 ) then
365 #ifdef _DEBUG_HOMARD_
366 write (ulsort,texte(langue,3)) 'UTFIAC', nompro
368 call utfiac ( nfconf, lfconf, ulsort, langue, codret )
375 #ifdef _DEBUG_HOMARD_
376 write (*,*) '8. bilan ; codret = ', codret
379 if ( codret.ne.0 ) then
385 #ifdef _DEBUG_HOMARD_
386 write (ulsort,texte(langue,1)) 'Sortie', nompro