1
subroutine m4_func_NGA_GET(m4_test_type, m4_ndim)
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)
16
integer i, total, loop
17
integer lop(ndim), hip(ndim)
25
c---------------------- initialize the GA -----------------------
26
c initialize the chunk, dims, ld, and calculate the number
33
total = total * dims(i)
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)
42
c------------------------------- NGA_GET ----------------------------
43
m4_print_info(nga_get)
49
call m4_util_fill_array(m4_test_type)(a,total,val)
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)
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)
74
c---------------------------
76
status= ga_destroy(g_a)