OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
read_msgfile.F
Go to the documentation of this file.
1Copyright> OpenRadioss
2Copyright> Copyright (C) 1986-2025 Altair Engineering Inc.
3Copyright>
4Copyright> This program is free software: you can redistribute it and/or modify
5Copyright> it under the terms of the GNU Affero General Public License as published by
6Copyright> the Free Software Foundation, either version 3 of the License, or
7Copyright> (at your option) any later version.
8Copyright>
9Copyright> This program is distributed in the hope that it will be useful,
10Copyright> but WITHOUT ANY WARRANTY; without even the implied warranty of
11Copyright> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12Copyright> GNU Affero General Public License for more details.
13Copyright>
14Copyright> You should have received a copy of the GNU Affero General Public License
15Copyright> along with this program. If not, see <https://www.gnu.org/licenses/>.
16Copyright>
17Copyright>
18Copyright> Commercial Alternative: Altair Radioss Software
19Copyright>
20Copyright> As an alternative to this open-source version, Altair also offers Altair Radioss
21Copyright> software under a commercial license. Contact Altair to discuss further if the
22Copyright> commercial version may interest you: https://www.altair.com/radioss/.
23!||====================================================================
24!|| read_msgfile ../engine/source/output/message/read_msgfile.F
25!||--- called by ------------------------------------------------------
26!|| execargcheck ../engine/source/engine/execargcheck.F
27!||--- calls -----------------------------------------------------
28!|| ancmsg ../engine/source/output/message/message.F
29!|| arret ../engine/source/system/arret.F
30!||--- uses -----------------------------------------------------
31!|| message_mod ../engine/share/message_module/message_mod.F
32!|| names_and_titles_mod ../common_source/modules/names_and_titles_mod.F
33!||====================================================================
34 SUBROUTINE read_msgfile(LENI,INPUTR)
35C-----------------------------------------------
36C M o d u l e s
37C-----------------------------------------------
38 USE message_mod
40C-----------------------------------------------
41C I m p l i c i t T y p e s
42C-----------------------------------------------
43#include "implicit_f.inc"
44C-----------------------------------------------
45C D u m m y A r g u m e n t s
46C-----------------------------------------------
47 INTEGER LENI
48 CHARACTER*2096 INPUTR
49C-----------------------------------------------
50C L o c a l V a r i a b l e s
51C-----------------------------------------------
52 CHARACTER(LEN=NCHARLINE100) :: ERRMSGLINE
53 CHARACTER(LEN=NCHARLINE100) :: CTMP
54 INTEGER ISTDEML
55 INTEGER NBLINE,NBLINETOT,J1,J,ID,MAXID,MSGTYPE,
56 . IADT,IADD,IO_ERR
57
58 istdeml=81
59 OPEN(unit=istdeml,form='FORMATTED',file=inputr,
60 . status='OLD',iostat=io_err)
61 IF (io_err/=0) THEN
62C
63 CALL ancmsg(msgid=72,anmode=aninfo,
64 . c1=inputr)
65 CLOSE(istdeml)
66 CALL arret(2)
67 RETURN
68 ENDIF
69C lecture du fichier ...
70 nbline=0
71 nblinetot=0
72 10 READ(istdeml,'(A)',END=20,ERR=910) errmsgline
73 nblinetot=nblinetot+1
74 IF (len_trim(errmsgline)>0.AND.
75 . errmsgline(1:1)/='#') THEN
76 nbline=nbline+1
77 END IF
78 GOTO 10
79 20 CONTINUE
80 ALLOCATE(messagesfile(nbline))
81 smessagesfile=nbline
82 IF (nbline<=0) GOTO 900
83 rewind(istdeml)
84 nbline=0
85 nblinetot=0
86 30 READ(istdeml,'(A)',END=40,ERR=910) errmsgline
87 nblinetot=nblinetot+1
88 IF (len_trim(errmsgline)>0.AND.
89 . errmsgline(1:1)/='#') THEN
90 nbline=nbline+1
91 messagesfile(nbline)=errmsgline
92 END IF
93 GOTO 30
94 40 CONTINUE
95 CLOSE(istdeml)
96 RETURN
97 900 CONTINUE
98 CLOSE(istdeml)
99 CALL ancmsg(msgid=1,anmode=aninfo,c1=inputr)
100 CALL arret(2)
101 RETURN
102 910 CONTINUE
103 CLOSE(istdeml)
104 CALL ancmsg(msgid=2,anmode=aninfo,c1=inputr,i1=nblinetot)
105 CALL arret(2)
106 RETURN
107 END SUBROUTINE
subroutine read_msgfile(leni, inputr)
integer, parameter ncharline100
subroutine ancmsg(msgid, msgtype, anmode, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, r1, r2, r3, r4, r5, r6, r7, r8, r9, c1, c2, c3, c4, c5, c6, c7, c8, c9, prmode)
Definition message.F:889
subroutine arret(nn)
Definition arret.F:87