background image
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
Mechanical department and Digital Models
Index:
With
Dissemination:
Developers
EDF
Direction of the Studies and Search
Electricity of France
Project Codes of Mechanics
Copyright EDF/DER 1997
Data-processing manual of Description
D6.04 booklet:
D6.04.01 document
Utilities of impression of messages
Summary
This document supplements the rules concerning the Inputs/outputs [D2.07.01], it describes the routines
(package “
UTMESS
“) allowing to carry out “short” writings of message.
background image
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
Data-processing manual of Description
D6.04 booklet:
Index A
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
background image
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
Data-processing manual of Description
D6.04 booklet:
Index A
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
impressions. The concepts created during the execution are
lost.
ERROR
MESSAGE
RESULT
E
error message, the execution continues (a little cf [§1.2]).
ERROR
MESSAGE
RESULT
S
error message, concepts created during the execution
are validated by the supervisor, the execution stops.
ERROR
MESSAGE
RESULT
With
message of alarm.
MESSAGE
RESULT
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 control Aster.
The emission of an error message
F
the stop will cause by
CAL JEFINI (“ERROR”)
, this call
start the memory print-out and indices associated with the various bases,
moreover, one call to
JXVERI
is carried out to control the chaining of the segments of values.
The Supervisor 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 the Supervisor, them
objects
JEVEUX
y being attached being able to be partially filled or crushed, the base
TOTAL
is not backed up (in this case, the interface
asterix
does not recopy it
towards the index user),
·
He is called upon a routine system (
CAL ABORT ()
) provocative increase of error:
of the names of the appealing routines and, according to the contents, impression type compilation
variables of these routines.
background image
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
Data-processing manual of Description
D6.04 booklet:
Index A
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 the Supervisor or the analysis of the file of mesh
by the control
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 one
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 the base
TOTAL.
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
With
Messages of alarm of the type
With
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
controls 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 the key word
“IMPR”
controls, except those emitted by
supervisor (who is “with the top” of the controls),
·
they are the results of the control, 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 the routines
UTMESS
,… presented in it
document. Only the supervisor can use
UTMESS <I>
.
The controls wanting to transmit messages of information will do it with
WRITE
and them
utilities described in [D6.04.02] “utility of impression of information by
IMPR
controls ".
Note:
We chose to print these messages with “
WRITE
“because this method is more
flexible that them
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.
background image
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
Data-processing manual of Description
D6.04 booklet:
Index A
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 the 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, a heading prints 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 channel 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
indicate 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
and of end of use
UTDEBM
UTFINM
print routines of values:
·
of type
integer
·
of type
real
·
of type
complex
·
of type
character
·
of type
logical
UTIMPI
UTIMPR
UTIMPC
UTIMPK
UTIMPB
subroutines of positioning
message
UTPOSI
UTSAUT
particular subroutine
equivalent with the call of
UTDEBM
and of
UTFINM
UTMESS
Note:
All routines except
UTMESS
must be called between one
UTDEBM
and one
UTFINM
.
background image
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
Data-processing manual of Description
D6.04 booklet:
Index A
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
R
C
K *
L
vector of values length
nbval
to print of type
agent with
X
:
·
INTEGER
for
UTIMPI
·
REAL
for
UTIMPR
·
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.
background image
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
Data-processing manual of Description
D6.04 booklet:
Index A
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”
&
//“THERMAL”)
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, VALLEY (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
background image
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
Data-processing manual of Description
D6.04 booklet:
Index A
5
Description of the internal initializing routine
This subroutine is only called by the Supervisor, 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
RESULT
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 the function
IUNIFI
.