Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:15:46

0001     
0002 C*********************************************************************  
0003     
0004       SUBROUTINE RLUGET(LFN,MOVE)   
0005     
0006 C...Purpose: to dump the state of the random number generator on a file 
0007 C...for subsequent startup from this state onwards. 
0008       COMMON/LUDATR/MRLU(6),RRLU(100)   
0009       SAVE /LUDATR/ 
0010       CHARACTER CHERR*8 
0011     
0012 C...Backspace required number of records (or as many as there are). 
0013       IF(MOVE.LT.0) THEN    
0014         NBCK=MIN(MRLU(6),-MOVE) 
0015         DO 100 IBCK=1,NBCK  
0016   100   BACKSPACE(LFN,ERR=110,IOSTAT=IERR)  
0017         MRLU(6)=MRLU(6)-NBCK    
0018       ENDIF 
0019     
0020 C...Unformatted write on unit LFN.  
0021       WRITE(LFN,ERR=110,IOSTAT=IERR) (MRLU(I1),I1=1,5), 
0022      &(RRLU(I2),I2=1,100)   
0023       MRLU(6)=MRLU(6)+1 
0024       RETURN    
0025     
0026 C...Write error.    
0027   110 WRITE(CHERR,'(I8)') IERR  
0028       CALL LUERRM(18,'(RLUGET:) error when accessing file, IOSTAT ='//  
0029      &CHERR)    
0030     
0031       RETURN    
0032       END