Skip to content
Snippets Groups Projects
Commit 5e6908df authored by WAUTELET Philippe's avatar WAUTELET Philippe
Browse files

Philippe 24/04/2020: bugfix: correct Print_msg

(cherry picked from commit 63421ea8)
parent b24d92a0
No related branches found
No related tags found
No related merge requests found
...@@ -82,6 +82,7 @@ CHARACTER(LEN=*), dimension(:), INTENT(IN) :: HMSG !Message ...@@ -82,6 +82,7 @@ CHARACTER(LEN=*), dimension(:), INTENT(IN) :: HMSG !Message
! !
character(len=2) :: ysz character(len=2) :: ysz
CHARACTER(LEN=2) :: YPRC CHARACTER(LEN=2) :: YPRC
character(len=8) :: yprcnb
CHARACTER(LEN=9) :: YPRE CHARACTER(LEN=9) :: YPRE
CHARACTER(LEN=30) :: YSUBR CHARACTER(LEN=30) :: YSUBR
character(len=:), allocatable :: yformat character(len=:), allocatable :: yformat
...@@ -182,22 +183,22 @@ if ( lverb_allprc ) then ...@@ -182,22 +183,22 @@ if ( lverb_allprc ) then
if ( gwrite_stdout ) then if ( gwrite_stdout ) then
if ( ilines == 1 ) then if ( ilines == 1 ) then
yformat = '(' // yprc // ','': '',a9,a30,a)' yformat = '(' // yprc // ','': '',a9,a30,a)'
Write( unit = output_unit, fmt = yformat ) ip, ypre, ysubr, hmsg Write( unit = output_unit, fmt = yformat ) ip - 1, ypre, ysubr, hmsg
else else
yformat = '(' // yprc // ','': '',a9,a30,' // ysz // ',''/'',' // ysz // ','': '',a)' yformat = '(' // yprc // ','': '',a9,a30,' // ysz // ',''/'',' // ysz // ','': '',a)'
do ji = 1, ilines do ji = 1, ilines
Write( unit = output_unit, fmt = yformat ) ip, ypre, ysubr, ji, ilines, Trim( hmsg(ji) ) Write( unit = output_unit, fmt = yformat ) ip - 1, ypre, ysubr, ji, ilines, Trim( hmsg(ji) )
end do end do
end if end if
end if end if
if ( gwrite_outlst ) then if ( gwrite_outlst ) then
if ( ilines == 1 ) then if ( ilines == 1 ) then
yformat = '(' // yprc // ','': '',a9,a30,a)' yformat = '(' // yprc // ','': '',a9,a30,a)'
Write( unit = ilu, fmt = yformat) ip, ypre, ysubr, hmsg Write( unit = ilu, fmt = yformat) ip - 1, ypre, ysubr, hmsg
else else
yformat = '(' // yprc // ','': '',a9,a30,' // ysz // ',''/'',' // ysz // ','': '',a)' yformat = '(' // yprc // ','': '',a9,a30,' // ysz // ',''/'',' // ysz // ','': '',a)'
do ji = 1, ilines do ji = 1, ilines
Write( unit = ilu, fmt = yformat) ip, ypre, ysubr, ji, ilines, Trim( hmsg(ji) ) Write( unit = ilu, fmt = yformat) ip - 1, ypre, ysubr, ji, ilines, Trim( hmsg(ji) )
end do end do
end if end if
end if end if
...@@ -225,11 +226,13 @@ else ...@@ -225,11 +226,13 @@ else
end if end if
! !
IF (KVERB<=IABORTLEVEL) THEN IF (KVERB<=IABORTLEVEL) THEN
Write( yprcnb, '( i8 )' ) ip - 1
IF (GWRITE_STDOUT) WRITE(UNIT=OUTPUT_UNIT,FMT=*) 'ABORT asked by application '//TRIM(CPROGRAM) IF (GWRITE_STDOUT) WRITE(UNIT=OUTPUT_UNIT,FMT=*) 'ABORT asked by application '//TRIM(CPROGRAM)
IF (GWRITE_OUTLST) WRITE(UNIT=ILU, FMT=*) 'ABORT asked by application '//TRIM(CPROGRAM) IF (GWRITE_OUTLST) WRITE(UNIT=ILU, FMT=*) 'ABORT asked by application '//TRIM(CPROGRAM)
!Every process write on the error unit. This is necessary if the abort is done by an other process than 0. !Every process write on the error unit. This is necessary if the abort is done by an other process than 0.
WRITE(UNIT=ERROR_UNIT,FMT="(A8,': ',A9,A30,A)") ADJUSTL(YPRC),YPRE,YSUBR,HMSG WRITE(UNIT=ERROR_UNIT,FMT="(A8,': ',A9,A30,A)") ADJUSTL(yprcnb),YPRE,YSUBR,HMSG
WRITE(UNIT=ERROR_UNIT,FMT="(A8,': ',A)") ADJUSTL(YPRC),'ABORT asked by application '//TRIM(CPROGRAM) WRITE(UNIT=ERROR_UNIT,FMT="(A8,': ',A)") ADJUSTL(yprcnb),'ABORT asked by application '//TRIM(CPROGRAM)
#if 0 #if 0
!Problem: loop dependency between MODE_MSG and MODE_FM (IO_FILE_CLOSE_ll call PRINT_MSG) !Problem: loop dependency between MODE_MSG and MODE_FM (IO_FILE_CLOSE_ll call PRINT_MSG)
NIO_VERB = 0 !To not get further messages (ABORT should be the last for readability) NIO_VERB = 0 !To not get further messages (ABORT should be the last for readability)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment