!2345678901234567890123456789012345678901234567890123456789012345678901234567890 ! Module for program beowulf module beowulf_helpers implicit none integer, parameter :: dbl = kind(1.0d0) integer, parameter :: long = selected_int_kind(15) integer, parameter :: nin = 5 integer, parameter :: nout = 6 integer, parameter :: size = 3 integer, parameter :: maxgraphs = 12 integer, parameter :: maxcuts = 9 integer, parameter :: maxmaps = 64 integer, parameter :: maxparticles = 500 end module beowulf_helpers ! Note that for many compilers, the modules have to come before the ! programs in which they are used. !2345678901234567890123456789012345678901234567890123456789012345678901234567890 !2345678901234567890123456789012345678901234567890123456789012345678901234567890 ! ! ------------------------ ! beowulf.f Version 3.1 ! ------------------------ ! ! Program for numerical integration of jet cross sections in ! electron-positron annihilation. -- D. E. Soper ! ! First code: 29 November 1992. ! Latest revision: see revision date below. ! ! The main program and subroutines that a user might want to modify ! are contained in this package, beowulf.f. In particular, a ! user may very well want to modify parameter settings in the main ! program and to change the observables calculated in the subroutine ! HROTHGAR and in the functions CALStype(nparticles,kf,index). Subroutines ! that can be modified only at extreme peril to the reliability of ! the results are in the companion package beowulfsubs.f. ! program beowulf ! use beowulf_helpers implicit none character(len=36), parameter :: & revisiondate = 'Latest revision 2 October 2003 ' ! ------------------------------------ ! Input and output units: integer :: nsets integer :: countfactor(maxgraphs,maxmaps) integer :: groupsize(maxgraphs,maxmaps) integer :: groupsizegraph(maxgraphs) integer :: groupsizetotal common /montecarlo/groupsize,groupsizegraph,groupsizetotal logical :: usegraph(maxgraphs) common /whichgraphs/ usegraph ! Global size and scale parameters: integer :: nloops1,nprops1,nverts1,cutmax1 integer :: nloops2,nprops2,nverts2,cutmax2 common /sizes/ nloops1,nprops1,nverts1,cutmax1, & nloops2,nprops2,nverts2,cutmax2 ! Color factors: real(kind=dbl) :: nc,nf,cf common /colorfactors/ nc,nf,cf ! Choice of gauge: character(len=7) :: gauge common /gaugechoice/ gauge ! What the program should do character(len=6) :: mode common /programmode/ mode ! Physics data: real(kind=dbl) :: alphasofmz,mz,externalrts common /physicsdata/ alphasofmz,mz,externalrts ! How many graphs and how many maps for each: integer :: numberofgraphs integer :: numberofmaps(maxgraphs) common /graphcounts/ numberofgraphs,numberofmaps ! Limits: real(kind=dbl) :: badnesslimit,cancellimit,thrustcut common /limits/ badnesslimit,cancellimit,thrustcut real(kind=dbl) :: showercut common /showercutinfo/ showercut real(kind=dbl) :: showerendratio common /showerend/ showerendratio logical :: dosoft common /softswitch/ dosoft ! Timing limit: real(kind=dbl) :: hourlimit real(kind=dbl) :: timelimit common /maxtime/ timelimit ! Deform parameters: real(kind=dbl) :: deformalpha,deformbeta,deformgamma common /deformscales/deformalpha,deformbeta,deformgamma ! Smear parameters: real(kind=dbl) :: smearfctr integer :: lowpwr,highpwr common /smearparms/ smearfctr,lowpwr,highpwr ! Renormaliation parameters: real(kind=dbl) :: muoverrts common /renormalize/ muoverrts ! Diagnostics on showers: logical :: showercheck common /showercheckinfo/ showercheck ! Diagnostic data instructions: logical :: report,details common /calculook/ report,details ! RENO results: real(kind=dbl) :: sumr,errorr,sumi,errori real(kind=dbl) :: sumbis,errorbis real(kind=dbl) :: sumchkr,errorchkr,sumchki,errorchki real(kind=dbl) :: fluct(maxgraphs,maxmaps) integer(kind=long) :: included,extracount,omitted integer :: nvalpt(-9:6) real(kind=dbl) :: valptmax type badpointstate integer :: jr integer :: ir(250) real(kind=dbl) :: rr(250) integer :: graphnumber integer :: mapnumber real(kind=dbl) :: k(0:3*size-1,0:3) end type badpointstate type(badpointstate) :: badpointinfo integer :: nreno real(kind=dbl) :: cputime ! Hrothgar dummy variables: real(kind=dbl) :: kf0(maxparticles,0:3) ! Seed for random number generator. integer :: seed ! Today's date: character(len=28) :: date ! Loop control variables: integer :: n,mu,graphnumber,mapnumber ! Logical variables that control aspects of the output: logical :: allgraphs,writeprograminfo,writefluct,writediagnostic ! A temporary real number: real(kind=dbl) :: temp ! A temporary integer: integer :: itemp ! Average of FLUCT variables: real(kind=dbl) :: avfluct ! alpha_s/pi real(kind=dbl)alpi real (kind=dbl), parameter :: pi = 3.141592653589793239d0 ! !----------------------------------------------------------------------- ! ! Parameters to control diagnostic reporting. report = .false. details = .false. ! Generate diagnostics on showers. showercheck = .false. ! Global size parameters: Number of loops, number of propagators ! number of vertices, max number of cut propagators. nloops1 = 2 nprops1 = 3 * nloops1 - 1 nverts1 = 2 * nloops1 cutmax1 = nloops1 + 1 nloops2 = 3 nprops2 = 3 * nloops2 - 1 nverts2 = 2 * nloops2 cutmax2 = nloops2 + 1 ! Color factors. nc = 3.0d0 nf = 5.0d0 cf = (nc**2 - 1)/2.0d0/nc ! Physics data. mz = 91.1876d0 alphasofmz = 0.118d0 externalrts = mz ! Initialize common /GRAPHCOUNTS/. call graphcountinit ! Parameters for subroutine CALCULATE for throwing away bad points. badnesslimit = 1.0d4 cancellimit = 1.0d4 ! Gradual cutoff on 1 - THRUST before showering in case of mode 'shower'. ! IF (onemthrust .LT. thrustcut) THEN ! value = onemthrust/thrustcut*value ! weight = onemthrust/thrustcut*weight ! END IF thrustcut = 0.00d0 ! Cut, in shower mode, for virtuality treated as parton splitting from ! a Born graph: qbarsq < showercut * calqsq. showercut = 1.0d0 ! Minimum value of qbarsq/rts0^2 in a secondary parton shower (ie showerII). ! If qbarsq/rts0^2 comes out less than this, the splitting is vetoed and the ! mother parton is not split. showerendratio = 3.0d-4 ! Switch for including soft gluon effects. Setting this to .false. gives ! correct NLO results, but with showering from the order alpha_s^3 graphs ! turned off and soft gluon radiation from the Born graphs turned off. dosoft = .true. ! Parameters for subroutine DEFORM. deformalpha = 0.7d0 deformbeta = 1.0d0 deformgamma = 1.0d0 ! Parmameters for function SMEAR. smearfctr = 3.0d0 lowpwr = 9 highpwr = 18 ! Renormalization parameters. muoverrts = 0.16667d0 ! Graphs to include. usegraph(1) = .true. usegraph(2) = .true. usegraph(3) = .true. usegraph(4) = .true. usegraph(5) = .true. usegraph(6) = .true. usegraph(7) = .true. usegraph(8) = .true. usegraph(9) = .true. usegraph(10) = .true. usegraph(11) = .true. usegraph(12) = .true. ! write(nout,*) & 'Please give program mode (born, nlo, hocoef, shower, showr0).' read(nin,98)mode 98 format(a6) ! ! Depending on the mode, we have to set USEGRAPH to .false. for those ! graphs not used in that mode. ! IF (mode.EQ.'born ') THEN usegraph(1) = .false. usegraph(2) = .false. usegraph(3) = .false. usegraph(4) = .false. usegraph(5) = .false. usegraph(6) = .false. usegraph(7) = .false. usegraph(8) = .false. usegraph(9) = .false. usegraph(10) = .false. ELSE IF (mode.EQ.'hocoef') THEN usegraph(11) = .false. usegraph(12) = .false. ELSE IF (mode.EQ.'nlo ') THEN continue ELSE IF (mode.EQ.'shower') THEN continue ELSE IF (mode.EQ.'showr0') THEN usegraph(1) = .false. usegraph(2) = .false. usegraph(3) = .false. usegraph(4) = .false. usegraph(5) = .false. usegraph(6) = .false. usegraph(7) = .false. usegraph(8) = .false. usegraph(9) = .false. usegraph(10) = .false. mode = 'shower' ELSE write(nout,*)'Not prepared for mode ',mode,'.' stop END IF ! write(nout,*)'Please give alpha_s/0.118' read(nin,*)temp alphasofmz = 0.118d0*temp ! IF (mode.EQ.'shower') THEN gauge = 'coulomb' ELSE write(nout,*) & 'Please give gauge choice (coulomb or feynman).' read(nin,99)gauge 99 format(a7) END IF ! ! Here we set the count factors COUNTFACTOR(GRAPHNUMBER,MAPNUMBER). ! These, multiplied by NSETS, give GROUPSIZE(GRAPHNUMBER,MAPNUMBER). ! IF (mode.EQ.'shower') THEN call getcountsshwr(countfactor) ELSE IF (gauge.EQ.'feynman') THEN call getcountsfeyn(countfactor) ELSE IF (gauge.EQ.'coulomb') THEN call getcountscoul(countfactor) ELSE write(*,*)'Not programmed for gauge choice ', gauge STOP END IF ! ! Call Hrothgar to tell him to get ready. ! Here kf0 are just dummy variables for Hrothgar. ! DO n = 1,maxparticles DO mu = 0,3 kf0(n,mu) = 0.0d0 END DO END DO call hrothgar(1,kf0,1.0d0,1,'startcalc ') !--- write(nout,*)'Please give the approximate cpu time limit (hours).' read(nin,*) hourlimit timelimit = hourlimit * 3600 IF (hourlimit.LT.1.0d0) THEN nsets = 1 + nint(10.0d0*hourlimit) ELSE nsets = 11 + nint(hourlimit) END IF !--- ! To change the default value calculated above, use this. ! ! WRITE(NOUT,*)'Please give number of sets of points in each group' ! READ(NIN,*) NSETS !--- groupsizetotal = 0 DO graphnumber = 1,maxgraphs groupsizegraph(graphnumber) = 0 IF (usegraph(graphnumber)) THEN DO mapnumber = 1,numberofmaps(graphnumber) itemp = nsets * countfactor(graphnumber,mapnumber) groupsize(graphnumber,mapnumber) = itemp groupsizegraph(graphnumber) = groupsizegraph(graphnumber)+itemp groupsizetotal = groupsizetotal + itemp END DO END IF END DO !-- ! If you want to extract parts of the results with different color ! and number-of-flavor factors, you may want to be able to ! adjust the number of colors and flavors. But note that the ! function KN(T) that contains the "standard" results ! for the thrust distribution is for three colors and five flavors. ! ! WRITE(NOUT,*)'Please give the numbers of colors and flavors.' ! READ(NIN,*)NC,NF !-- ! This overrides the default value MUOVERRTS = 0.3 that was set above. ! write(nout,*) & 'Please give ratio of the renormalization scale to sqrt(s).' read(nin,*) muoverrts ! write(nout,*)'Please give a seed (0.'/) 007 format('n =',f6.3) END subroutine hrothgar ! !2345678901234567890123456789012345678901234567890123456789012345678901234567890 !2345678901234567890123456789012345678901234567890123456789012345678901234567890 ! function calsthrust(t,n) ! use beowulf_helpers implicit none ! In: integer :: n ! bin number real(kind=dbl) :: t ! value of thrust ! Out: real(kind=dbl) :: calsthrust ! ! The thrust distribution in bins. ! The function THRUSTDIST(T) gives an approximation to the perturbative ! expansion of the thrust distribution (1/sigma_0) * (1-T) d sigma/dT. ! The result depends on Mode. ! ! 9 March 1998 ! 5 August 1999 ! 3 July 2002 ! real(kind=dbl) :: t1,t2 real(kind=dbl) :: rho,thrustdist real(kind=dbl), parameter :: deltathrust = 0.03d0 real(kind=dbl), parameter :: minthrust = 0.68d0 ! calsthrust = 0.0d0 ! t1 = minthrust + (n-1) * deltathrust t2 = minthrust + (n+1) * deltathrust IF ( (t.GT.t1).AND.(t.LT.t2) ) THEN rho = 15.0d0/(16.0d0*deltathrust**5) * ((t-t1)*(t2-t))**2 calsthrust = (1.0d0 - t)*rho/thrustdist(t) END IF ! RETURN END function calsthrust ! !2345678901234567890123456789012345678901234567890123456789012345678901234567890 !2345678901234567890123456789012345678901234567890123456789012345678901234567890 ! function calstmoments(t,n) ! use beowulf_helpers implicit none ! In: real(kind=dbl) :: t ! value of thrust integer :: n ! moment number ! Out: real(kind=dbl) :: calstmoments ! ! Moments of 1 - thrust. ! 20 September 1999 ! 3 July 2002 ! real(kind=dbl) :: power integer :: i real(kind=dbl), parameter :: tiny = 1.0d-12 ! calstmoments = 0.0d0 ! power = 1.0d0 + 0.5d0*n IF ( (1.0d0 - t) .GT. tiny ) THEN calstmoments = (1.0d0 - t)**power ELSE calstmoments = 0.0d0 END IF ! RETURN END function calstmoments ! !2345678901234567890123456789012345678901234567890123456789012345678901234567890 ! function thrust(kf,nparticles) ! kf gives momenta for nparticles final state particles. ! Then thrust is the thrust of this final state. use beowulf_helpers implicit none real(kind=dbl) :: thrust real(kind=dbl) :: kf(maxparticles,0:3) integer :: nparticles ! ! One can increase imax for a more accurate answer at the expense of ! more time. ! For imax = 1, there are 3 starting thrust axes used. ! For imax = 2, there are 9 starting thrust axes used. ! For imax = 3, there are 20 starting thrust axes used. ! Approximately, there are somewhat fewer than 3*(imax)^2 starting ! thrust axes used. ! Here are some results for the largest error after 100 events. ! These are without the auxiliary trial axes choices. ! imax = 1, ~ 0.80, maxerror = 0.0002 ! imax = 1, ~ 0.65, maxerror = 0.004 ! imax = 1, ~ 0.55, maxerror = 0.02 ! imax = 3, ~ 0.55, maxerror = 0.003 ! imax = 10, ~ 0.55, maxerror = 0.0002 ! later investigations with perturbative final states suggest that ! imax = 2 (with the auxiliary choices) gets the thrust right to 1E-3. ! ! 3 July 2002 ! real(kind=dbl) :: rts integer, parameter :: imax = 2 integer :: jmax integer :: i,j,n,m,mu real(kind=dbl), parameter :: tiny = 1.0d-3 real (kind=dbl), parameter :: pi = 3.141592653589793239d0 real(kind=dbl) :: sintheta,costheta,theta,phi real(kind=dbl), dimension(3) :: vin,vout real(kind=dbl) :: temp real(kind=dbl) :: thrustmod,thrusttest ! thrust = 0.0d0 ! Calculate rts. ! rts = 0.0d0 DO n = 1,nparticles rts = rts + kf(n,0) END DO ! ! We will loop over choices for the trial thrust axis. ! 1 - 0.391827 is (pi/2)*arccos(1/sqrt(3)), which is the angle ! from the center of one face of a regular solid with six vertices ! to one of the adjacent vertices. This optimizes the choice for ! imax = 1. ! DO i = 1,imax theta = (i - 0.391827d0)*0.5d0*pi/imax sintheta = sin(theta) costheta = cos(theta) jmax = nint(3.3d0*sintheta*imax) DO j = 1,jmax phi = (j - 0.5d0)*2.0*pi/jmax ! vin(1) = sintheta*cos(phi) vin(2) = sintheta*sin(phi) vin(3) = costheta ! ! Adjust thrust axis ! DO n = 1,100 call thrustaxis(kf,nparticles,vin,vout,thrustmod) temp = 0.0d0 DO mu = 1,3 temp = temp + (vin(mu) - vout(mu))**2 END DO IF (temp < tiny) EXIT vin = vout END DO IF (n > 30) print *,'In function thrust, n tries was ',n ! ! Now we have the thrust axis. Find trial value of thrust ! thrusttest = 2.0d0*thrustmod/rts ! ! If this is the biggest value so far, we save it ! IF (thrusttest > thrust) thrust = thrusttest ! END DO END DO ! !-- Auxilliary choices in the case of small thrust -- ! IF (thrust < 0.67d0) THEN ! ! We will loop over more choices for the trial thrust axis. ! DO i = 1,3*imax theta = (i - 0.391827d0)*0.5d0*pi/3/imax sintheta = sin(theta) costheta = cos(theta) jmax = nint(3.3d0*sintheta*3*imax) DO j = 1,jmax phi = (j - 0.5d0)*2.0*pi/jmax ! vin(1) = sintheta*cos(phi) vin(2) = sintheta*sin(phi) vin(3) = costheta ! ! Adjust thrust axis ! DO n = 1,100 call thrustaxis(kf,nparticles,vin,vout,thrustmod) temp = 0.0d0 DO mu = 1,3 temp = temp + (vin(mu) - vout(mu))**2 END DO IF (temp < tiny) EXIT vin = vout END DO IF (n > 30) print *,'In function thrust, n was ',n ! ! Now we have the thrust axis. Find trial value of thrust ! thrusttest = 2.0d0*thrustmod/rts ! ! If this is the biggest value so far, we save it ! IF (thrusttest > thrust) thrust = thrusttest ! END DO END DO ! END IF ! END function thrust ! !2345678901234567890123456789012345678901234567890123456789012345678901234567890 ! subroutine thrustaxis(kf,nparticles,vin,vout,thrustmod) ! use beowulf_helpers implicit none real(kind=dbl) :: kf(maxparticles,0:3) integer :: nparticles real(kind=dbl), dimension(3) :: vin,vout real(kind=dbl) :: thrustmod ! thrust*rts/2 ! ! kf gives momenta for nparticles final state particles. ! vin is the trial thrust axis. ! Then vout is the new thrust axis. ! Also returns thrustmod, the value of thrust*rts/2 if this ! is the final thrust axis. ! ! 3 July 2002 ! real(kind=dbl) :: temp integer n,mu ! thrustmod = 0.0d0 DO mu = 1,3 vout(mu) = 0.0d0 END DO DO n = 1, nparticles temp = 0.0d0 DO mu = 1,3 temp = temp + kf(n,mu) * vin(mu) END DO IF (temp>0.0d0) THEN DO mu = 1,3 vout(mu) = vout(mu) + kf(n,mu) END DO thrustmod = thrustmod + temp END IF END DO temp = 0.0d0 DO mu = 1,3 temp = temp + vout(mu)**2 END DO temp = sqrt(temp) DO mu = 1,3 vout(mu) = vout(mu)/temp END DO ! END subroutine thrustaxis ! !2345678901234567890123456789012345678901234567890123456789012345678901234567890 ! function thrustdist(t) ! use beowulf_helpers implicit none ! In: real(kind=dbl) :: t ! Out: real(kind=dbl) :: thrustdist ! ! Approximation to the perturbative expansion of the thrust distribution ! (1/sigma_0) * (1-T) d sigma/dT. The result depends on Mode. Defining ! f(T) = (1/sigma_0) * (1-T) d sigma/dT ! = (alpha_s/Pi) KN0(T) + (alpha_s/Pi)^2 KN(T) + ... ! we calculate for mode = born, ! THRUSTDIST(T) = (alpha_s/Pi) KN0(T), ! for Mode = nlo, ! THRUSTDIST(T) = (alpha_s/Pi) KN0(T) + (alpha_s/Pi)^2 KN(T), ! for Mode = hocoef ! THRUSTDIST(T) = KN(T). ! ! 12 February 2002 ! ! What the program should do character(len=6) :: mode common /programmode/ mode ! Physics data real(kind=dbl) :: alphasofmz,mz,externalrts common /physicsdata/ alphasofmz,mz,externalrts real(kind=dbl) :: muoverrts common /renormalize/ muoverrts ! real(kind=dbl) :: alpi,kn0,kn ! IF (mode.EQ.'born ') THEN thrustdist = alpi(muoverrts*externalrts)*kn0(t) ELSE IF (mode.EQ.'nlo ') THEN thrustdist = alpi(muoverrts*externalrts)*kn0(t) & + alpi(muoverrts*externalrts)**2 * kn(t) ELSE IF (mode.EQ.'hocoef') THEN thrustdist = kn(t) ELSE IF (mode.EQ.'shower') THEN thrustdist = alpi(muoverrts*externalrts)*kn0(t) & + alpi(muoverrts*externalrts)**2 * kn(t) ELSE write(nout,*)'thrustdist misses this mode. ',mode stop END IF RETURN END function thrustdist ! !2345678901234567890123456789012345678901234567890123456789012345678901234567890 ! function kn0(t) ! use beowulf_helpers implicit none ! In: real(kind=dbl) :: t ! Out: real(kind=dbl) :: kn0 ! ! The coefficient of (alpha_s/Pi)^1 in the thrust distribution, ! (1/sigma_0) * (1-T) d sigma/dT. ! The formula is copied from Ellis, Stirling and Webber eq. (3.44). ! Note that this function is only for NC = 3, NF = 5. ! ! 11 February 2002 ! kn0 = 2.0d0 * (3.0d0 * t**2 - 3.0d0 * t + 2.0d0) /t kn0 = kn0 * log( (2.0d0 * t - 1.0d0)/(1.0d0 - t) ) kn0 = kn0 - 3.0d0 * (3.0d0 * t - 2.0d0) * (2.0d0 - t) kn0 = kn0 * 2.0d0/3.0d0 ! RETURN END function kn0 ! !2345678901234567890123456789012345678901234567890123456789012345678901234567890 !2345678901234567890123456789012345678901234567890123456789012345678901234567890 ! function kn(t) ! use beowulf_helpers implicit none ! In: real(kind=dbl) :: t ! Out: real(kind=dbl) :: kn ! ! The coefficient of (alpha_s/Pi)^2 in the thrust distribution as ! given by Kunszt and Nason. ! Note that this function is only for NC = 3, NF = 5, ! and is for (1/sigma_0) * (1-T) d sigma/dT. ! ! 9 April 1998 ! real(kind=dbl) :: muoverrts common /renormalize/ muoverrts real(kind=dbl), parameter :: nf = 5.0d0 ! real(kind=dbl) :: l,nonsing,sing,lo l = log(1.0d0/(1.0d0 - t)) ! nonsing = -16100.550195d0 * (0.46789210556 + t) & * (1.1184765748d0 - 2.1058049743d0 * t + t**2) & * (0.4925129711d0 - 1.3620871313d0 * t + t**2) ! sing = -14.222222222d0 * l * (-5.098072232d0 + l ) & *( 0.691822232d0 + l) ! lo = 2.0d0 * (3.0d0 * t**2 - 3.0d0 * t + 2.0d0) /t lo = lo * log( (2.0d0 * t - 1.0d0)/(1.0d0 - t) ) lo = lo - 3.0d0 * (3.0d0 * t - 2.0d0) * (2.0d0 - t) lo = lo * 4.0d0/3.0d0 ! kn = sing + nonsing & + (11.0d0 - 2.0d0*nf/3.0d0)*log(muoverrts)*lo ! ! We divide by 4 because KN report the coefficient of (alpha_s/2Pi)^2 ! while I want the coefficient of (alpha_s/Pi)^2. ! kn = kn/4.0d0 ! RETURN END function kn ! !2345678901234567890123456789012345678901234567890123456789012345678901234567890 !2345678901234567890123456789012345678901234567890123456789012345678901234567890 ! function cals0(nparticles,kf) ! use beowulf_helpers implicit none ! In: integer :: nparticles real(kind=dbl) :: kf(maxparticles,0:3) ! Out: real(kind=dbl) :: cals0 ! ! Average value of (1 - thrust)**2. ! ! 10 March 1998 ! 20 August 1999 ! real(kind=dbl) :: badnesslimit,cancellimit,thrustcut common /limits/ badnesslimit,cancellimit,thrustcut ! real(kind=dbl) :: rts real(kind=dbl) :: thrust,oneminusthrust integer :: i ! rts = 0.0d0 DO i = 1,nparticles rts = rts + kf(i,0) END DO ! oneminusthrust = 1.0d0 - thrust(kf,nparticles) ! cals0 = oneminusthrust**2 ! RETURN END function cals0 ! !2345678901234567890123456789012345678901234567890123456789012345678901234567890 !2345678901234567890123456789012345678901234567890123456789012345678901234567890 ! subroutine daytime(date) ! use beowulf_helpers implicit none character(len=28) :: date ! ! Returns DATE = today's date and time as a character string. ! This version for Sun computers. Replace if necessary, for ! instance with ! date = 'today' ! character*10 thedate,thetime character(len=30) :: dt ! CALL FDATE(DT) ! DATE = DT(1:28) call date_and_time(thedate,thetime) date = thedate//' '//thetime RETURN END subroutine daytime ! !2345678901234567890123456789012345678901234567890123456789012345678901234567890 !2345678901234567890123456789012345678901234567890123456789012345678901234567890 ! subroutine timing(deltatime) ! use beowulf_helpers implicit none real(kind=dbl) :: deltatime ! ! You call TIMING multiple times. Each time that you call it, ! DELTATIME gets set to the elapsed time since the previous time you ! called it. This version for Sun computers. Replace if necessary. ! ! REAL*4 DTIME,TIMEARRAY(2) ! DELTATIME = DTIME(TIMEARRAY) ! real :: t1,t2 data t1 /0.0/ call cpu_time(t2) deltatime = t2 - t1 t1 = t2 IF (deltatime .LT. 0.000d0) THEN write(nout,*)'deltatime =',deltatime,' replaced by 0.0d0.' deltatime = 0.0d0 END IF RETURN END subroutine timing ! !2345678901234567890123456789012345678901234567890123456789012345678901234567890 !2345678901234567890123456789012345678901234567890123456789012345678901234567890 ! subroutine getcountscoul(countfactor) ! use beowulf_helpers implicit none ! Out: integer :: countfactor(maxgraphs,maxmaps) ! ! This subroutine contains information on how many points to devote ! to each of the ten graphs and, within each graph, how many to ! devote to each of the maps from the random numbers x to the loop ! momenta. These are for Coulomb gauge. ! ! Latest revision 15 February 2002. ! integer :: graphnumber,mapnumber ! DO graphnumber = 1,maxgraphs DO mapnumber = 1,maxmaps countfactor(graphnumber,mapnumber) = 20 END DO END DO ! !-------- countfactor( 1, 1) = 13 countfactor( 1, 2) = 39 countfactor( 2, 1) = 13 countfactor( 2, 2) = 18 countfactor( 3, 1) = 22 countfactor( 3, 2) = 12 countfactor( 3, 3) = 13 countfactor( 3, 4) = 15 countfactor( 3, 5) = 11 countfactor( 3, 6) = 23 countfactor( 4, 1) = 2 countfactor( 4, 2) = 2 countfactor( 4, 3) = 10 countfactor( 4, 4) = 9 countfactor( 5, 1) = 10 countfactor( 5, 2) = 3 countfactor( 5, 3) = 7 countfactor( 5, 4) = 4 countfactor( 5, 5) = 10 countfactor( 5, 6) = 5 countfactor( 6, 1) = 9 countfactor( 6, 2) = 4 countfactor( 6, 3) = 8 countfactor( 6, 4) = 3 countfactor( 6, 5) = 6 countfactor( 6, 6) = 8 countfactor( 7, 1) = 9 countfactor( 7, 2) = 5 countfactor( 7, 3) = 15 countfactor( 7, 4) = 3 countfactor( 7, 5) = 9 countfactor( 7, 6) = 1 countfactor( 7, 7) = 42 countfactor( 7, 8) = 12 countfactor( 7, 9) = 5 countfactor( 7,10) = 9 countfactor( 7,11) = 3 countfactor( 7,12) = 18 countfactor( 7,13) = 2 countfactor( 7,14) = 5 countfactor( 7,15) = 2 countfactor( 7,16) = 17 countfactor( 7,17) = 9 countfactor( 7,18) = 11 countfactor( 8, 1) = 1 countfactor( 8, 2) = 1 countfactor( 8, 3) = 3 countfactor( 8, 4) = 1 countfactor( 8, 5) = 1 countfactor( 8, 6) = 3 countfactor( 8, 7) = 2 countfactor( 8, 8) = 3 countfactor( 8, 9) = 3 countfactor( 8,10) = 2 countfactor( 8,11) = 1 countfactor( 8,12) = 3 countfactor( 9, 1) = 5 countfactor( 9, 2) = 8 countfactor( 9, 3) = 3 countfactor( 9, 4) = 5 countfactor(10, 1) = 1 countfactor(10, 2) = 1 countfactor(10, 3) = 1 countfactor(10, 4) = 1 countfactor(10, 5) = 1 countfactor(10, 6) = 1 countfactor(10, 7) = 1 countfactor(10, 8) = 1 countfactor(10, 9) = 1 countfactor(10,10) = 1 countfactor(10,11) = 1 countfactor(10,12) = 1 countfactor(10,13) = 1 countfactor(10,14) = 1 countfactor(10,15) = 1 countfactor(10,16) = 1 countfactor(10,17) = 1 countfactor(10,18) = 1 countfactor(10,19) = 1 countfactor(10,20) = 1 countfactor(10,21) = 1 countfactor(10,22) = 1 countfactor(10,23) = 1 countfactor(10,24) = 1 countfactor(11, 1) = 101 countfactor(12, 1) = 36 countfactor(12, 2) = 25 !-------- ! RETURN END subroutine getcountscoul ! !2345678901234567890123456789012345678901234567890123456789012345678901234567890 !2345678901234567890123456789012345678901234567890123456789012345678901234567890 ! subroutine getcountsfeyn(countfactor) ! use beowulf_helpers implicit none ! Out: integer :: countfactor(maxgraphs,maxmaps) ! ! This subroutine contains information on how many points to devote ! to each of the ten graphs and, within each graph, how many to ! devote to each of the maps from the random numbers x to the loop ! momenta. These are for Feynman gauge. ! ! Latest revision 8 December 2002. ! integer :: graphnumber,mapnumber ! DO graphnumber = 1,maxgraphs DO mapnumber = 1,maxmaps countfactor(graphnumber,mapnumber) = 20 END DO END DO ! !-------- countfactor( 1, 1) = 7 countfactor( 1, 2) = 10 countfactor( 2, 1) = 2 countfactor( 2, 2) = 2 countfactor( 3, 1) = 13 countfactor( 3, 2) = 5 countfactor( 3, 3) = 7 countfactor( 3, 4) = 6 countfactor( 3, 5) = 7 countfactor( 3, 6) = 11 countfactor( 4, 1) = 4 countfactor( 4, 2) = 2 countfactor( 4, 3) = 3 countfactor( 4, 4) = 3 countfactor( 5, 1) = 5 countfactor( 5, 2) = 5 countfactor( 5, 3) = 9 countfactor( 5, 4) = 2 countfactor( 5, 5) = 4 countfactor( 5, 6) = 2 countfactor( 6, 1) = 5 countfactor( 6, 2) = 2 countfactor( 6, 3) = 4 countfactor( 6, 4) = 3 countfactor( 6, 5) = 7 countfactor( 6, 6) = 7 countfactor( 7, 1) = 17 countfactor( 7, 2) = 7 countfactor( 7, 3) = 21 countfactor( 7, 4) = 6 countfactor( 7, 5) = 11 countfactor( 7, 6) = 3 countfactor( 7, 7) = 30 countfactor( 7, 8) = 15 countfactor( 7, 9) = 11 countfactor( 7,10) = 17 countfactor( 7,11) = 11 countfactor( 7,12) = 21 countfactor( 7,13) = 4 countfactor( 7,14) = 11 countfactor( 7,15) = 3 countfactor( 7,16) = 47 countfactor( 7,17) = 29 countfactor( 7,18) = 9 countfactor( 8, 1) = 5 countfactor( 8, 2) = 5 countfactor( 8, 3) = 6 countfactor( 8, 4) = 2 countfactor( 8, 5) = 8 countfactor( 8, 6) = 5 countfactor( 8, 7) = 3 countfactor( 8, 8) = 5 countfactor( 8, 9) = 6 countfactor( 8,10) = 3 countfactor( 8,11) = 10 countfactor( 8,12) = 6 countfactor( 9, 1) = 1 countfactor( 9, 2) = 1 countfactor( 9, 3) = 1 countfactor( 9, 4) = 1 countfactor(10, 1) = 1 countfactor(10, 2) = 1 countfactor(10, 3) = 1 countfactor(10, 4) = 1 countfactor(10, 5) = 1 countfactor(10, 6) = 4 countfactor(10, 7) = 1 countfactor(10, 8) = 1 countfactor(10, 9) = 1 countfactor(10,10) = 1 countfactor(10,11) = 1 countfactor(10,12) = 1 countfactor(10,13) = 1 countfactor(10,14) = 1 countfactor(10,15) = 1 countfactor(10,16) = 2 countfactor(10,17) = 1 countfactor(10,18) = 4 countfactor(10,19) = 1 countfactor(10,20) = 1 countfactor(10,21) = 1 countfactor(10,22) = 1 countfactor(10,23) = 1 countfactor(10,24) = 2 countfactor(11, 1) = 47 countfactor(12, 1) = 105 countfactor(12, 2) = 77 !-------- ! RETURN END subroutine getcountsfeyn ! !2345678901234567890123456789012345678901234567890123456789012345678901234567890 !2345678901234567890123456789012345678901234567890123456789012345678901234567890 ! subroutine getcountsshwr(countfactor) ! use beowulf_helpers implicit none ! Out: integer :: countfactor(maxgraphs,maxmaps) ! ! This subroutine contains information on how many points to devote ! to each of the ten graphs and, within each graph, how many to ! devote to each of the maps from the random numbers x to the loop ! momenta. These are for Coulomb gauge with showers. ! ! Latest revision 6 April 2002. ! integer :: graphnumber,mapnumber ! DO graphnumber = 1,maxgraphs DO mapnumber = 1,maxmaps countfactor(graphnumber,mapnumber) = 20 END DO END DO ! !-------- countfactor( 1, 1) = 3 countfactor( 1, 2) = 3 countfactor( 2, 1) = 7 countfactor( 2, 2) = 4 countfactor( 3, 1) = 3 countfactor( 3, 2) = 1 countfactor( 3, 3) = 3 countfactor( 3, 4) = 1 countfactor( 3, 5) = 1 countfactor( 3, 6) = 23 countfactor( 4, 1) = 1 countfactor( 4, 2) = 1 countfactor( 4, 3) = 1 countfactor( 4, 4) = 1 countfactor( 5, 1) = 8 countfactor( 5, 2) = 1 countfactor( 5, 3) = 4 countfactor( 5, 4) = 1 countfactor( 5, 5) = 2 countfactor( 5, 6) = 1 countfactor( 6, 1) = 4 countfactor( 6, 2) = 2 countfactor( 6, 3) = 1 countfactor( 6, 4) = 1 countfactor( 6, 5) = 4 countfactor( 6, 6) = 5 countfactor( 7, 1) = 2 countfactor( 7, 2) = 1 countfactor( 7, 3) = 9 countfactor( 7, 4) = 1 countfactor( 7, 5) = 1 countfactor( 7, 6) = 1 countfactor( 7, 7) = 26 countfactor( 7, 8) = 1 countfactor( 7, 9) = 1 countfactor( 7,10) = 2 countfactor( 7,11) = 1 countfactor( 7,12) = 5 countfactor( 7,13) = 1 countfactor( 7,14) = 1 countfactor( 7,15) = 1 countfactor( 7,16) = 3 countfactor( 7,17) = 2 countfactor( 7,18) = 2 countfactor( 8, 1) = 1 countfactor( 8, 2) = 1 countfactor( 8, 3) = 1 countfactor( 8, 4) = 1 countfactor( 8, 5) = 1 countfactor( 8, 6) = 1 countfactor( 8, 7) = 1 countfactor( 8, 8) = 1 countfactor( 8, 9) = 1 countfactor( 8,10) = 1 countfactor( 8,11) = 1 countfactor( 8,12) = 1 countfactor( 9, 1) = 1 countfactor( 9, 2) = 1 countfactor( 9, 3) = 1 countfactor( 9, 4) = 1 countfactor(10, 1) = 1 countfactor(10, 2) = 1 countfactor(10, 3) = 1 countfactor(10, 4) = 1 countfactor(10, 5) = 1 countfactor(10, 6) = 1 countfactor(10, 7) = 1 countfactor(10, 8) = 1 countfactor(10, 9) = 1 countfactor(10,10) = 1 countfactor(10,11) = 1 countfactor(10,12) = 1 countfactor(10,13) = 1 countfactor(10,14) = 1 countfactor(10,15) = 1 countfactor(10,16) = 1 countfactor(10,17) = 1 countfactor(10,18) = 1 countfactor(10,19) = 1 countfactor(10,20) = 1 countfactor(10,21) = 1 countfactor(10,22) = 1 countfactor(10,23) = 1 countfactor(10,24) = 1 countfactor(11, 1) = 77 countfactor(12, 1) = 4 countfactor(12, 2) = 39 !-------- ! RETURN END subroutine getcountsshwr ! !2345678901234567890123456789012345678901234567890123456789012345678901234567890 !2345678901234567890123456789012345678901234567890123456789012345678901234567890