OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
execargcheck.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!|| execargcheck ../engine/source/engine/execargcheck.F
25!||--- called by ------------------------------------------------------
26!|| radioss0 ../engine/source/engine/radioss0.F
27!||--- calls -----------------------------------------------------
28!|| arret ../engine/source/system/arret.F
29!|| build_msg ../common_source/tools/memory/my_alloc.F90
30!|| isanargument ../engine/source/engine/execargcheck.F
31!|| pexecinfo ../engine/source/engine/execargcheck.F
32!|| phelpinfo ../engine/source/engine/execargcheck.F
33!|| read_msgfile ../engine/source/output/message/read_msgfile.F
34!|| upcase ../engine/source/engine/execargcheck.F
35!||--- uses -----------------------------------------------------
36!|| check_mod ../common_source/modules/check_mod.F
37!|| command_line_args_mod ../engine/share/modules/command_line_args.F
38!|| inoutfile_mod ../common_source/modules/inoutfile_mod.F
39!|| message_mod ../engine/share/message_module/message_mod.f
40!|| spmd_comm_world_mod ../engine/source/mpi/spmd_comm_world.F90
41!||====================================================================
42 SUBROUTINE execargcheck(GOT_INPUT,INPUT,LENI,
43 * GOT_PATH, PATH, LENP)
44 USE message_mod
45 USE check_mod
48C-----------------------------------------------
49C I m p l i c i t T y p e s
50C-----------------------------------------------
51 USE spmd_comm_world_mod, ONLY : spmd_comm_world
52#include "implicit_f.inc"
53C-----------------------------------------------
54C C o m m o n B l o c k s
55C-----------------------------------------------
56#include "warn_c.inc"
57#include "commandline.inc"
58#include "userlib.inc"
59C-----------------------------------------------
60C D u m m y A r g u m e n t s
61C-----------------------------------------------
62 INTEGER GOT_INPUT,LENI,GOT_PATH,LENP
63 CHARACTER*256 INPUT
64 CHARACTER*2048 PATH
65C-----------------------------------------------
66C L o c a l V a r i a b l e s
67C-----------------------------------------------
68 INTEGER ARGN
69 INTEGER PHELPI,PEXECI,PINPUTI, PNTHI,PUSERLNAMI,MDS_PATHI
70 INTEGER :: MDS_DIRI !< Flag for -mdsdir - stores Iteration in command line
71 INTEGER I,STRL,STRLN,ERR,LENLIST,ISIN,BEGIN,IERRMSG
72 INTEGER IDUM
73 CHARACTER*2096 ARGS,INPUTC,INPUTR,MSG,STRING
74 LOGICAL :: CONDITION
75 CHARACTER C
76 INTEGER IARGC,CDL_CASE,IJK
77 CHARACTER :: LAST_LETTER,SEPARATOR
78 CHARACTER(LEN=2096) ARGS2,ARGS_REDUCE,ARGP
79 CHARACTER(LEN=4096) ULIBC
80 parameter(lenlist=20)
81 CHARACTER(LEN=12):: ARGLIST(LENLIST)
82 EXTERNAL iargc
83 DATA arglist/
84 . '-VERSION', '-V',
85 . '-HELP' , '-H',
86 . '-INPUT' , '-I',
87 . '-NTHREAD' , '-NT',
88 . '-ERROR_MSG','-EM',
89 . '-NOTRAP',
90 . '-DYNAMIC_LIB',
91 . '-DYLIB',
92 . '-MEM-MAP' ,
93 . '-INSPIRE',
94 . '-PREVIEW',
95 . '-INSPIRE_ALM','-NORST',
96 . '-MDS_LIBPATH','-MDSDIR'/
97C-----------------------------------------------
98 idum=-1
99 got_input = 0
100 got_nth = 0
101 input=' '
102 leni=0
103 phelpi = 0
104 pexeci = 0
105 pinputi = 0
106 pnthi= 0
107 ierrmsg=0
108 puserlnami = 0
109 got_userl_altname=0
110 got_mem_map=0
111 got_inspire=0
112 got_inspire_alm=0
113 mds_path_len = 0
114 mds_pathi = 0
115 mds_diri = 0
116 got_preview= 0
117
118 ! Initialize MDS_PATH Array
119 mds_path=''
120
121 ! /RFILE/OFF or -norst command line --> avoid to write restart files during a run
122 ! default = write restart files
123 restart_file = 1
124 ! ---------------------
125 ! infile / outfile cdl line
128 infile_bool=.false.
131 outfile_bool=.false.
132 inout_bool=.false.
133
134#if CPP_mach == CPP_w95 || CPP_mach == CPP_win64_spmd || CPP_mach == CPP_p4win64_spmd || CPP_mach == CPP_wnt || CPP_mach == CPP_wmr || CPP_mach == CPP_p4win64 || CPP_mach == CPP_p4win32
135 separator='\'
136#elif 1
137 separator='/'
138#endif
139
140 argn = command_argument_count()!IARGC()
141
142 DO i=1,argn
143 CALL getarg(i,args)
144 strl=len_trim(args)
145
146 args2(1:2096) = ''
147 args2(1:strl) = args(1:strl)
148 CALL upcase(args)
149
150 args_reduce(1:9) = args(1:9)
151 cdl_case = 0
152 IF(args_reduce(1:9)=='-OUTFILE=') cdl_case = 1
153 IF(args_reduce(1:8)=='-INFILE=') cdl_case = 2
154 IF(cdl_case==0) THEN
155 SELECT CASE (args)
156C------------------------------------------------
157C -NOTRAP
158 CASE ( '-NOTRAP')
159 itrace = -1
160C------------------------------------------------
161C -VERSION, -V
162 CASE ( '-VERSION')
163 pexeci = 1
164 CASE ( '-V')
165 pexeci = 1
166C------------------------------------------------
167C -HELP, -H
168 CASE ( '-HELP')
169 phelpi = 1
170 CASE ( '-H')
171 phelpi = 1
172C------------------------------------------------
173C -ERROR_MSG, -EM
174 CASE ( '-ERROR_MSG')
175 ierrmsg = i
176 CASE ( '-EM')
177 ierrmsg = i
178C------------------------------------------------
179C -INPUT, -I
180 CASE ( '-INPUT')
181 IF (pinputi==0) pinputi = i
182 CASE ( '-I')
183 IF (pinputi==0) pinputi = i
184C------------------------------------------------
185C -RST / MADYMO RESTART
186 CASE ( '-RST')
187 err = 0
188C------------------------------------------------
189C Madymo Option
190 CASE ( '--')
191 err = 0
192C------------------------------------------------
193C -NTHREAD, -NT
194 CASE ( '-NTHREAD')
195 IF (pnthi==0) pnthi = i
196 CASE ( '-NT')
197 IF (pnthi==0) pnthi = i
198C------------------------------------------------
199C -DYNAMIC_LIB, -DYLIB
200 CASE ( '-DYNAMIC_LIB')
201 IF (puserlnami==0) puserlnami=i
202 CASE ( '-DYLIB')
203 IF (puserlnami==0) puserlnami=i
204C------------------------------------------------
205C -MDS_LIBPATH
206 CASE ( '-MDS_LIBPATH')
207 IF (mds_pathi==0) mds_pathi=i
208C------------------------------------------------
209C -MDSDIR
210 CASE ( '-MDSDIR')
211 IF (mds_diri==0) mds_diri=i
212C------------------------------------------------
213C -MEM-MAP
214 CASE ( '-MEM-MAP')
215 got_mem_map=1
216 CASE ( '-PREVIEW')
218 CASE ( '-INSPIRE_ALM')
219 got_inspire_alm=1
220 CASE ( '-INSPIRE')
221 got_inspire=1
222C------------------------------------------------
223C -NORST : no restart file command
224 CASE ( '-NORST')
225 restart_file = 0
226C------------------------------------------------
227C Lignes de commande qui ne sont pas definies
228 CASE DEFAULT
229 err = 0
230 IF (i == 1)THEN
231 err = 1
232 ELSE
233 CALL getarg(i-1,argp)
234 CALL upcase(argp)
235 strln=len_trim(argp)
236C Check if argument string is a variable to an argument
237 IF (argp == '-I' .OR. argp =='-INPUT' .OR.
238 * argp == '-RST' .OR. argp =='-NT' .OR.
239 * argp == '-NTHREAD' .OR.
240 * argp == '-DYLIB' .OR. argp =='-DYNAMIC_LIB'.OR.
241 * argp == '-MDS_LIBPATH' .OR. argp == '-MDSDIR' )THEN
242 err = 0
243 ELSE
244 err = 1
245 ENDIF
246 ENDIF
247C
248C Specificife Radioss Madymo
249 IF (err == 1.AND.strl>4)THEN
250 IF (args(strl-3:strl)=='.XML')THEN
251 err = 0
252 ENDIF
253 ENDIF
254 IF (err == 1)THEN
255 CALL getarg(i,argp)
256 strln=len_trim(argp)
257 CALL phelpinfo(2,argp,strln)
258 CALL arret(7)
259 ENDIF
260C------------------------------------------------
261 END SELECT
262 ELSE
263! ------------------------------------------------
264 SELECT CASE(cdl_case)
265 ! -----------------------------
266 ! -OUTFILE=... option
267 ! -----------------------------
268 CASE(1)
269
270 outfile_name_len = len_trim(args2) - 9
271 outfile_name(1:outfile_name_len) = args2(10:len_trim(args2))
272 outfile_bool=.true.
273 DO ijk=1,outfile_name_len
274 last_letter = outfile_name(ijk:ijk)
275 ENDDO
276 IF(last_letter/=separator) THEN
278 . outfile_name(1:outfile_name_len)//separator
280 ENDIF
281 ! -----------------------------
282 ! -INFILE=... option
283 ! -----------------------------
284 CASE(2)
285 infile_name_len = len_trim(args2) - 8
286 infile_name(1:infile_name_len) = args2(9:len_trim(args2))
287 infile_bool=.true.
288 DO ijk=1,infile_name_len
289 last_letter = infile_name(ijk:ijk)
290 ENDDO
291 IF(last_letter/=separator) THEN
293 . infile_name(1:infile_name_len)//separator
295 ENDIF
296 END SELECT
297! ------------------------------------------------
298 ENDIF
299 ENDDO
300C------------------------------------------------
301C -VERSION SET
302C------------------------------------------------
303 IF (pexeci==1) THEN
304 CALL pexecinfo(idum)
305 ENDIF
306
307C------------------------------------------------
308C -HELP SET
309C------------------------------------------------
310 IF (phelpi==1) THEN
311 msg= ' '
312 CALL phelpinfo(0,msg,0)
313 ENDIF
314
315C------------------------------------------------
316C -ERROR_MSG SET
317C------------------------------------------------
318 IF (ierrmsg /= 0)THEN
319 IF (ierrmsg+1 > argn) THEN
320
321C Case -I is last argument in the list.
322
323 CALL getarg(ierrmsg,argp)
324 strln=len_trim(argp)
325 msg = argp
326 CALL phelpinfo(1,msg,strln)
327 CALL arret(7)
328 ELSE
329 CALL getarg(ierrmsg+1,inputr)
330 leni=len_trim(inputr)
331
332C check if -i has got an argument or if the next string is an input command
333
334 inputc = inputr
335 CALL upcase(inputc)
336 isin = 0
337 CALL isanargument(arglist,lenlist,inputc,isin)
338 IF ( isin==1 )THEN
339 CALL getarg(pinputi,argp)
340 strln=len_trim(argp)
341 msg=argp
342 CALL phelpinfo(1,msg,strln)
343 CALL arret(7)
344 ENDIF
345 CALL read_msgfile(leni,inputr)
346 CALL build_msg()
347 ENDIF
348 ENDIF
349
350C------------------------------------------------
351C -INPUT SET
352C------------------------------------------------
353 IF (pinputi /= 0)THEN
354 IF (pinputi+1 > argn) THEN
355
356C Case -I is last argument in the list.
357
358 CALL getarg(pinputi,argp)
359 strln=len_trim(argp)
360 msg = argp
361 CALL phelpinfo(1,msg,strln)
362 CALL arret(7)
363 ELSE
364 CALL getarg(pinputi+1,inputr)
365 leni=len_trim(inputr)
366 got_input = 1
367
368C check if -i has got an argument or if the next string is an input command
369
370 inputc = inputr
371 CALL upcase(inputc)
372 isin = 0
373 CALL isanargument(arglist,lenlist,inputc,isin)
374 IF ( isin==1 )THEN
375 CALL getarg(pinputi,argp)
376 strln=len_trim(argp)
377 msg=argp
378 CALL phelpinfo(1,msg,strln)
379 CALL arret(7)
380 ENDIF
381
382 begin=len_trim(inputr)
383 condition = .false.
384 DO WHILE (begin > 0 .AND. .NOT.condition)
385 c = inputr(begin:begin)
386 IF (ichar(c)==47 .OR. ichar(c)==92) THEN
387 condition=.true.
388 GOTO 150
389 ENDIF
390 begin=begin-1
391 ENDDO
392 150 CONTINUE
393 leni = len_trim(inputr) - begin
394 begin=begin+1
395 input(1:leni) = inputr(begin:len_trim(inputr))
396
397 IF (begin > 1)THEN
398 got_path=1
399 lenp=begin-1
400 path(1:lenp)=inputr(1:lenp)
401 ENDIF
402 ENDIF
403 ELSE
404 ! -input/-i was not set. Exiting with error message.
405 msg= ' '
406 CALL phelpinfo(6,msg,0)
407 CALL arret(7)
408 ENDIF
409
410C------------------------------------------------
411C -NTHREAD SET
412C------------------------------------------------
413 IF (pnthi /= 0)THEN
414 IF (pnthi+1 > argn) THEN
415C case -nt is last argument in the list.
416 CALL getarg(pnthi,argp)
417 strln=len_trim(argp)
418 msg = argp
419 CALL phelpinfo(1,msg,strln)
420 CALL arret(7)
421 ELSE
422 CALL getarg(pnthi+1,string)
423C check if -nt has got an argument or if the next string is an input command
424 CALL upcase(string)
425 isin = 0
426 CALL isanargument(arglist,lenlist,string,isin)
427 IF ( isin==1 )THEN
428 CALL getarg(pnthi,argp)
429 strln=len_trim(argp)
430 msg=argp
431 CALL phelpinfo(1,msg,strln)
432 CALL arret(7)
433 END IF
434 got_nth = 1
435C convert the argument to an Integer
436 CALL getarg(pnthi+1,string)
437 READ(string,'(I10)',err=1999) nth
438C Read converting was OK goto 2000
439 GOTO 2000
440 1999 CONTINUE
441C Error was found during Character to Integer translation
442 strln=len_trim(string)
443c CALL GETARG(PNTHI,ARGP)
444 msg=string
445 CALL phelpinfo(4,msg,strln)
446 CALL arret(7)
447 2000 CONTINUE
448 ENDIF
449 ENDIF
450C------------------------------------------------
451C -DYLIB SET
452C------------------------------------------------
453 IF (puserlnami /= 0)THEN
454 IF (puserlnami+1 > argn) THEN
455
456C Case -DYLIB is last argument in the list.
457
458 CALL getarg(puserlnami,argp)
459 strln=len_trim(argp)
460 CALL phelpinfo(1,argp,strln)
461
462 ELSE
463 CALL getarg(puserlnami+1,userl_altname)
464 len_userl_altname=len_trim(userl_altname)
465 got_userl_altname = 1
466C check if -dylib has got an argument or if the next string is an input command
467 ulibc=''
468 ulibc(1:len_userl_altname) = userl_altname(1:len_userl_altname)
469 CALL upcase(ulibc)
470 isin = 0
471 CALL isanargument(arglist,lenlist,ulibc,isin)
472 IF ( isin==1 )THEN
473 CALL getarg(puserlnami,argp)
474 strln=len_trim(argp)
475 CALL phelpinfo(1,argp,strln)
476 CALL arret(7)
477 ENDIF
478
479 ENDIF ! IF (PUSERLNAMI+1 > ARGN) THEN
480 ENDIF
481 3000 CONTINUE
482C------------------------------------------------
483C -MDS_LIBPATH
484C------------------------------------------------
485 IF (mds_pathi /= 0)THEN
486
487 IF (mds_pathi+1 > argn) THEN
488
489C Case -DYLIB is last argument in the list.
490
491 CALL get_command_argument(mds_pathi,argp)
492 strln=len_trim(argp)
493 CALL phelpinfo(1,argp,strln)
494
495 ELSE
496 CALL get_command_argument(mds_pathi+1,mds_path)
497 mds_path_len=len_trim(mds_path)
498C check if -mds has got an argument or if the next string is an input command
499
500 ulibc=''
501 ulibc(1:mds_path_len) = mds_path(1:mds_path_len)
502 CALL upcase(ulibc)
503 isin = 0
504 CALL isanargument(arglist,lenlist,ulibc,isin)
505
506 IF ( isin==1 )THEN
507 CALL getarg(mds_pathi,argp)
508 strln=len_trim(argp)
509 CALL phelpinfo(1,argp,strln)
510 CALL arret(7)
511 ENDIF
512
513 ENDIF ! IF (MDS_PATHI+1 > ARGN) THEN
514 ENDIF
515C------------------------------------------------
516C -MDSDIR
517C------------------------------------------------
518 IF (mds_diri /= 0)THEN
519
520 IF (mds_diri+1 > argn) THEN
521
522C Case -DYLIB is last argument in the list.
523 CALL get_command_argument(mds_diri,argp)
524 strln=len_trim(argp)
525 CALL phelpinfo(1,argp,strln)
526
527 ELSE
528
529 CALL get_command_argument(mds_diri+1,mds_path)
530 mds_path_len=len_trim(mds_path)
531
532 ! check if -mdsdir has got an argument or if the next string is an input command
533 ulibc=''
534 ulibc(1:mds_path_len) = mds_path(1:mds_path_len)
535 CALL upcase(ulibc)
536 isin = 0
537 CALL isanargument(arglist,lenlist,ulibc,isin)
538
539 IF ( isin==1 )THEN
540 CALL getarg(mds_diri,argp)
541 strln=len_trim(argp)
542 CALL phelpinfo(1,argp,strln)
543 CALL arret(7)
544 ENDIF
545
546 ENDIF ! IF (MDS_DIRI+1 > ARGN) THEN
547 ENDIF
548C------------------------------------------------
549
550 END
551
552
553
554!||====================================================================
555!|| upcase ../engine/source/engine/execargcheck.F
556!||--- called by ------------------------------------------------------
557!|| execargcheck ../engine/source/engine/execargcheck.f
558!||--- uses -----------------------------------------------------
559!|| spmd_comm_world_mod ../engine/source/mpi/spmd_comm_world.F90
560!||====================================================================
561 SUBROUTINE upcase (STRING)
562C-----------------------------------------------
563C I m p l i c i t T y p e s
564C-----------------------------------------------
565 USE spmd_comm_world_mod, ONLY : spmd_comm_world
566#include "implicit_f.inc"
567C-----------------------------------------------
568C D u m m y A r g u m e n t s
569C-----------------------------------------------
570 CHARACTER*(*) STRING
571C-----------------------------------------------
572C L o c a l V a r i a b l e s
573C-----------------------------------------------
574 INTEGER LS,LC
575C
576 ls = len(string)
577C
578 DO lc = 1,ls
579 IF (lge(string(lc:lc),'a') .AND.
580 1 lle(string(lc:lc),'z')) THEN
581C
582 string(lc:lc) = char(ichar(string(lc:lc)) - 32)
583 ELSE
584 ENDIF
585 END DO
586 RETURN
587 END
588!||====================================================================
589!|| isanargument ../engine/source/engine/execargcheck.F
590!||--- called by ------------------------------------------------------
591!|| execargcheck ../engine/source/engine/execargcheck.F
592!||--- uses -----------------------------------------------------
593!|| spmd_comm_world_mod ../engine/source/mpi/spmd_comm_world.F90
594!||====================================================================
595 SUBROUTINE isanargument(ARGLIST,LENLIST,ARG,ISIN)
596C-----------------------------------------------
597C I m p l i c i t T y p e s
598C-----------------------------------------------
599 USE spmd_comm_world_mod, ONLY : spmd_comm_world
600#include "implicit_f.inc"
601C-----------------------------------------------
602C D u m m y A r g u m e n t s
603C-----------------------------------------------
604 CHARACTER (LEN=12),INTENT(IN) :: ARGLIST(LENLIST)
605 CHARACTER ARG*2096
606 INTEGER LENLIST,ISIN
607C-----------------------------------------------
608C L o c a l V a r i a b l e s
609C-----------------------------------------------
610 INTEGER I,STRLEN
611 CHARACTER ARGC*2096
612C-----------------------------------------------
613 strlen=len_trim(arg)
614 argc(1:2096)=''
615 i=1
616 DO WHILE (i<=strlen .AND. arg(i:i)/='=')
617 argc(i:i)=arg(i:i)
618 i=i+1
619 IF(i>strlen)EXIT ! check bounds issue for ARG (I:I) if I=STRLEN+1
620 ENDDO
621
622 isin = 0
623 DO i=1,lenlist
624 IF (trim(arglist(i))==trim(argc)) isin=1
625 ENDDO
626 END
627
628
629
630!||====================================================================
631!|| pexecinfo ../engine/source/engine/execargcheck.F
632!||--- called by ------------------------------------------------------
633!|| execargcheck ../engine/source/engine/execargcheck.F
634!||--- calls -----------------------------------------------------
635!|| my_exit ../engine/source/system/my_exit.c
636!|| prexecinfo ../engine/source/engine/execargcheck.F
637!||--- uses -----------------------------------------------------
638!|| spmd_comm_world_mod ../engine/source/mpi/spmd_comm_world.F90
639!||====================================================================
640 SUBROUTINE pexecinfo(IDUM)
641C-----------------------------------------------
642C I m p l i c i t T y p e s
643C-----------------------------------------------
644 USE spmd_comm_world_mod, ONLY : spmd_comm_world
645#include "implicit_f.inc"
646C-----------------------------------------------
647C C o m m o n B l o c k s
648C-----------------------------------------------
649#include "spmd.inc"
650C-----------------------------------------------
651C L o c a l V a r i a b l e s
652C-----------------------------------------------
653#ifdef MPI
654 INTEGER IERROR
655 INTEGER MYRANK, NNODES
656 INTEGER KEY, IERR
657#endif
658 INTEGER IDUM
659 INTEGER :: COLOUR
660 LOGICAL :: VALID
661C-----------------------------------------------
662#ifdef MPI
663 key = 0
664 call mpi_initialized(key, ierr)
665 CALL mpi_init(ierror)
666
667 CALL mpi_comm_get_attr(mpi_comm_world, mpi_appnum,
668 * colour, valid, ierror)
669 CALL mpi_comm_split(mpi_comm_world,colour,key,
670 * spmd_comm_world,ierror)
671
672 CALL mpi_comm_size(spmd_comm_world, nnodes, ierror)
673 CALL mpi_comm_rank(spmd_comm_world, myrank, ierror)
674
675 if (myrank==0) CALL prexecinfo(idum)
676
677 CALL mpi_barrier(spmd_comm_world,ierror)
678
679 CALL mpi_finalize(ierror)
680
681#elif 1
682 CALL prexecinfo(idum)
683#endif
684 CALL my_exit(0)
685 END
686
687!||====================================================================
688!|| prexecinfo ../engine/source/engine/execargcheck.F
689!||--- called by ------------------------------------------------------
690!|| pexecinfo ../engine/source/engine/execargcheck.F
691!||--- uses -----------------------------------------------------
692!|| spmd_comm_world_mod ../engine/source/mpi/spmd_comm_world.f90
693!||====================================================================
694 SUBROUTINE prexecinfo(IDUM)
695C-----------------------------------------------
696C I m p l i c i t T y p e s
697C-----------------------------------------------
698 USE spmd_comm_world_mod, ONLY : spmd_comm_world
699#include "implicit_f.inc"
700#include "r4r8_p.inc"
701C-----------------------------------------------
702C C o m m o n B l o c k s
703C-----------------------------------------------
704#include "build_info.inc"
705#include "titr_c.inc"
706C-----------------------------------------------
707C L o c a l V a r i a b l e s
708C-----------------------------------------------
709 CHARACTER*256 RFLEXNAM,GPUTITLE,ARCHTIT*66
710 INTEGER LEN,LBT
711 INTEGER RDFLEXCOMP
712 INTEGER IDUM
713C-----------------------------------------------
714#include "machine.inc"
715C-----------------------------------------------
716
717 lbt = len_trim(btag)
718 WRITE(6,'(A,A)') ' '
719 WRITE(6,'(A,A)') 'OpenRadios Engine '
720 WRITE(6,'(A,A)') ' '
721 WRITE(6,'(A,A)') 'Platform release : ',bname(1:lenbnam)
722 WRITE(6,'(a,a)') 'platform info : ',ARCHTITLE
723
724 IF (IR4R8==1)THEN
725 WRITE(6,'(a,a)')
726 * ' extended single precision version'
727 ENDIF
728 WRITE(6,'(a,a)') ' '
729 WRITE(6,'(a,a)') 'time of build : ',BTIME
730 WRITE(6,'(a,a)') 'date of build : ',BDATE
731 WRITE(6,'(a,a)') ' '
732
733
734 END
735
736!||====================================================================
737!|| phelpinfo ../engine/source/engine/execargcheck.F
738!||--- called by ------------------------------------------------------
739!|| execargcheck ../engine/source/engine/execargcheck.F
740!|| get_file_name_info ../engine/source/system/get_file_name_info.F
741!||--- calls -----------------------------------------------------
742!|| arret ../engine/source/system/arret.F
743!|| prhelpinfo ../engine/source/engine/execargcheck.F
744!||--- uses -----------------------------------------------------
745!|| spmd_comm_world_mod ../engine/source/mpi/spmd_comm_world.F90
746!||====================================================================
747 SUBROUTINE PHELPINFO(ERRN,EMSG,SMSG)
748C-----------------------------------------------
749C I m p l i c i t T y p e s
750C-----------------------------------------------
751 USE SPMD_COMM_WORLD_MOD, ONLY : SPMD_COMM_WORLD
752#include "implicit_f.inc"
753C-----------------------------------------------
754C C o m m o n B l o c k s
755C-----------------------------------------------
756#include "spmd.inc"
757C-----------------------------------------------
758C D u m m y A r g u m e n t s
759C-----------------------------------------------
760 INTEGER ERRN,SMSG
761 CHARACTER*256 ARGP,EMSG*256
762C-----------------------------------------------
763C L o c a l V a r i a b l e s
764C-----------------------------------------------
765#ifdef MPI
766 INTEGER STATUS(MPI_STATUS_SIZE),IERROR
767 INTEGER MYRANK, NNODES
768 INTEGER KEY, IERR
769#endif
770 INTEGER :: COLOUR
771 LOGICAL :: VALID
772C-----------------------------------------------
773#ifdef MPI
774 KEY = 0
775 CALL MPI_INITIALIZED(KEY, IERR)
776 CALL MPI_INIT(IERROR)
777
778 CALL MPI_COMM_GET_ATTR(MPI_COMM_WORLD, MPI_APPNUM,
779 * COLOUR, VALID, IERROR)
780 CALL MPI_COMM_SPLIT(MPI_COMM_WORLD,COLOUR,KEY,
781 * SPMD_COMM_WORLD,IERROR)
782 CALL MPI_COMM_SIZE(SPMD_COMM_WORLD, NNODES, IERROR)
783 CALL MPI_COMM_RANK(SPMD_COMM_WORLD, MYRANK, IERROR)
784
785 if (MYRANK==0) CALL PRHELPINFO(ERRN,EMSG,SMSG)
786
787 CALL MPI_BARRIER(SPMD_COMM_WORLD,IERROR)
788
789 CALL MPI_FINALIZE(IERROR)
790
791#elif 1
792 CALL PRHELPINFO(ERRN,EMSG,SMSG)
793#endif
794 CALL ARRET(7)
795 END
796
797!||====================================================================
798!|| prhelpinfo ../engine/source/engine/execargcheck.F
799!||--- called by ------------------------------------------------------
800!|| phelpinfo ../engine/source/engine/execargcheck.F
801!||--- uses -----------------------------------------------------
802!|| spmd_comm_world_mod ../engine/source/mpi/spmd_comm_world.F90
803!||====================================================================
804 SUBROUTINE PRHELPINFO(ERRN,EMSG,SMSG)
805C-----------------------------------------------
806C I m p l i c i t T y p e s
807C-----------------------------------------------
808 USE SPMD_COMM_WORLD_MOD, ONLY : SPMD_COMM_WORLD
809#include "implicit_f.inc"
810C-----------------------------------------------
811C C o m m o n B l o c k s
812C-----------------------------------------------
813#include "build_info.inc"
814C-----------------------------------------------
815C D u m m y A r g u m e n t s
816C-----------------------------------------------
817 INTEGER ERRN,SMSG
818 CHARACTER EMSG*256
819C-----------------------------------------------
820C L o c a l V a r i a b l e s
821C-----------------------------------------------
822 IF (ERRN == 1)THEN
823 WRITE(6,'(a)') ' '
824 WRITE(6,'(a,a)') '*** error : missing argument to ',
825 * EMSG(1:SMSG)
826 WRITE(6,'(a)') ' '
827 ENDIF
828
829 IF (ERRN == 2)THEN
830 WRITE(6,'(a)') ' '
831 WRITE(6,'(a,a)') '*** error : unknown command line argument:',
832 * EMSG(1:SMSG)
833 WRITE(6,'(a)') ' '
834 ENDIF
835
836 IF (ERRN == 3)THEN
837 WRITE(6,'(a)') ' '
838 WRITE(6,'(a,a)') 'wrong radioss input file name: ',EMSG(1:SMSG)
839 WRITE(6,'(a)') ' '
840 ENDIF
841
842 IF (ERRN == 4)THEN
843 WRITE(6,'(a)') ' '
844 WRITE(6,'(a,a,a,a,a)')
845 * '*** error : "',EMSG(1:SMSG),'" is not an integer value'
846 ENDIF
847
848 IF (ERRN == 5)THEN
849 WRITE(6,'(A)') ' '
850 WRITE(6,'(A,A,A,A,A)')
851 * '*** ERROR : Wrong "',EMSG(1:SMSG),'" option'
852 ENDIF
853
854 IF (ERRN == 6)THEN
855 WRITE(6,'(A)') ' '
856 WRITE(6,'(A)') '*** ERROR : No input deck set. Use -input [Engine input file] '
857 ENDIF
858
859 WRITE(6,'(A)') ' '
860 WRITE(6,'(A,A)') 'RADIOSS Engine version ',VERS(1:LEN_VERS)
861 WRITE(6,'(A)') ' '
862 WRITE(6,'(A)') 'Command line arguments help: '
863 WRITE(6,'(A,A)') ' -help / -h : ',
864 * 'Print this message'
865 WRITE(6,'(A,A)') ' -version / -v : ',
866 * 'Print RADIOSS release information'
867 WRITE(6,'(A,A)') ' -input [FILE] / -i [FILE] : ',
868 * 'Set RADIOSS Engine input file'
869 WRITE(6,'(A,A)') ' -nthread [INTEGER] / -nt [INTEGER] : ',
870 * 'Set Number of SMP threads per SPMD domain'
871 WRITE(6,'(A,A)') ' -notrap : ',
872 * 'Disable error trapping'
873 WRITE(6,'(A,A)') ' -norst : ',
874 * 'Do not write restart files'
875 WRITE(6,'(A,A)') ' -dynamic_lib [FILE] / -dylib [FILE] : ',
876 * 'Set name to the dynamic library for Radioss User Interface'
877 WRITE(6,'(A,A)') ' -mdsdir [PATH] / -mds_libpath [PATH] : ',
878#ifdef _WIN32
879 * 'Set directory to MDS Library (default is %ALTAIR_HOME%/hwsolver/MultiscaleDesigner/%arch%)'
880#else
881 * 'Set directory to MDS Library (default is $ALTAIR_HOME/hwsolver/MultiscaleDesigner/$arch)'
882#endif
883
884 WRITE(6,'(A,A)') ' -outfile=[path] : ',
885 * 'set output file directory for all output and created files'
886 WRITE(6,'(a)') ' '
887
888
889 END
void my_exit(int *i)
Definition analyse.c:1038
subroutine phelpinfo(errn, emsg, smsg)
subroutine execargcheck(got_input, input, leni, got_path, path, lenp)
subroutine isanargument(arglist, lenlist, arg, isin)
subroutine pexecinfo(idum)
subroutine upcase(string)
subroutine prexecinfo(idum)
subroutine mpi_finalize(ierr)
Definition mpi.f:288
subroutine mpi_comm_split(comm, color, key, comm2, ierr)
Definition mpi.f:272
subroutine mpi_barrier(comm, ierr)
Definition mpi.f:188
subroutine mpi_comm_size(comm, size, ierr)
Definition mpi.f:263
subroutine mpi_init(ierr)
Definition mpi.f:342
subroutine mpi_comm_rank(comm, rank, ierr)
Definition mpi.f:254
subroutine mpi_initialized(flag, ierr)
Definition mpi.f:350
integer restart_file
Definition check_mod.F:52
integer infile_name_len
integer, parameter infile_char_len
character(len=outfile_char_len) outfile_name
logical infile_bool
character(len=infile_char_len) infile_name
logical outfile_bool
integer, parameter outfile_char_len
integer outfile_name_len
program radioss
Definition radioss.F:34
subroutine build_msg()
Definition build_msg.F:36
subroutine read_msgfile(leni, inputr)
subroutine arret(nn)
Definition arret.F:87