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

« back to all changes in this revision

Viewing changes to src/tools/ga-5-2/global/testing/ngatest_src/ndim_NGA_GET.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_GET(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
      m4_data_type val
 
19
      integer nproc, me
 
20
      logical status
 
21
c     
 
22
      nproc = ga_nnodes()
 
23
      me    = ga_nodeid()
 
24
c     
 
25
c---------------------- initialize the GA -----------------------
 
26
c     initialize the chunk, dims, ld, and calculate the number 
 
27
c     of elements
 
28
      total=1
 
29
      do i = 1,ndim
 
30
         chunk(i) = 0
 
31
         dims(i) = n
 
32
         ld(i) = n
 
33
         total = total * dims(i)
 
34
      enddo
 
35
c
 
36
c***  Create global arrays
 
37
      if (.not. nga_create(m4_MT, ndim, dims, 'a', chunk, g_a))
 
38
     $     call ga_error(' ga_create failed ',1)
 
39
c     
 
40
      call ga_sync()
 
41
c
 
42
c------------------------------- NGA_GET ----------------------------
 
43
      m4_print_info(nga_get)
 
44
c
 
45
      val = m4_conv(234)
 
46
      call ga_fill(g_a,val)
 
47
      call ga_sync()
 
48
c     
 
49
      call m4_util_fill_array(m4_test_type)(a,total,val)
 
50
c
 
51
      call ga_sync()
 
52
      do i = 1,ndim
 
53
         lop(i) = 1
 
54
         hip(i) = n
 
55
      enddo
 
56
      do loop = 1, MAXLOOP 
 
57
         call random_range(lop,hip,lo,hi,ndim)
 
58
         if(me.eq.0 .and. Mod(loop,10).eq.0)then
 
59
            call print_range(loop,lo,hi,ndim)
 
60
         endif
 
61
c
 
62
         call nga_get(g_a,lo,hi,
 
63
     $        b(substr(m4_lo_all, 1, eval(m4_ndim*6-1))),ld)
 
64
         call m4_util_compare_patches(m4_test_type)(0d0,total,
 
65
     $        a,lo,hi,ndim,dims,total,b,lo,hi,ndim,dims)
 
66
      enddo
 
67
c
 
68
      call ga_sync()
 
69
      if(me.eq.0)then
 
70
         print *, 'OK'
 
71
         print *, ' '
 
72
         call ffflush(6)
 
73
      endif
 
74
c---------------------------
 
75
c     
 
76
      status= ga_destroy(g_a)
 
77
      end