~ubuntu-branches/ubuntu/saucy/nwchem/saucy

« back to all changes in this revision

Viewing changes to src/smd/smd-9-10-08/tool_randm.f

  • Committer: Package Import Robot
  • Author(s): Michael Banck, Michael Banck, Daniel Leidert
  • Date: 2012-02-09 20:02:41 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120209200241-jgk03qfsphal4ug2
Tags: 6.1-1
* New upstream release.

[ Michael Banck ]
* debian/patches/02_makefile_flags.patch: Updated.
* debian/patches/02_makefile_flags.patch: Use internal blas and lapack code.
* debian/patches/02_makefile_flags.patch: Define GCC4 for LINUX and LINUX64
  (Closes: #632611 and LP: #791308).
* debian/control (Build-Depends): Added openssh-client.
* debian/rules (USE_SCALAPACK, SCALAPACK): Removed variables (Closes:
  #654658).
* debian/rules (LIBDIR, USE_MPIF4, ARMCI_NETWORK): New variables.
* debian/TODO: New file.
* debian/control (Build-Depends): Removed libblas-dev, liblapack-dev and
  libscalapack-mpi-dev.
* debian/patches/04_show_testsuite_diff_output.patch: New patch, shows the
  diff output for failed tests.
* debian/patches/series: Adjusted.
* debian/testsuite: Optionally run all tests if "all" is passed as option.
* debian/rules: Run debian/testsuite with "all" if DEB_BUILD_OPTIONS
  contains "checkall".

[ Daniel Leidert ]
* debian/control: Used wrap-and-sort. Added Vcs-Svn and Vcs-Browser fields.
  (Priority): Moved to extra according to policy section 2.5.
  (Standards-Version): Bumped to 3.9.2.
  (Description): Fixed a typo.
* debian/watch: Added.
* debian/patches/03_hurd-i386_define_path_max.patch: Added.
  - Define MAX_PATH if not defines to fix FTBFS on hurd.
* debian/patches/series: Adjusted.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
c
2
 
c $Id: tool_randm.f,v 1.1 2008-10-01 22:32:32 marat Exp $
3
 
c
4
 
 
5
 
      SUBROUTINE tool_randm(iseed,x)
6
 
 
7
 
      implicit none
8
 
 
9
 
      integer i,iseed,itoz,itozz,mz,mult
10
 
 
11
 
      real*8 x,add,dimax,ddimax
12
 
c     real*8 rand
13
 
 
14
 
      logical newjob
15
 
 
16
 
      dimension mz(250)
17
 
 
18
 
      save newjob,itoz,dimax,ddimax
19
 
 
20
 
      data newjob/.true./
21
 
 
22
 
*     **** external functions ****
23
 
      real*8   util_random
24
 
      external util_random
25
 
 
26
 
      if(newjob)then
27
 
       if(mod(iseed,2).eq.0)iseed=iseed+1
28
 
       mult=65539
29
 
       add=2147483648.0d00
30
 
       dimax=1.0d00/add
31
 
       ddimax=0.50d00*dimax
32
 
       do i=1,250
33
 
        x=util_random(iseed)
34
 
        mz(i)=x*iseed
35
 
       enddo
36
 
       itoz=1
37
 
       newjob=.false.
38
 
      else
39
 
       itoz=itoz+1
40
 
       if(itoz.gt.250)itoz=itoz-250
41
 
       itozz=itoz+103
42
 
       if(itozz.gt.250)itozz=itozz-250
43
 
       mz(itoz)=ieor(mz(itoz),mz(itozz))
44
 
       x=mz(itoz)*dimax+ddimax
45
 
       x=2.0d00*x
46
 
      endif
47
 
 
48
 
      return
49
 
 
50
 
      END