-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbsinit.f
120 lines (107 loc) · 4.64 KB
/
bsinit.f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
*CMZ : 28/05/2004 09.02.00 by H1 Saclay
*-- Author :
************************************************************************
* =================== *
SUBROUTINE BSINIT
* =================== *
* ((Purpose)) *
* Initialization of BASE50/SPRING50. *
* Function of this routine is *
* (0) Set the size of histogram and scatter plot buffers *
* (1) Set the parameters INTV and IPNT *
* INTV = ( 0 / 1 / any ) *
* = ( Batch / Batch(Unix) / Interactive ) *
* IPNT = ( 0 / any ) *
* = ( IBM Type / Ascii printer ) *
* (2) Set the acceleration factor ALPHA by 1.5 *
* The range of this value is from 0.0 to 2.0. *
* ALPHA = 0.0 results in no grid-optimization. *
* (3) Set the grid-optimization flag IGOPT ( Default value 0 ) *
* IGOPT = 0 : The grid is optimized by VEGAS algorithm *
* IGOPT = 1 : The grid is optimized so that the accuracy *
* of each iteration be minimized. *
* (4) Set Node-ID number NODEID and the number of nodes NUMNOD *
* (5) Set seed of radom number *
* (6) Set the values of BASES paremeters with default ones. *
* (7) Set the values of parameters with non-sense values, *
* which should be set again with the true values by User *
* before running BASES. *
* *
* Coded by S.Kawabata March '94 *
* *
************************************************************************
IMPLICIT REAL*8 (A-H,O-Z)
include 'dvcs.common'
PARAMETER (MXDIM = 50, NDMX = 50 )
COMMON /BPARM1/ XL(MXDIM),XU(MXDIM),NDIM,NWILD,
. IG(MXDIM),NCALL
COMMON /BPARM2/ ACC1,ACC2,ITMX1,ITMX2
COMMON /BASE0/ JFLAG,IBASES
COMMON /BASE6/ D(NDMX,MXDIM),
. ALPH,XSAVE(NDMX,MXDIM),XTI,XTSI,XACC,IGOPT
COMMON /BSCNTL/ INTV, IPNT, NLOOP, MLOOP
COMMON/NINFO/ NODEID, NUMNOD
COMMON /BDATE/ IDATE(3),ITIME(2)
* IDATE(1) : year ITIME(1) : hour
* IDATE(2) : month ITIME(2) : minute
* IDATE(3) : day
REAL*4 TIMEBS,TIMINT,TIMESP,TIME0,RTIME,TIMEB1,TIMEB2,TIMES1
COMMON /BTIME1/ TIME0,RTIME,TIMEB1,TIMEB2,TIMES1
COMMON /BTIME2/ TIMEBS(0:2),TIMINT,TIMESP(0:2)
*=========================================================
* (0) Initialization of timer and Histogram buffer
* Timer initialization
CALL BSTIME( TIME0, 0 )
TIMEB1 = TIME0
TIMINT = 0
* Histogram buffer initialization
LU = 6
CALL BHINIT( LU )
*=========================================================
* (1) Set the parameters INTV and IPNT
INTV = 2
IPNT = 1
* (2) Set the acceleration factor ALPHA by 1.5
ALPH = 1.5D0
* (3) Set the grid-optimization flag IGOPT
IGOPT = 0
* (4) Set Node-ID number NODEID and the number of nodes NUMNOD
* IF( INTV .EQ. 0 ) THEN
NODEID = 0
NUMNOD = 1
* ELSE
* NODEID = 0
* NUMNOD = 1
* ENDIF
C---------------------------------------------------------------
C (5) Set initial seeds of random number generator
C---------------------------------------------------------------
C ISEED = 1234567
ISEED = stISEED
C
CALL DRNSET( ISEED )
C ---------------------------------------------------------------
C (6),(7) Set BASES parameters equal to default values
C ---------------------------------------------------------------
C
NDIM = -1
NWILD = 1
ITMX1 = 15
ITMX2 = 100
NCALL = 1000
ACC1 = 0.2D0
ACC2 = 0.01D0
DO 100 I = 1,MXDIM
IG(I) = 1
XU(I) = -1.0D37
100 CONTINUE
* Initialization of computing time table of BASES
DO 200 I = 0, 2
TIMEBS(I) = 0.0
200 CONTINUE
*-------------------------------------------
* Don't change IBASES from this value
*-------------------------------------------
IBASES = 1
RETURN
END