~ubuntu-branches/ubuntu/trusty/nwchem/trusty-proposed

« back to all changes in this revision

Viewing changes to src/tools/ga-5-1/global/testing/ngatest_src/ndim_NGA_PUT.src

  • Committer: Package Import Robot
  • Author(s): Michael Banck, Daniel Leidert, Andreas Tille, Michael Banck
  • Date: 2013-07-04 12:14:55 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20130704121455-5tvsx2qabor3nrui
Tags: 6.3-1
* New upstream release.
* Fixes anisotropic properties (Closes: #696361).
* New features include:
  + Multi-reference coupled cluster (MRCC) approaches
  + Hybrid DFT calculations with short-range HF 
  + New density-functionals including Minnesota (M08, M11) and HSE hybrid
    functionals
  + X-ray absorption spectroscopy (XAS) with TDDFT
  + Analytical gradients for the COSMO solvation model
  + Transition densities from TDDFT 
  + DFT+U and Electron-Transfer (ET) methods for plane wave calculations
  + Exploitation of space group symmetry in plane wave geometry optimizations
  + Local density of states (LDOS) collective variable added to Metadynamics
  + Various new XC functionals added for plane wave calculations, including
    hybrid and range-corrected ones
  + Electric field gradients with relativistic corrections 
  + Nudged Elastic Band optimization method
  + Updated basis sets and ECPs 

[ Daniel Leidert ]
* debian/watch: Fixed.

[ Andreas Tille ]
* debian/upstream: References

[ Michael Banck ]
* debian/upstream (Name): New field.
* debian/patches/02_makefile_flags.patch: Refreshed.
* debian/patches/06_statfs_kfreebsd.patch: Likewise.
* debian/patches/07_ga_target_force_linux.patch: Likewise.
* debian/patches/05_avoid_inline_assembler.patch: Removed, no longer needed.
* debian/patches/09_backported_6.1.1_fixes.patch: Likewise.
* debian/control (Build-Depends): Added gfortran-4.7 and gcc-4.7.
* debian/patches/10_force_gcc-4.7.patch: New patch, explicitly sets
  gfortran-4.7 and gcc-4.7, fixes test suite hang with gcc-4.8 (Closes:
  #701328, #713262).
* debian/testsuite: Added tests for COSMO analytical gradients and MRCC.
* debian/rules (MRCC_METHODS): New variable, required to enable MRCC methods.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
      subroutine m4_func_NGA_PUT(m4_test_type, m4_ndim)
2
 
      implicit none
3
 
#include "mafdecls.fh"
4
 
#include "global.fh"
5
 
c     
6
 
      integer n,m
7
 
      integer ndim
8
 
      parameter (n = m4_n)
9
 
      parameter (m = (m4_n**m4_ndim)/100)
10
 
      parameter (ndim = m4_ndim)
11
 
      m4_data_type a(substr(m4_array, 1, eval(m4_ndim*2-1)))
12
 
      m4_data_type b(substr(m4_array, 1, eval(m4_ndim*2-1)))
13
 
      integer lo(ndim),hi(ndim),dims(ndim),ld(ndim)
14
 
      integer g_a
15
 
      integer chunk(ndim)
16
 
      integer i, total, loop
17
 
      integer lop(ndim),hip(ndim)
18
 
      integer elems, count_elems
19
 
      integer nproc, me
20
 
      integer proc
21
 
      logical status
22
 
c     
23
 
      nproc = ga_nnodes()
24
 
      me    = ga_nodeid()
25
 
c     
26
 
c---------------------- initialize the GA -----------------------
27
 
c     initialize the chunk, dims, ld, and calculate the number 
28
 
c     of elements
29
 
      total=1
30
 
      do i = 1,ndim
31
 
         chunk(i) = 0
32
 
         dims(i) = n
33
 
         ld(i) = n
34
 
         total = total * dims(i)
35
 
      enddo
36
 
c
37
 
c***  Create global arrays
38
 
      if (.not. nga_create(m4_MT, ndim, dims, 'a', chunk, g_a))
39
 
     $     call ga_error(' ga_create failed ',1)
40
 
c     
41
 
      call ga_sync()
42
 
c
43
 
c------------------------------- NGA_PUT ----------------------------
44
 
      m4_print_info(nga_put)
45
 
c
46
 
      proc =  nproc-1 -me       ! access other process memory 
47
 
      call nga_distribution(g_a, proc, lo,hi)
48
 
      elems = count_elems(lo,hi,ndim)
49
 
      call m4_util_init_array(m4_test_type)(a,total)
50
 
c
51
 
      call ga_sync()
52
 
      if(elems.gt.0) then
53
 
         call nga_put(g_a,lo,hi,
54
 
     $        a(substr(m4_lo_all, 1, eval(m4_ndim*6-1))),ld)
55
 
         do loop = 1, MAXLOOP 
56
 
            call random_range(lo,hi,lop,hip,ndim)
57
 
            if(me.eq.0 .and. Mod(loop,10).eq.0)then
58
 
               call print_range(loop,lop,hip,ndim)
59
 
            endif
60
 
            call nga_put(g_a,lop,hip,
61
 
     $           a(substr(m4_lop_all, 1, eval(m4_ndim*7-1))),ld)
62
 
         enddo
63
 
         
64
 
         call nga_get(g_a,lo,hi,
65
 
     $        b(substr(m4_lo_all, 1, eval(m4_ndim*6-1))),ld)
66
 
c
67
 
         call m4_util_compare_patches(m4_test_type)(0d0,total,
68
 
     $        a,lo,hi,ndim,dims,total,b,lo,hi,ndim,dims)
69
 
      else
70
 
c     so that the random_range can be call the same number of times
71
 
c     in other words, drand can generate the same number for the
72
 
c     collective operations
73
 
         do loop=1, MAXLOOP
74
 
            call random_range(lo,hi,lop,hip,ndim)
75
 
         enddo
76
 
      endif
77
 
c
78
 
      call ga_sync()
79
 
      if(me.eq.0)then
80
 
         print *, 'OK'
81
 
         print *, ' '
82
 
         call ffflush(6)
83
 
      endif
84
 
c---------------------------
85
 
c     
86
 
      status= ga_destroy(g_a)
87
 
      end