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 ../starter/source/output/message/read_msgfile.F
25!||--- called by ------------------------------------------------------
26!|| execargcheck ../starter/source/starter/execargcheck.F
27!||--- calls -----------------------------------------------------
28!|| ancmsg ../starter/source/output/message/message.f
29!|| arret ../starter/source/system/arret.F
30!||--- uses -----------------------------------------------------
31!|| message_mod ../starter/share/message_module/message_mod.F
32!||====================================================================
33 SUBROUTINE read_msgfile(LENI,INPUTR)
34C-----------------------------------------------
35C M o d u l e s
36C-----------------------------------------------
37 USE message_mod
39C-----------------------------------------------
40C I m p l i c i t T y p e s
41C-----------------------------------------------
42#include "implicit_f.inc"
43C-----------------------------------------------
44C D u m m y A r g u m e n t s
45C-----------------------------------------------
46 INTEGER LENI
47 CHARACTER*2096 INPUTR
48C-----------------------------------------------
49C L o c a l V a r i a b l e s
50C-----------------------------------------------
51 CHARACTER(LEN=NCHARLINE) :: ERRMSGLINE
52 CHARACTER(LEN=NCHARLINE) :: CTMP
53 INTEGER ISTDEML
54 INTEGER NBLINE,NBLINETOT,J1,J,ID,MAXID,MSGTYPE,
55 . IADT,IADD,IO_ERR
56
57 istdeml=81
58 OPEN(unit=istdeml,form='FORMATTED',file=inputr,
59 . status='OLD',iostat=io_err)
60 IF (io_err/=0) THEN
61C
62 CALL ancmsg(msgid=72,anmode=aninfo,msgtype=msgerror,
63 . c1=inputr)
64 CLOSE(istdeml)
65 CALL arret(2)
66 RETURN
67 ENDIF
68C lecture du fichier ...
69 nbline=0
70 nblinetot=0
71 10 READ(istdeml,'(A)',END=20,ERR=910) errmsgline
72 nblinetot=nblinetot+1
73 IF (len_trim(errmsgline)>0.AND.
74 . errmsgline(1:1)/='#') THEN
75 nbline=nbline+1
76 END IF
77 GOTO 10
78 20 CONTINUE
79 ALLOCATE(messagesfile(nbline))
80 smessagesfile=nbline
81 IF (nbline<=0) GOTO 900
82 rewind(istdeml)
83 nbline=0
84 nblinetot=0
85 30 READ(istdeml,'(A)',END=40,ERR=910) errmsgline
86 nblinetot=nblinetot+1
87 IF (len_trim(errmsgline)>0.AND.
88 . errmsgline(1:1)/='#') THEN
89 nbline=nbline+1
90 messagesfile(nbline)=errmsgline
91 END IF
92 GOTO 30
93 40 CONTINUE
94 CLOSE(istdeml)
95 RETURN
96 900 CONTINUE
97 CLOSE(istdeml)
98 CALL ancmsg(msgid=1,
99 . anmode=aninfo,
100 . msgtype=msgerror,
101 . c1=inputr)
102 CALL arret(2)
103 RETURN
104 910 CONTINUE
105 CLOSE(istdeml)
106 CALL ancmsg(msgid=2,
107 . anmode=aninfo,
108 . msgtype=msgerror,
109 . c1=inputr,
110 . i1=nblinetot+1)
111 CALL arret(2)
112 RETURN
113 END SUBROUTINE
integer, parameter ncharline
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 read_msgfile(leni, inputr)
subroutine arret(nn)
Definition arret.F:87
program starter
Definition starter.F:39