Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:21:10

0001  
0002 C*********************************************************************
0003  
0004 C...PYERRM
0005 C...Informs user of errors in program execution.
0006  
0007       SUBROUTINE PYERRM(MERR,CHMESS)
0008  
0009 C...Double precision and integer declarations.
0010       IMPLICIT DOUBLE PRECISION(A-H, O-Z)
0011       IMPLICIT INTEGER(I-N)
0012       INTEGER PYK,PYCHGE,PYCOMP
0013 C...Commonblocks.
0014       COMMON/PYJETS/N,NPAD,K(4000,5),P(4000,5),V(4000,5)
0015       COMMON/PYDAT1/MSTU(200),PARU(200),MSTJ(200),PARJ(200)
0016       SAVE /PYJETS/,/PYDAT1/
0017 C...Local character variable.
0018       CHARACTER CHMESS*(*)
0019  
0020 C...Write first few warnings, then be silent.
0021       IF(MERR.LE.10) THEN
0022         MSTU(27)=MSTU(27)+1
0023         MSTU(28)=MERR
0024         IF(MSTU(25).EQ.1.AND.MSTU(27).LE.MSTU(26)) WRITE(MSTU(11),5000)
0025      &  MERR,MSTU(31),CHMESS
0026  
0027 C...Write first few errors, then be silent or stop program.
0028       ELSEIF(MERR.LE.20) THEN
0029         IF(MSTU(29).EQ.0) MSTU(23)=MSTU(23)+1
0030         MSTU(30)=MSTU(30)+1
0031         MSTU(24)=MERR-10
0032         IF(MSTU(21).GE.1.AND.MSTU(23).LE.MSTU(22)) WRITE(MSTU(11),5100)
0033      &  MERR-10,MSTU(31),CHMESS
0034         IF(MSTU(21).GE.2.AND.MSTU(23).GT.MSTU(22)) THEN
0035           WRITE(MSTU(11),5100) MERR-10,MSTU(31),CHMESS
0036           WRITE(MSTU(11),5200)
0037           IF(MERR.NE.17) CALL PYLIST(2)
0038           CALL PYSTOP(3)
0039         ENDIF
0040  
0041 C...Stop program in case of irreparable error.
0042       ELSE
0043         WRITE(MSTU(11),5300) MERR-20,MSTU(31),CHMESS
0044         CALL PYSTOP(3)
0045       ENDIF
0046  
0047 C...Formats for output.
0048  5000 FORMAT(/5X,'Advisory warning type',I2,' given after',I9,
0049      &' PYEXEC calls:'/5X,A)
0050  5100 FORMAT(/5X,'Error type',I2,' has occured after',I9,
0051      &' PYEXEC calls:'/5X,A)
0052  5200 FORMAT(5X,'Execution will be stopped after listing of last ',
0053      &'event!')
0054  5300 FORMAT(/5X,'Fatal error type',I2,' has occured after',I9,
0055      &' PYEXEC calls:'/5X,A/5X,'Execution will now be stopped!')
0056  
0057       RETURN
0058       END