Code_Aster ®
Version
4
Titrate:
Utilities of impression of messages
Date:
28/01/1999
Author (S):
J.P. LEFEBVRE, P. MIALON
Key:
D6.04.01
Page: 1/8
Department Mécanique and Modèles Numériques
Index:
With
Diffusion:
Developers
Handbook of Descriptif Informatique
D6.04 booklet:
D6.04.01 document
Utilities of impression of messages
Summary
This document supplements the rules concerning Entrées/Sorties [D2.07.01], it describes the routines
(package “UTMESS”) allowing to carry out “short” writings of message.
EDF
Direction of Etudes and Recherches
Electricity of France
Project Code de Mécanique
Copyright EDF/DER 1997
Code_Aster ®
Version
4
Titrate:
Utilities of impression of messages
Date:
28/01/1999
Author (S):
J.P. LEFEBVRE, P. MIALON
Key:
D6.04.01
Page: 2/8
Contents
Contents ...................................................................................................... 2
1 Types of messages .................................................................................................. 3
1.1 Messages of the type F ................................................................................ 3
1.2 Messages of the type E ................................................................................ 4
1.3 Messages of the type S ................................................................................ 4
1.4 Messages of the type A ................................................................................ 4
1.5 Messages of the type I .................................................................................. 4
2 general Operation ........................................................................................... 5
3 Subroutines with the use of the developers ......................................................... 6
3.1 Initializing routine ..................................................................... 6
3.2 Subroutine of end of impression ............................................................. 6
3.2 Print routines of values .................................................... 6
3.3 Subroutines of positioning in the buffer ................................... 6
3.4 Subroutine of messages simple ......................................................... 7
4 Examples of uses .............................................................................................. 7
5 Description of the initializing routine interns .............................................. 8
Handbook of Descriptif Informatique
D6.04 booklet:
Index A
Code_Aster ®
Version
4
Titrate:
Utilities of impression of messages
Date:
28/01/1999
Author (S):
J.P. LEFEBVRE, P. MIALON
Key:
D6.04.01
Page: 3/8
1
Types of messages
The logical units of impression are established at the beginning of completion of the work, by the supervisor, them
impressions emitted by the routines described in the following paragraphs will be carried out on these
logical units without possibility of redirection.
The transmitted messages will be directed only according to their type:
Code
Type of message
Output files
F
fatal error message, the execution stops after various
ERREUR
impressions. The concepts created during the execution are
MESSAGE
lost.
RESULTAT
E
error message, the execution continues (a little cf [§1.2]).
ERREUR
MESSAGE
RESULTAT
S
error message, concepts created during the execution
ERREUR
are validated by the supervisor, the execution stops.
MESSAGE
RESULTAT
With
message of alarm.
MESSAGE
RESULTAT
I
message of information of the supervisor (cf [§1.5]).
MESSAGE
1.1
Messages of the type F
This type of message is followed of a dead halt of the application, it is used within the framework of
serious detection of error not being able to allow the normal continuation of a Aster command.
The emission of an error message F will cause the stop by CALL JEFINI (“ERREUR”), this call
start the memory print-out and repertories associated with the various bases,
moreover, one call to JXVERI is carried out to control the chaining of the segments of values.
Superviseur adds in front of the transmitted message an impression containing the date and the number of
version.
Note:
·
the concepts created during the execution are not validated by Superviseur, them
objects JEVEUX y being attached being able to be partially filled or crushed, the base
GLOBALE is not backed up (in this case, the interface asterix does not recopy it
towards the repertory user),
·
He is called upon a routine system (CALL ABORT ()) provocative increase of error:
of the names of the appealing routines and, according to the contents, impression type compilation
variables of these routines.
Handbook of Descriptif Informatique
D6.04 booklet:
Index A
Code_Aster ®
Version
4
Titrate:
Utilities of impression of messages
Date:
28/01/1999
Author (S):
J.P. LEFEBVRE, P. MIALON
Key:
D6.04.01
Page: 4/8
1.2
Messages of the type E
This type of message makes it possible to analyze a series of errors before the program stop. For example,
syntactic analysis of the command file by Superviseur or the analysis of the file of grid
by command LIRE_MAILLAGE.
The transmitter of a message of the type E will have to transmit a message of the type F at the end of its analysis, with
less than one of the routines appealing emits it in its place (parameter of error of OPxxxx returned not
no one with the supervisor)
1.3
Messages of the type S
This type of message causes a dead halt of the application with validation of the concepts created
during the execution and “clean” closing of base GLOBALE. Its employment is justified in
portions of programming instrumented to measure the past machine time (cf [D6.08.01]
Measure time CPU). It makes it possible to be secured against a stop system during an iterative process.
The developer must take some precautions all the same in order not to store fields
nonvalid, for example a not converged solution which could then imprudently be used
as initial solution.
1.4
Messages of the type A
The messages of alarm of the type A are to be prevented as long as that is possible. Indeed, it is not
recommended to worry the user of the code unnecessarily, and it is preferable not to fill it
file MESSAGE by superfluous information. The number of messages of alarm is limited
automatically with 5 identical successive messages.
It is recommended to the users who have messages of the type A “to repair” their file of
commands to make them disappear.
1.5
Messages of the type I
The messages of information are defined in [D2.07.01 §6].
Let us recall that:
·
they are ordered by key word “IMPR” of the commands, except those emitted by
supervisor (who is “with the top” of the commands),
·
they are the results of the command, neither the echo of the data of the user, nor of
weakened alarms,…
·
they belong to the contractual supply of Aster. One does not change them without into speaking in
EDA and with the users.
These messages should not be printed by routines UTMESS,… presented in it
document. Only the supervisor can use UTMESS <I>.
The commands wanting to transmit messages of information will do it with of WRITE and them
utilities described in [D6.04.02] “utility of impression of information by IMPR of the commands”.
Note:
We chose to print these messages with of “WRITE” because this method is more
flexible that UTMESS: it is easier to manage the writings in columns. Moreover, each
message is not systematically any more preceded by a white line and name of
order (and routine) émétrice.
Handbook of Descriptif Informatique
D6.04 booklet:
Index A
Code_Aster ®
Version
4
Titrate:
Utilities of impression of messages
Date:
28/01/1999
Author (S):
J.P. LEFEBVRE, P. MIALON
Key:
D6.04.01
Page: 5/8
2
General operation
Two methods are proposed in order to transmit a message:
·
if the message comprises only one simple text, one uses UTMESS [§3.5],
·
if the message comprises at the same time texts and values, the emission comprises three stages:
-
the initialization of message UTDEBM [§3.1],
-
the body of the message (répétable) [§3.3],
-
end of the message [§3.2].
The print routines described hereafter must incoming call the call to under
program initialization UTDEBM and a subroutine of termination UTFINM.
UTDEBM, by which one specifies the type of the message, prints a heading standardized indicating this type
and identifying the transmitter of the message.
Being given the variety of the situations this transmitter is not yet defined in a standardized way.
programmer will seek to define the transmitter so that one can find easily where the message has
summer emitted and by expecting that classification by name of transmitter can be used to establish one
documentation on the error messages. One proposes to name this transmitter by the chain of
characters formed by the name of the subroutine calling and a sequence number.
Example of call:
CAL UTDEBM (“F”, “NMELNL_02”, “VALUE OF NAKED NOT TROUVEE”)
This call initiates the emission of a message of the type F, the transmitter is identified as being the routine
NMELNL, it is the second message appearing in the body of the routine.
The impressions are carried out via a buffer of accumulation. Size of it
buffer represents ten print lines. It is printed each time it is
filled.
The subroutine of termination UTFINM indicates to the software that the message is finished. In it
case, the current contents of the buffer is emptied.
The buffer has tabulations making it possible to align the impressions, these tabulations as well as
length in a number of characters per line are defined in the supervisor.
Four types of subroutines are available:
initializing routines
UTDEBM
and of end of use
UTFINM
print routines of values:
·
of integer type
UTIMPI
·
of real type
UTIMPR
·
of complex type
UTIMPC
UTIMPK
·
of character type
UTIMPB
·
of logical type
subroutines of positioning
UTPOSI
message
UTSAUT
particular subroutine
equivalent with the call of UTDEBM and UTFINM
UTMESS
Note:
All the routines except UTMESS must be called between a UTDEBM and a UTFINM.
Handbook of Descriptif Informatique
D6.04 booklet:
Index A
Code_Aster ®
Version
4
Titrate:
Utilities of impression of messages
Date:
28/01/1999
Author (S):
J.P. LEFEBVRE, P. MIALON
Key:
D6.04.01
Page: 6/8
3
Subroutines with the use of the developers
3.1
Initializing routine
SUBROUTINE UTDEBM (ch1, the GPS, text)
in
ch1
K1
type of message (F, E, S, A or I)
in
the GPS
K *
name of the transmitter
in
text
K *
text to be printed
3.2
Subroutine of end of impression
SUBROUTINE UTFINM ()
This routine without argument makes it possible to declare the end of the impression and to empty the current contents
buffer.
Note:
The call to this routine is obligatory to empty the buffer of writing.
3.2
Print routines of values
SUBROUTINE UTIMPx (will cara, kvar, nbval, valley)
in
will cara
K1
editing character, takes the following values:
·
S the text and the values are put after in
buffer,
·
L a return to the line is carried out before placing it
text and values in the buffer.
in
kvar
K *
text
in
nbval
I
a number of values to be printed
in
valley
I
vector of values length nbval to be printed of type
R
correspondent with X:
C
·
INTEGER for UTIMPI
K *
·
REAL for UTIMPR
L
·
COMPLEX for UTIMPC
·
CHARACTER for UTIMPK
·
logical for UTIMPB
3.3
Subroutines of positioning in the buffer
SUBROUTINE UTPOSI (ipos)
in
ipos
I
position in the line
This routine makes it possible to position a text or a value with a given column.
SUBROUTINE UTSAUT ()
This routine without argument makes it possible to jump a line.
Handbook of Descriptif Informatique
D6.04 booklet:
Index A
Code_Aster ®
Version
4
Titrate:
Utilities of impression of messages
Date:
28/01/1999
Author (S):
J.P. LEFEBVRE, P. MIALON
Key:
D6.04.01
Page: 7/8
3.4
Subroutine of simple messages
SUBROUTINE UTMESS (ch1, the GPS, text)
in
ch1
K1
type of message
in
the GPS
K *
name of the transmitter
in
text
K *
text to be printed
This routine makes it possible to print the heading and a text. The heading is the same one as that written by UTDEBM.
This subroutine empties the buffer, a call to UTFINM is thus useless.
4
Examples of uses
First example
The following call:
CAL UTMESS (“F”, “NMDOME_05”, “IT THERE SEVERAL LOADS”
&
//“THERMIQUES”)
Print the following message:
<F> <NMDOME_02> “IT THERE SEVERAL THERMAL LOADS”
Second example
Following calls:
CAL UTDEBM (“F”, “FOLOCA_02”, “ONE OVERFLOW ON THE LEFT”)
CAL UTIMPR (“It, '
VALUE A INTERPOLEE: ', 1, X)
CAL UTIMPR (“It, '
LOWER LIMIT: ', 1, VAL (1))
CAL UTFINM ()
Print the following messages:
<F> <FOLOCA_02> ONE OVERFLOWS ON THE LEFT
VALUE A INTERPOLEE: 1.2E-3
LOWER LIMIT: 1.5E-3
Third example
Following calls:
CAL UTDEBM (“, “OP0070”, “STOP FOR LACK OF TIME CPU”)
CAL UTIMPI (“, “WITH the NUMBER D '' COMMAND: ”, 1, NUMORD)
CAL UTIMPR (“It, “AVERAGE TIME BY INCREMENT OF LOAD: ”, 1,
&
TPS1 (4))
CAL UTIMPR (“It, “TIME CPU REMAINING: ”, 1, TPS1 (1))
CAL UTFINM ()
Print the following messages:
<S> <ASTER 2. 3.31 10/03/93 >
<S> <OP0070> STOP FOR LACK OF TIME CPU TO the SEQUENCE NUMBER:
2
AVERAGE TIME BY INCREMENT OF LOAD:
3.1856E+03
TIME CPU REMAINING:
1.5562E+03
Handbook of Descriptif Informatique
D6.04 booklet:
Index A
Code_Aster ®
Version
4
Titrate:
Utilities of impression of messages
Date:
28/01/1999
Author (S):
J.P. LEFEBVRE, P. MIALON
Key:
D6.04.01
Page: 8/8
5
Description of the internal initializing routine
This subroutine is only called by Superviseur, it allows the initialization of the tables
interns of correspondence classifies message/logical number of unit and parameters of management
buffer.
SUBROUTINE UTINIT (nbfica, mcol, itb)
in
nbfica
I
a number of files of alarm:
-
nbfica = 1 MESSAGE
-
nbfica = 2 MESSAGE and RESULTAT
in
mcol
I
a number of columns used for the impression (<133)
in
itb
I
not tabulations (to take 1 per defect)
Note:
·
the supervisor publishes the messages on 80 columns,
·
this routine calls upon function IUNIFI.
Handbook of Descriptif Informatique
D6.04 booklet:
Index A