1
subroutine testanb_i4(nproc,me,remote_proc)
9
type(ARMCI_slice) :: src_slice, dst_slice
10
integer :: nproc,me,remote_proc
11
integer(kind=I4), pointer :: a7_i4(:,:,:,:,:,:,:), b7_i4(:,:,:,:,:,:,:)
12
integer(kind=I4), pointer :: a6_i4(:,:,:,:,:,:), b6_i4(:,:,:,:,:,:)
13
integer(kind=I4), pointer :: a5_i4(:,:,:,:,:), b5_i4(:,:,:,:,:)
14
integer(kind=I4), pointer :: a4_i4(:,:,:,:), b4_i4(:,:,:,:)
15
integer(kind=I4), pointer :: a3_i4(:,:,:), b3_i4(:,:,:)
16
integer(kind=I4), pointer :: a2_i4(:,:), b2_i4(:,:)
17
integer(kind=I4), pointer :: a1_i4(:), b1_i4(:)
18
integer(kind=I4), pointer :: v_i4(:)
20
integer :: lb(7), ub(7), rc, i, j
30
integer :: vlb(1),vub(1)
31
integer :: afirst,bfirst
34
bfirst = afirst * afirst
40
extent(:) = extent(:) + ub(:) - lb(:)
43
asize(m) = asize(m-1)*extent(m)
49
call ARMCI_Malloc_fa(v_i4,vlb,vub,rc)
51
print *,' ARMCI_Malloc_fa for v_i4 failed rc = ',rc
55
call ARMCI_Malloc_fa(a7_i4, lb, ub, rc)
57
print *,' ARMCI_Malloc_fa for a7_i4 failed rc = ',rc
61
call ARMCI_Malloc_fa(b7_i4, lb, ub, rc)
63
print *,' ARMCI_Malloc_fa for b7_i4 failed rc = ',rc
67
call ARMCI_Malloc_fa(a6_i4, lb, ub, rc)
69
print *,' ARMCI_Malloc_fa for a6_i4 failed rc = ',rc
73
call ARMCI_Malloc_fa(b6_i4, lb, ub, rc)
75
print *,' ARMCI_Malloc_fa for b6_i4 failed rc = ',rc
79
call ARMCI_Malloc_fa(a5_i4, lb, ub, rc)
81
print *,' ARMCI_Malloc_fa for a5_i4 failed rc = ',rc
85
call ARMCI_Malloc_fa(b5_i4, lb, ub, rc)
87
print *,' ARMCI_Malloc_fa for b5_i4 failed rc = ',rc
91
call ARMCI_Malloc_fa(a4_i4, lb, ub, rc)
93
print *,' ARMCI_Malloc_fa for a4_i4 failed rc = ',rc
97
call ARMCI_Malloc_fa(b4_i4, lb, ub, rc)
99
print *,' ARMCI_Malloc_fa for b4_i4 failed rc = ',rc
103
call ARMCI_Malloc_fa(a3_i4, lb, ub, rc)
105
print *,' ARMCI_Malloc_fa for a3_i4 failed rc = ',rc
109
call ARMCI_Malloc_fa(b3_i4, lb, ub, rc)
111
print *,' ARMCI_Malloc_fa for b3_i4 failed rc = ',rc
115
call ARMCI_Malloc_fa(a2_i4, lb, ub, rc)
117
print *,' ARMCI_Malloc_fa for a2_i4 failed rc = ',rc
121
call ARMCI_Malloc_fa(b2_i4, lb, ub, rc)
123
print *,' ARMCI_Malloc_fa for b2_i4 failed rc = ',rc
127
call ARMCI_Malloc_fa(a1_i4, lb, ub, rc)
129
print *,' ARMCI_Malloc_fa for a1_i4 failed rc = ',rc
133
call ARMCI_Malloc_fa(b1_i4, lb, ub, rc)
135
print *,' ARMCI_Malloc_fa for b1_i4 failed rc = ',rc
139
! Let all processors get allocated.
143
! I4 allocations done, now loop over slices.
144
! We will test three flavors of slices,
145
! all unit stride, unit stride in the first dimension only,
146
! all non-unit stride (2).
148
joff = remote_proc + 1
155
call init_7d(a7_i4,b7_i4,lb,ub,lb,ub,afirst,bfirst)
156
a6_i4(:,:,:,:,:,:) = a7_i4(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),lb(6):ub(6),1)
157
a5_i4(:,:,:,:,:) = a7_i4(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),1,1)
158
a4_i4(:,:,:,:) = a7_i4(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),1,1,1)
159
a3_i4(:,:,:) = a7_i4(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),1,1,1,1)
160
a2_i4(:,:) = a7_i4(lb(1):ub(1),lb(2):ub(2),1,1,1,1,1)
161
a1_i4(:) = a7_i4(lb(1):ub(1),1,1,1,1,1,1)
162
b6_i4(:,:,:,:,:,:) = b7_i4(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),lb(6):ub(6),1)
163
b5_i4(:,:,:,:,:) = b7_i4(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),1,1)
164
b4_i4(:,:,:,:) = b7_i4(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),1,1,1)
165
b3_i4(:,:,:) = b7_i4(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),1,1,1,1)
166
b2_i4(:,:) = b7_i4(lb(1):ub(1),lb(2):ub(2),1,1,1,1,1)
167
b1_i4(:) = b7_i4(lb(1):ub(1),1,1,1,1,1,1)
169
! Let all processors get initialized.
173
! Set up slice info for the put.
175
! For m = 1, the slice has all unit strides.
176
! For m = 2, the first dimension has a unit stride and all other
177
! dimensions have a stride of 2.
178
! For m = 3, all dimensions have a stride of 2.
182
src_slice%stride(:) = (m+2)/2
183
src_slice%stride(1) = (m+1)/2
187
dst_slice%stride(:) = (m+2)/2
188
dst_slice%stride(1) = (m+1)/2
192
call ARMCI_NbPut_fa(a1_i4, src_slice, b1_i4, dst_slice, remote_proc, rc)
193
call ARMCI_Waitall_fa()
196
print *,me,': ARMCI_NbPut_fa for 1D I4, m = ',m,' failed, rc = ',rc
199
! Check that received b1 is the piece of the sent a1.
201
call check_b(rank,b1_i4,dst_slice,src_slice,remote_proc, &
202
& lb,ub,lb,ub,joff,pass)
203
score(1) = score(1) + pass
204
if (pass .ne. 1) then
205
print *,me,': ARMCI_NbPut_fa verify for 1D I4, m = ',m,' failed'
213
call ARMCI_NbPut_fa(a2_i4, src_slice, b2_i4, dst_slice, remote_proc, rc)
214
call ARMCI_Waitall_fa()
218
print *,me,': ARMCI_NbPut_fa for 2D I4, m = ',m,' failed, rc = ',rc
221
! Check that received b2 is the piece of the sent a2.
223
! call check_b(rank,reshape(b2_i4,vshape),dst_slice,src_slice,remote_proc, &
224
! call check_b(rank,b2_i4,dst_slice,src_slice,remote_proc, &
225
v_i4(1:asize(2)) = reshape(b2_i4,vshape)
227
call check_b(rank,v_i4,dst_slice,src_slice,remote_proc, &
228
& lb,ub,lb,ub,joff,pass)
229
score(2) = score(2) + pass
230
if (pass .ne. 1) then
231
print *,me,': ARMCI_NbPut_fa verify for 2D I4, m = ',m,' failed'
239
call ARMCI_NbPut_fa(a3_i4, src_slice, b3_i4, dst_slice, remote_proc, rc)
240
call ARMCI_Waitall_fa()
243
print *,me,': ARMCI_NbPut_fa for 3D I4, m = ',m,' failed, rc = ',rc
246
! Check that received b3 is the piece of the sent a3.
248
v_i4(1:asize(3)) = reshape(b3_i4,vshape)
249
call check_b(rank,v_i4,dst_slice,src_slice,remote_proc, &
250
& lb,ub,lb,ub,joff,pass)
251
score(3) = score(3) + pass
252
if (pass .ne. 1) then
253
print *,me,': ARMCI_NbPut_fa verify for 3D I4, m = ',m,' failed'
261
call ARMCI_NbPut_fa(a4_i4, src_slice, b4_i4, dst_slice, remote_proc, rc)
262
call ARMCI_Waitall_fa()
265
print *,me,': ARMCI_NbPut_fa for 4D I4, m = ',m,' failed, rc = ',rc
268
! Check that received b4 is the piece of the sent a4.
270
v_i4(1:asize(4)) = reshape(b4_i4,vshape)
271
call check_b(rank,v_i4,dst_slice,src_slice,remote_proc, &
272
& lb,ub,lb,ub,joff,pass)
273
score(4) = score(4) + pass
274
if (pass .ne. 1) then
275
print *,me,': ARMCI_NbPut_fa verify for 4D I4, m = ',m,' failed'
283
call ARMCI_NbPut_fa(a5_i4, src_slice, b5_i4, dst_slice, remote_proc, rc)
284
call ARMCI_Waitall_fa()
287
print *,me,': ARMCI_NbPut_fa for 5D I4, m = ',m,' failed, rc = ',rc
290
! Check that received b5 is the piece of the sent a5.
292
v_i4(1:asize(5)) = reshape(b5_i4,vshape)
293
call check_b(rank,v_i4,dst_slice,src_slice,remote_proc, &
294
& lb,ub,lb,ub,joff,pass)
295
score(5) = score(5) + pass
296
if (pass .ne. 1) then
297
print *,me,': ARMCI_NbPut_fa verify for 4D I4, m = ',m,' failed'
305
call ARMCI_NbPut_fa(a6_i4, src_slice, b6_i4, dst_slice, remote_proc, rc)
306
call ARMCI_Waitall_fa()
310
print *,me,': ARMCI_NbPut_fa for 6D I4, m = ',m,' failed, rc = ',rc
313
! Check that received b6 is the piece of the sent a6
315
v_i4(1:asize(6)) = reshape(b6_i4,vshape)
316
call check_b(rank,v_i4,dst_slice,src_slice,remote_proc, &
317
& lb,ub,lb,ub,joff,pass)
318
score(6) = score(6) + pass
319
if (pass .ne. 1) then
320
print *,me,': ARMCI_NbPut_fa verify for 6D I4, m = ',m,' failed'
328
call ARMCI_NbPut_fa(a7_i4, src_slice, b7_i4, dst_slice, remote_proc, rc)
329
call ARMCI_Waitall_fa()
333
print *,me,': ARMCI_NbPut_fa for 7D I4, m = ',m,' failed, rc = ',rc
336
! Check that received b7 is the piece of the sent a7
338
v_i4(1:asize(7)) = reshape(b7_i4,vshape)
339
call check_b(rank,v_i4,dst_slice,src_slice,remote_proc, &
340
& lb,ub,lb,ub,joff,pass)
341
score(7) = score(7) + pass
342
if (pass .ne. 1) then
343
print *,me,': ARMCI_NbPut_fa verify for 7D I4, m = ',m,' failed'
350
if (score(m) .eq. 3) then
351
print *,' ARMCI_NbPut_fa for I4, ',m,'D passed'
359
joff = (remote_proc + 1)*(remote_proc+1)
364
call init_7d(a7_i4,b7_i4,lb,ub,lb,ub,afirst,bfirst)
365
a6_i4 = a7_i4(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),lb(6):ub(6),1)
366
a5_i4 = a7_i4(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),1,1)
367
a4_i4 = a7_i4(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),1,1,1)
368
a3_i4 = a7_i4(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),1,1,1,1)
369
a2_i4 = a7_i4(lb(1):ub(1),lb(2):ub(2),1,1,1,1,1)
370
a1_i4 = a7_i4(lb(1):ub(1),1,1,1,1,1,1)
371
b6_i4 = b7_i4(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),lb(6):ub(6),1)
372
b5_i4 = b7_i4(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),1,1)
373
b4_i4 = b7_i4(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),1,1,1)
374
b3_i4 = b7_i4(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),1,1,1,1)
375
b2_i4 = b7_i4(lb(1):ub(1),lb(2):ub(2),1,1,1,1,1)
376
b1_i4 = b7_i4(lb(1):ub(1),1,1,1,1,1,1)
378
! Let all processors get initialized.
382
! Set up slice info for the get.
384
! For m = 1, the slice has all unit strides.
385
! For m = 2, the first dimension has a unit stride and all other
386
! dimensions have a stride of 2.
387
! For m = 3, all dimensions have a stride of 2.
391
src_slice%stride(:) = (m+2)/2
392
src_slice%stride(1) = (m+1)/2
396
dst_slice%stride(:) = (m+2)/2
397
dst_slice%stride(1) = (m+1)/2
402
call ARMCI_NbGet_fa(b1_i4, dst_slice, a1_i4, src_slice, remote_proc, rc)
403
call ARMCI_Waitall_fa()
407
! Check that recieved a is the piece of b that was sent.
409
call check_b(rank,a1_i4,src_slice,dst_slice,remote_proc, &
410
& lb,ub,lb,ub,joff,pass)
411
score(1) = score(1) + pass
412
if (pass .ne. 1) then
413
print *,me,': ARMCI_NbGet_fa verify for 1D I4, m = ',m,' failed'
422
call ARMCI_NbGet_fa(b2_i4, dst_slice, a2_i4, src_slice, remote_proc, rc)
423
call ARMCI_Waitall_fa()
427
! Check that recieved a is the piece of b that was sent.
429
v_i4(1:asize(2)) = reshape(a2_i4,vshape)
430
call check_b(rank,v_i4,src_slice,dst_slice,remote_proc, &
431
& lb,ub,lb,ub,joff,pass)
432
score(2) = score(2) + pass
433
if (pass .ne. 1) then
434
print *,me,': ARMCI_NbGet_fa verify for 2D I4, m = ',m,' failed'
443
call ARMCI_NbGet_fa(b3_i4, dst_slice, a3_i4, src_slice, remote_proc, rc)
444
call ARMCI_Waitall_fa()
448
! Check that recieved a is the piece of b that was sent.
450
v_i4(1:asize(3)) = reshape(a3_i4,vshape)
451
call check_b(rank,v_i4,src_slice,dst_slice,remote_proc, &
452
& lb,ub,lb,ub,joff,pass)
453
score(3) = score(3) + pass
454
if (pass .ne. 1) then
455
print *,me,': ARMCI_NbGet_fa verify for 3D I4, m = ',m,' failed'
464
call ARMCI_NbGet_fa(b4_i4, dst_slice, a4_i4, src_slice, remote_proc, rc)
465
call ARMCI_Waitall_fa()
469
! Check that recieved a is the piece of b that was sent.
471
v_i4(1:asize(4)) = reshape(a4_i4,vshape)
472
call check_b(rank,v_i4,src_slice,dst_slice,remote_proc, &
473
& lb,ub,lb,ub,joff,pass)
474
score(4) = score(4) + pass
475
if (pass .ne. 1) then
476
print *,me,': ARMCI_NbGet_fa verify for 4D I4, m = ',m,' failed'
485
call ARMCI_NbGet_fa(b5_i4, dst_slice, a5_i4, src_slice, remote_proc, rc)
486
call ARMCI_Waitall_fa()
490
! Check that recieved a is the piece of b that was sent.
492
v_i4(1:asize(5)) = reshape(a5_i4,vshape)
493
call check_b(rank,v_i4,src_slice,dst_slice,remote_proc, &
494
& lb,ub,lb,ub,joff,pass)
495
score(5) = score(5) + pass
496
if (pass .ne. 1) then
497
print *,me,': ARMCI_NbGet_fa verify for 5D I4, m = ',m,' failed'
506
call ARMCI_NbGet_fa(b6_i4, dst_slice, a6_i4, src_slice, remote_proc, rc)
507
call ARMCI_Waitall_fa()
511
! Check that recieved a is the piece of b that was sent.
513
v_i4(1:asize(6)) = reshape(a6_i4,vshape)
514
call check_b(rank,v_i4,src_slice,dst_slice,remote_proc, &
515
& lb,ub,lb,ub,joff,pass)
516
score(6) = score(6) + pass
517
if (pass .ne. 1) then
518
print *,me,': ARMCI_NbGet_fa verify for 6D I4, m = ',m,' failed'
527
call ARMCI_NbGet_fa(b7_i4, dst_slice, a7_i4, src_slice, remote_proc, rc)
528
call ARMCI_Waitall_fa()
532
! Check that recieved a is the piece of b that was sent.
534
v_i4(1:asize(7)) = reshape(a7_i4,vshape)
535
call check_b(rank,v_i4,src_slice,dst_slice,remote_proc, &
536
& lb,ub,lb,ub,joff,pass)
537
score(7) = score(7) + pass
538
if (pass .ne. 1) then
539
print *,me,': ARMCI_NbGet_fa verify for 7D I4, m = ',m,' failed'
546
if (score(m) .eq. 3) then
547
print *,' ARMCI_NbGet_fa for I4, ',m,'D passed'
552
! Free v, a and b arrays.
555
call ARMCI_Free_fa(v_i4, rc)
556
call ARMCI_Free_fa(a1_i4, rc)
557
call ARMCI_Free_fa(b1_i4, rc)
558
call ARMCI_Free_fa(a2_i4, rc)
559
call ARMCI_Free_fa(b2_i4, rc)
560
call ARMCI_Free_fa(a3_i4, rc)
561
call ARMCI_Free_fa(b3_i4, rc)
562
call ARMCI_Free_fa(a4_i4, rc)
563
call ARMCI_Free_fa(b4_i4, rc)
564
call ARMCI_Free_fa(a5_i4, rc)
565
call ARMCI_Free_fa(b5_i4, rc)
566
call ARMCI_Free_fa(a6_i4, rc)
567
call ARMCI_Free_fa(b6_i4, rc)
568
call ARMCI_Free_fa(a7_i4, rc)
569
call ARMCI_Free_fa(b7_i4, rc)
574
subroutine testanb_i8(nproc,me,remote_proc)
582
type(ARMCI_slice) :: src_slice, dst_slice
583
integer :: nproc,me,remote_proc
584
integer(kind=I8), pointer :: a7_i8(:,:,:,:,:,:,:), b7_i8(:,:,:,:,:,:,:)
585
integer(kind=I8), pointer :: a6_i8(:,:,:,:,:,:), b6_i8(:,:,:,:,:,:)
586
integer(kind=I8), pointer :: a5_i8(:,:,:,:,:), b5_i8(:,:,:,:,:)
587
integer(kind=I8), pointer :: a4_i8(:,:,:,:), b4_i8(:,:,:,:)
588
integer(kind=I8), pointer :: a3_i8(:,:,:), b3_i8(:,:,:)
589
integer(kind=I8), pointer :: a2_i8(:,:), b2_i8(:,:)
590
integer(kind=I8), pointer :: a1_i8(:), b1_i8(:)
591
integer(kind=I8), pointer :: v_i8(:)
593
integer :: lb(7), ub(7), rc, i, j
603
integer :: vlb(1),vub(1)
604
integer :: afirst,bfirst
610
extent(:) = extent(:) + ub(:) - lb(:)
613
asize(m) = asize(m-1)*extent(m)
616
bfirst = afirst * afirst
621
call ARMCI_Malloc_fa(v_i8,vlb,vub,rc)
623
print *,' ARMCI_Malloc_fa for v_i8 failed rc = ',rc
627
call ARMCI_Malloc_fa(a7_i8, lb, ub, rc)
629
print *,' ARMCI_Malloc_fa for a7_i8 failed rc = ',rc
633
call ARMCI_Malloc_fa(b7_i8, lb, ub, rc)
635
print *,' ARMCI_Malloc_fa for b7_i8 failed rc = ',rc
639
call ARMCI_Malloc_fa(a6_i8, lb, ub, rc)
641
print *,' ARMCI_Malloc_fa for a6_i8 failed rc = ',rc
645
call ARMCI_Malloc_fa(b6_i8, lb, ub, rc)
647
print *,' ARMCI_Malloc_fa for b6_i8 failed rc = ',rc
651
call ARMCI_Malloc_fa(a5_i8, lb, ub, rc)
653
print *,' ARMCI_Malloc_fa for a5_i8 failed rc = ',rc
657
call ARMCI_Malloc_fa(b5_i8, lb, ub, rc)
659
print *,' ARMCI_Malloc_fa for b5_i8 failed rc = ',rc
663
call ARMCI_Malloc_fa(a4_i8, lb, ub, rc)
665
print *,' ARMCI_Malloc_fa for a4_i8 failed rc = ',rc
669
call ARMCI_Malloc_fa(b4_i8, lb, ub, rc)
671
print *,' ARMCI_Malloc_fa for b4_i8 failed rc = ',rc
675
call ARMCI_Malloc_fa(a3_i8, lb, ub, rc)
677
print *,' ARMCI_Malloc_fa for a3_i8 failed rc = ',rc
681
call ARMCI_Malloc_fa(b3_i8, lb, ub, rc)
683
print *,' ARMCI_Malloc_fa for b3_i8 failed rc = ',rc
687
call ARMCI_Malloc_fa(a2_i8, lb, ub, rc)
689
print *,' ARMCI_Malloc_fa for a2_i8 failed rc = ',rc
693
call ARMCI_Malloc_fa(b2_i8, lb, ub, rc)
695
print *,' ARMCI_Malloc_fa for b2_i8 failed rc = ',rc
699
call ARMCI_Malloc_fa(a1_i8, lb, ub, rc)
701
print *,' ARMCI_Malloc_fa for a1_i8 failed rc = ',rc
705
call ARMCI_Malloc_fa(b1_i8, lb, ub, rc)
707
print *,' ARMCI_Malloc_fa for b1_i8 failed rc = ',rc
711
! Let all processors get alloccated.
715
! I8 allocations done, now loop over slices.
716
! We will test three flavors of slices,
717
! all unit stride, unit stride in the first dimension only,
718
! all non-unit stride (2).
720
joff = remote_proc + 1
727
call init_7d(a7_i8,b7_i8,lb,ub,lb,ub,afirst,bfirst)
728
a6_i8(:,:,:,:,:,:) = a7_i8(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),lb(6):ub(6),1)
729
a5_i8(:,:,:,:,:) = a7_i8(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),1,1)
730
a4_i8(:,:,:,:) = a7_i8(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),1,1,1)
731
a3_i8(:,:,:) = a7_i8(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),1,1,1,1)
732
a2_i8(:,:) = a7_i8(lb(1):ub(1),lb(2):ub(2),1,1,1,1,1)
733
a1_i8(:) = a7_i8(lb(1):ub(1),1,1,1,1,1,1)
734
b6_i8(:,:,:,:,:,:) = b7_i8(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),lb(6):ub(6),1)
735
b5_i8(:,:,:,:,:) = b7_i8(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),1,1)
736
b4_i8(:,:,:,:) = b7_i8(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),1,1,1)
737
b3_i8(:,:,:) = b7_i8(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),1,1,1,1)
738
b2_i8(:,:) = b7_i8(lb(1):ub(1),lb(2):ub(2),1,1,1,1,1)
739
b1_i8(:) = b7_i8(lb(1):ub(1),1,1,1,1,1,1)
741
! Let all processors get initialized.
745
! Set up slice info for the put.
747
! For m = 1, the slice has all unit strides.
748
! For m = 2, the first dimension has a unit stride and all other
749
! dimensions have a stride of 2.
750
! For m = 3, all dimensions have a stride of 2.
754
src_slice%stride(:) = (m+2)/2
755
src_slice%stride(1) = (m+1)/2
759
dst_slice%stride(:) = (m+2)/2
760
dst_slice%stride(1) = (m+1)/2
764
call ARMCI_NbPut_fa(a1_i8, src_slice, b1_i8, dst_slice, remote_proc, rc)
765
call ARMCI_Waitall_fa()
769
print *,me,': ARMCI_NbPut_fa for 1D I8, m = ',m,' failed, rc = ',rc
772
! Check that received b1 is the piece of the sent a1.
774
call check_b(rank,b1_i8,dst_slice,src_slice,remote_proc, &
775
& lb,ub,lb,ub,joff,pass)
776
score(1) = score(1) + pass
777
if (pass .ne. 1) then
778
print *,me,': ARMCI_NbPut_fa verify for 1D I8, m = ',m,' failed'
786
call ARMCI_NbPut_fa(a2_i8, src_slice, b2_i8, dst_slice, remote_proc, rc)
787
call ARMCI_Waitall_fa()
791
print *,me,': ARMCI_NbPut_fa for 2D I8, m = ',m,' failed, rc = ',rc
794
! Check that received b2 is the piece of the sent a2.
796
! call check_b(rank,reshape(b2_i8,vshape),dst_slice,src_slice,remote_proc, &
797
! call check_b(rank,b2_i8,dst_slice,src_slice,remote_proc, &
798
v_i8(1:asize(2)) = reshape(b2_i8,vshape)
800
call check_b(rank,v_i8,dst_slice,src_slice,remote_proc, &
801
& lb,ub,lb,ub,joff,pass)
802
score(2) = score(2) + pass
803
if (pass .ne. 1) then
804
print *,me,': ARMCI_NbPut_fa verify for 2D I8, m = ',m,' failed'
812
call ARMCI_NbPut_fa(a3_i8, src_slice, b3_i8, dst_slice, remote_proc, rc)
813
call ARMCI_Waitall_fa()
817
print *,me,': ARMCI_NbPut_fa for 3D I8, m = ',m,' failed, rc = ',rc
820
! Check that received b3 is the piece of the sent a3.
822
v_i8(1:asize(3)) = reshape(b3_i8,vshape)
823
call check_b(rank,v_i8,dst_slice,src_slice,remote_proc, &
824
& lb,ub,lb,ub,joff,pass)
825
score(3) = score(3) + pass
826
if (pass .ne. 1) then
827
print *,me,': ARMCI_NbPut_fa verify for 3D I8, m = ',m,' failed'
835
call ARMCI_NbPut_fa(a4_i8, src_slice, b4_i8, dst_slice, remote_proc, rc)
836
call ARMCI_Waitall_fa()
840
print *,me,': ARMCI_NbPut_fa for 4D I8, m = ',m,' failed, rc = ',rc
843
! Check that received b4 is the piece of the sent a4.
845
v_i8(1:asize(4)) = reshape(b4_i8,vshape)
846
call check_b(rank,v_i8,dst_slice,src_slice,remote_proc, &
847
& lb,ub,lb,ub,joff,pass)
848
score(4) = score(4) + pass
849
if (pass .ne. 1) then
850
print *,me,': ARMCI_NbPut_fa verify for 4D I8, m = ',m,' failed'
858
call ARMCI_NbPut_fa(a5_i8, src_slice, b5_i8, dst_slice, remote_proc, rc)
859
call ARMCI_Waitall_fa()
863
print *,me,': ARMCI_NbPut_fa for 5D I8, m = ',m,' failed, rc = ',rc
866
! Check that received b5 is the piece of the sent a5.
868
v_i8(1:asize(5)) = reshape(b5_i8,vshape)
869
call check_b(rank,v_i8,dst_slice,src_slice,remote_proc, &
870
& lb,ub,lb,ub,joff,pass)
871
score(5) = score(5) + pass
872
if (pass .ne. 1) then
873
print *,me,': ARMCI_NbPut_fa verify for 4D I8, m = ',m,' failed'
881
call ARMCI_NbPut_fa(a6_i8, src_slice, b6_i8, dst_slice, remote_proc, rc)
882
call ARMCI_Waitall_fa()
886
print *,me,': ARMCI_NbPut_fa for 6D I8, m = ',m,' failed, rc = ',rc
889
! Check that received b6 is the piece of the sent a6
891
v_i8(1:asize(6)) = reshape(b6_i8,vshape)
892
call check_b(rank,v_i8,dst_slice,src_slice,remote_proc, &
893
& lb,ub,lb,ub,joff,pass)
894
score(6) = score(6) + pass
895
if (pass .ne. 1) then
896
print *,me,': ARMCI_NbPut_fa verify for 6D I8, m = ',m,' failed'
904
call ARMCI_NbPut_fa(a7_i8, src_slice, b7_i8, dst_slice, remote_proc, rc)
905
call ARMCI_Waitall_fa()
909
print *,me,': ARMCI_NbPut_fa for 7D I8, m = ',m,' failed, rc = ',rc
912
! Check that received b7 is the piece of the sent a7
914
v_i8(1:asize(7)) = reshape(b7_i8,vshape)
915
call check_b(rank,v_i8,dst_slice,src_slice,remote_proc, &
916
& lb,ub,lb,ub,joff,pass)
917
score(7) = score(7) + pass
918
if (pass .ne. 1) then
919
print *,me,': ARMCI_NbPut_fa verify for 7D I8, m = ',m,' failed'
926
if (score(m) .eq. 3) then
927
print *,' ARMCI_NbPut_fa for I8, ',m,'D passed'
935
joff = (remote_proc + 1)*(remote_proc+1)
940
call init_7d(a7_i8,b7_i8,lb,ub,lb,ub,afirst,bfirst)
941
a6_i8 = a7_i8(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),lb(6):ub(6),1)
942
a5_i8 = a7_i8(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),1,1)
943
a4_i8 = a7_i8(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),1,1,1)
944
a3_i8 = a7_i8(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),1,1,1,1)
945
a2_i8 = a7_i8(lb(1):ub(1),lb(2):ub(2),1,1,1,1,1)
946
a1_i8 = a7_i8(lb(1):ub(1),1,1,1,1,1,1)
947
b6_i8 = b7_i8(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),lb(6):ub(6),1)
948
b5_i8 = b7_i8(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),1,1)
949
b4_i8 = b7_i8(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),1,1,1)
950
b3_i8 = b7_i8(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),1,1,1,1)
951
b2_i8 = b7_i8(lb(1):ub(1),lb(2):ub(2),1,1,1,1,1)
952
b1_i8 = b7_i8(lb(1):ub(1),1,1,1,1,1,1)
954
! Let all processors get initialized.
958
! Set up slice info for the get.
960
! For m = 1, the slice has all unit strides.
961
! For m = 2, the first dimension has a unit stride and all other
962
! dimensions have a stride of 2.
963
! For m = 3, all dimensions have a stride of 2.
967
src_slice%stride(:) = (m+2)/2
968
src_slice%stride(1) = (m+1)/2
972
dst_slice%stride(:) = (m+2)/2
973
dst_slice%stride(1) = (m+1)/2
978
call ARMCI_NbGet_fa(b1_i8, dst_slice, a1_i8, src_slice, remote_proc, rc)
979
call ARMCI_Waitall_fa()
983
! Check that recieved a is the piece of b that was sent.
985
call check_b(rank,a1_i8,src_slice,dst_slice,remote_proc, &
986
& lb,ub,lb,ub,joff,pass)
987
score(1) = score(1) + pass
988
if (pass .ne. 1) then
989
print *,me,': ARMCI_NbGet_fa verify for 1D I8, m = ',m,' failed'
998
call ARMCI_NbGet_fa(b2_i8, dst_slice, a2_i8, src_slice, remote_proc, rc)
999
call ARMCI_Waitall_fa()
1003
! Check that recieved a is the piece of b that was sent.
1005
v_i8(1:asize(2)) = reshape(a2_i8,vshape)
1006
call check_b(rank,v_i8,src_slice,dst_slice,remote_proc, &
1007
& lb,ub,lb,ub,joff,pass)
1008
score(2) = score(2) + pass
1009
if (pass .ne. 1) then
1010
print *,me,': ARMCI_NbGet_fa verify for 2D I8, m = ',m,' failed'
1018
vshape(1) = asize(3)
1019
call ARMCI_NbGet_fa(b3_i8, dst_slice, a3_i8, src_slice, remote_proc, rc)
1020
call ARMCI_Waitall_fa()
1024
! Check that recieved a is the piece of b that was sent.
1026
v_i8(1:asize(3)) = reshape(a3_i8,vshape)
1027
call check_b(rank,v_i8,src_slice,dst_slice,remote_proc, &
1028
& lb,ub,lb,ub,joff,pass)
1029
score(3) = score(3) + pass
1030
if (pass .ne. 1) then
1031
print *,me,': ARMCI_NbGet_fa verify for 3D I8, m = ',m,' failed'
1039
vshape(1) = asize(4)
1040
call ARMCI_NbGet_fa(b4_i8, dst_slice, a4_i8, src_slice, remote_proc, rc)
1041
call ARMCI_Waitall_fa()
1045
! Check that recieved a is the piece of b that was sent.
1047
v_i8(1:asize(4)) = reshape(a4_i8,vshape)
1048
call check_b(rank,v_i8,src_slice,dst_slice,remote_proc, &
1049
& lb,ub,lb,ub,joff,pass)
1050
score(4) = score(4) + pass
1051
if (pass .ne. 1) then
1052
print *,me,': ARMCI_NbGet_fa verify for 4D I8, m = ',m,' failed'
1060
vshape(1) = asize(5)
1061
call ARMCI_NbGet_fa(b5_i8, dst_slice, a5_i8, src_slice, remote_proc, rc)
1062
call ARMCI_Waitall_fa()
1066
! Check that recieved a is the piece of b that was sent.
1068
v_i8(1:asize(5)) = reshape(a5_i8,vshape)
1069
call check_b(rank,v_i8,src_slice,dst_slice,remote_proc, &
1070
& lb,ub,lb,ub,joff,pass)
1071
score(5) = score(5) + pass
1072
if (pass .ne. 1) then
1073
print *,me,': ARMCI_NbGet_fa verify for 5D I8, m = ',m,' failed'
1081
vshape(1) = asize(6)
1082
call ARMCI_NbGet_fa(b6_i8, dst_slice, a6_i8, src_slice, remote_proc, rc)
1083
call ARMCI_Waitall_fa()
1087
! Check that recieved a is the piece of b that was sent.
1089
v_i8(1:asize(6)) = reshape(a6_i8,vshape)
1090
call check_b(rank,v_i8,src_slice,dst_slice,remote_proc, &
1091
& lb,ub,lb,ub,joff,pass)
1092
score(6) = score(6) + pass
1093
if (pass .ne. 1) then
1094
print *,me,': ARMCI_NbGet_fa verify for 6D I8, m = ',m,' failed'
1102
vshape(1) = asize(7)
1103
call ARMCI_NbGet_fa(b7_i8, dst_slice, a7_i8, src_slice, remote_proc, rc)
1104
call ARMCI_Waitall_fa()
1108
! Check that recieved a is the piece of b that was sent.
1110
v_i8(1:asize(7)) = reshape(a7_i8,vshape)
1111
call check_b(rank,v_i8,src_slice,dst_slice,remote_proc, &
1112
& lb,ub,lb,ub,joff,pass)
1113
score(7) = score(7) + pass
1114
if (pass .ne. 1) then
1115
print *,me,': ARMCI_NbGet_fa verify for 7D I8, m = ',m,' failed'
1122
if (score(m) .eq. 3) then
1123
print *,' ARMCI_NbGet_fa for I8, ',m,'D passed'
1128
! Free v, a and b arrays.
1131
call ARMCI_Free_fa(v_i8, rc)
1132
call ARMCI_Free_fa(a1_i8, rc)
1133
call ARMCI_Free_fa(b1_i8, rc)
1134
call ARMCI_Free_fa(a2_i8, rc)
1135
call ARMCI_Free_fa(b2_i8, rc)
1136
call ARMCI_Free_fa(a3_i8, rc)
1137
call ARMCI_Free_fa(b3_i8, rc)
1138
call ARMCI_Free_fa(a4_i8, rc)
1139
call ARMCI_Free_fa(b4_i8, rc)
1140
call ARMCI_Free_fa(a5_i8, rc)
1141
call ARMCI_Free_fa(b5_i8, rc)
1142
call ARMCI_Free_fa(a6_i8, rc)
1143
call ARMCI_Free_fa(b6_i8, rc)
1144
call ARMCI_Free_fa(a7_i8, rc)
1145
call ARMCI_Free_fa(b7_i8, rc)
1149
subroutine testanb_r4(nproc,me,remote_proc)
1157
type(ARMCI_slice) :: src_slice, dst_slice
1158
integer :: nproc,me,remote_proc
1159
real(kind=R4), pointer :: a7(:,:,:,:,:,:,:), b7(:,:,:,:,:,:,:)
1160
real(kind=R4), pointer :: a6(:,:,:,:,:,:), b6(:,:,:,:,:,:)
1161
real(kind=R4), pointer :: a5(:,:,:,:,:), b5(:,:,:,:,:)
1162
real(kind=R4), pointer :: a4(:,:,:,:), b4(:,:,:,:)
1163
real(kind=R4), pointer :: a3(:,:,:), b3(:,:,:)
1164
real(kind=R4), pointer :: a2(:,:), b2(:,:)
1165
real(kind=R4), pointer :: a1(:), b1(:)
1166
real(kind=R4), pointer :: v(:)
1168
integer :: lb(7), ub(7), rc, i, j
1174
integer :: vshape(1)
1175
integer :: extent(7)
1178
integer :: vlb(1),vub(1)
1179
integer :: afirst,bfirst
1182
bfirst = afirst*afirst
1188
extent(:) = extent(:) + ub(:) - lb(:)
1189
asize(1) = extent(1)
1191
asize(m) = asize(m-1)*extent(m)
1197
call ARMCI_Malloc_fa(v,vlb,vub,rc)
1199
print *,' ARMCI_Malloc_fa for v failed rc = ',rc
1203
call ARMCI_Malloc_fa(a7, lb, ub, rc)
1205
print *,' ARMCI_Malloc_fa for a7 failed rc = ',rc
1209
call ARMCI_Malloc_fa(b7, lb, ub, rc)
1211
print *,' ARMCI_Malloc_fa for b7 failed rc = ',rc
1215
call ARMCI_Malloc_fa(a6, lb, ub, rc)
1217
print *,' ARMCI_Malloc_fa for a6 failed rc = ',rc
1221
call ARMCI_Malloc_fa(b6, lb, ub, rc)
1223
print *,' ARMCI_Malloc_fa for b6 failed rc = ',rc
1227
call ARMCI_Malloc_fa(a5, lb, ub, rc)
1229
print *,' ARMCI_Malloc_fa for a5 failed rc = ',rc
1233
call ARMCI_Malloc_fa(b5, lb, ub, rc)
1235
print *,' ARMCI_Malloc_fa for b5 failed rc = ',rc
1239
call ARMCI_Malloc_fa(a4, lb, ub, rc)
1241
print *,' ARMCI_Malloc_fa for a4 failed rc = ',rc
1245
call ARMCI_Malloc_fa(b4, lb, ub, rc)
1247
print *,' ARMCI_Malloc_fa for b4 failed rc = ',rc
1251
call ARMCI_Malloc_fa(a3, lb, ub, rc)
1253
print *,' ARMCI_Malloc_fa for a3 failed rc = ',rc
1257
call ARMCI_Malloc_fa(b3, lb, ub, rc)
1259
print *,' ARMCI_Malloc_fa for b3 failed rc = ',rc
1263
call ARMCI_Malloc_fa(a2, lb, ub, rc)
1265
print *,' ARMCI_Malloc_fa for a2 failed rc = ',rc
1269
call ARMCI_Malloc_fa(b2, lb, ub, rc)
1271
print *,' ARMCI_Malloc_fa for b2 failed rc = ',rc
1275
call ARMCI_Malloc_fa(a1, lb, ub, rc)
1277
print *,' ARMCI_Malloc_fa for a1 failed rc = ',rc
1281
call ARMCI_Malloc_fa(b1, lb, ub, rc)
1283
print *,' ARMCI_Malloc_fa for b1 failed rc = ',rc
1287
! Let all processors get alloccated.
1291
! R4 allocations done, now loop over slices.
1292
! We will test three flavors of slices,
1293
! all unit stride, unit stride in the first dimension only,
1294
! all non-unit stride (2).
1296
joff = remote_proc + 1
1301
! Initialize arrays.
1303
call init_7d(a7,b7,lb,ub,lb,ub,afirst,bfirst)
1304
a6(:,:,:,:,:,:) = a7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),lb(6):ub(6),1)
1305
a5(:,:,:,:,:) = a7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),1,1)
1306
a4(:,:,:,:) = a7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),1,1,1)
1307
a3(:,:,:) = a7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),1,1,1,1)
1308
a2(:,:) = a7(lb(1):ub(1),lb(2):ub(2),1,1,1,1,1)
1309
a1(:) = a7(lb(1):ub(1),1,1,1,1,1,1)
1310
b6(:,:,:,:,:,:) = b7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),lb(6):ub(6),1)
1311
b5(:,:,:,:,:) = b7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),1,1)
1312
b4(:,:,:,:) = b7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),1,1,1)
1313
b3(:,:,:) = b7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),1,1,1,1)
1314
b2(:,:) = b7(lb(1):ub(1),lb(2):ub(2),1,1,1,1,1)
1315
b1(:) = b7(lb(1):ub(1),1,1,1,1,1,1)
1317
! Let all processors get initialized.
1321
! Set up slice info for the put.
1323
! For m = 1, the slice has all unit strides.
1324
! For m = 2, the first dimension has a unit stride and all other
1325
! dimensions have a stride of 2.
1326
! For m = 3, all dimensions have a stride of 2.
1330
src_slice%stride(:) = (m+2)/2
1331
src_slice%stride(1) = (m+1)/2
1335
dst_slice%stride(:) = (m+2)/2
1336
dst_slice%stride(1) = (m+1)/2
1340
call ARMCI_NbPut_fa(a1, src_slice, b1, dst_slice, remote_proc, rc)
1341
call ARMCI_Waitall_fa()
1345
print *,me,': ARMCI_NbPut_fa for 1D R4, m = ',m,' failed, rc = ',rc
1348
! Check that received b1 is the piece of the sent a1.
1350
call check_b(rank,b1,dst_slice,src_slice,remote_proc, &
1351
& lb,ub,lb,ub,joff,pass)
1352
score(1) = score(1) + pass
1353
if (pass .ne. 1) then
1354
print *,me,': ARMCI_NbPut_fa verify for 1D R4, m = ',m,' failed'
1361
vshape(1) = asize(2)
1362
call ARMCI_NbPut_fa(a2, src_slice, b2, dst_slice, remote_proc, rc)
1363
call ARMCI_Waitall_fa()
1367
print *,me,': ARMCI_NbPut_fa for 2D R4, m = ',m,' failed, rc = ',rc
1370
! Check that received b2 is the piece of the sent a2.
1372
! call check_b(rank,reshape(b2,vshape),dst_slice,src_slice,remote_proc, &
1373
! call check_b(rank,b2,dst_slice,src_slice,remote_proc, &
1374
v(1:asize(2)) = reshape(b2,vshape)
1376
call check_b(rank,v,dst_slice,src_slice,remote_proc, &
1377
& lb,ub,lb,ub,joff,pass)
1378
score(2) = score(2) + pass
1379
if (pass .ne. 1) then
1380
print *,me,': ARMCI_NbPut_fa verify for 2D R4, m = ',m,' failed'
1387
vshape(1) = asize(3)
1388
call ARMCI_NbPut_fa(a3, src_slice, b3, dst_slice, remote_proc, rc)
1389
call ARMCI_Waitall_fa()
1393
print *,me,': ARMCI_NbPut_fa for 3D R4, m = ',m,' failed, rc = ',rc
1396
! Check that received b3 is the piece of the sent a3.
1398
v(1:asize(3)) = reshape(b3,vshape)
1399
call check_b(rank,v,dst_slice,src_slice,remote_proc, &
1400
& lb,ub,lb,ub,joff,pass)
1401
score(3) = score(3) + pass
1402
if (pass .ne. 1) then
1403
print *,me,': ARMCI_NbPut_fa verify for 3D R4, m = ',m,' failed'
1410
vshape(1) = asize(4)
1411
call ARMCI_NbPut_fa(a4, src_slice, b4, dst_slice, remote_proc, rc)
1412
call ARMCI_Waitall_fa()
1416
print *,me,': ARMCI_NbPut_fa for 4D R4, m = ',m,' failed, rc = ',rc
1419
! Check that received b4 is the piece of the sent a4.
1421
v(1:asize(4)) = reshape(b4,vshape)
1422
call check_b(rank,v,dst_slice,src_slice,remote_proc, &
1423
& lb,ub,lb,ub,joff,pass)
1424
score(4) = score(4) + pass
1425
if (pass .ne. 1) then
1426
print *,me,': ARMCI_NbPut_fa verify for 4D R4, m = ',m,' failed'
1433
vshape(1) = asize(5)
1434
call ARMCI_NbPut_fa(a5, src_slice, b5, dst_slice, remote_proc, rc)
1435
call ARMCI_Waitall_fa()
1439
print *,me,': ARMCI_NbPut_fa for 5D R4, m = ',m,' failed, rc = ',rc
1442
! Check that received b5 is the piece of the sent a5.
1444
v(1:asize(5)) = reshape(b5,vshape)
1445
call check_b(rank,v,dst_slice,src_slice,remote_proc, &
1446
& lb,ub,lb,ub,joff,pass)
1447
score(5) = score(5) + pass
1448
if (pass .ne. 1) then
1449
print *,me,': ARMCI_NbPut_fa verify for 4D R4, m = ',m,' failed'
1456
vshape(1) = asize(6)
1457
call ARMCI_NbPut_fa(a6, src_slice, b6, dst_slice, remote_proc, rc)
1458
call ARMCI_Waitall_fa()
1462
print *,me,': ARMCI_NbPut_fa for 6D R4, m = ',m,' failed, rc = ',rc
1465
! Check that received b6 is the piece of the sent a6
1467
v(1:asize(6)) = reshape(b6,vshape)
1468
call check_b(rank,v,dst_slice,src_slice,remote_proc, &
1469
& lb,ub,lb,ub,joff,pass)
1470
score(6) = score(6) + pass
1471
if (pass .ne. 1) then
1472
print *,me,': ARMCI_NbPut_fa verify for 6D R4, m = ',m,' failed'
1479
vshape(1) = asize(7)
1480
call ARMCI_NbPut_fa(a7, src_slice, b7, dst_slice, remote_proc, rc)
1481
call ARMCI_Waitall_fa()
1485
print *,me,': ARMCI_NbPut_fa for 7D R4, m = ',m,' failed, rc = ',rc
1488
! Check that received b7 is the piece of the sent a7
1490
v(1:asize(7)) = reshape(b7,vshape)
1491
call check_b(rank,v,dst_slice,src_slice,remote_proc, &
1492
& lb,ub,lb,ub,joff,pass)
1493
score(7) = score(7) + pass
1494
if (pass .ne. 1) then
1495
print *,me,': ARMCI_NbPut_fa verify for 7D R4, m = ',m,' failed'
1502
if (score(m) .eq. 3) then
1503
print *,' ARMCI_NbPut_fa for R4, ',m,'D passed'
1511
joff = (remote_proc + 1)*(remote_proc+1)
1514
! Initialize arrays.
1516
call init_7d(a7,b7,lb,ub,lb,ub,afirst,bfirst)
1517
a6 = a7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),lb(6):ub(6),1)
1518
a5 = a7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),1,1)
1519
a4 = a7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),1,1,1)
1520
a3 = a7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),1,1,1,1)
1521
a2 = a7(lb(1):ub(1),lb(2):ub(2),1,1,1,1,1)
1522
a1 = a7(lb(1):ub(1),1,1,1,1,1,1)
1523
b6 = b7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),lb(6):ub(6),1)
1524
b5 = b7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),1,1)
1525
b4 = b7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),1,1,1)
1526
b3 = b7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),1,1,1,1)
1527
b2 = b7(lb(1):ub(1),lb(2):ub(2),1,1,1,1,1)
1528
b1 = b7(lb(1):ub(1),1,1,1,1,1,1)
1530
! Let all processors get initialized.
1534
! Set up slice info for the get.
1536
! For m = 1, the slice has all unit strides.
1537
! For m = 2, the first dimension has a unit stride and all other
1538
! dimensions have a stride of 2.
1539
! For m = 3, all dimensions have a stride of 2.
1543
src_slice%stride(:) = (m+2)/2
1544
src_slice%stride(1) = (m+1)/2
1548
dst_slice%stride(:) = (m+2)/2
1549
dst_slice%stride(1) = (m+1)/2
1554
call ARMCI_NbGet_fa(b1, dst_slice, a1, src_slice, remote_proc, rc)
1555
call ARMCI_Waitall_fa()
1559
! Check that recieved a is the piece of b that was sent.
1561
call check_b(rank,a1,src_slice,dst_slice,remote_proc, &
1562
& lb,ub,lb,ub,joff,pass)
1563
score(1) = score(1) + pass
1564
if (pass .ne. 1) then
1565
print *,me,': ARMCI_NbGet_fa verify for 1D R4, m = ',m,' failed'
1573
vshape(1) = asize(2)
1574
call ARMCI_NbGet_fa(b2, dst_slice, a2, src_slice, remote_proc, rc)
1575
call ARMCI_Waitall_fa()
1579
! Check that recieved a is the piece of b that was sent.
1581
v(1:asize(2)) = reshape(a2,vshape)
1582
call check_b(rank,v,src_slice,dst_slice,remote_proc, &
1583
& lb,ub,lb,ub,joff,pass)
1584
score(2) = score(2) + pass
1585
if (pass .ne. 1) then
1586
print *,me,': ARMCI_NbGet_fa verify for 2D R4, m = ',m,' failed'
1594
vshape(1) = asize(3)
1595
call ARMCI_NbGet_fa(b3, dst_slice, a3, src_slice, remote_proc, rc)
1596
call ARMCI_Waitall_fa()
1600
! Check that recieved a is the piece of b that was sent.
1602
v(1:asize(3)) = reshape(a3,vshape)
1603
call check_b(rank,v,src_slice,dst_slice,remote_proc, &
1604
& lb,ub,lb,ub,joff,pass)
1605
score(3) = score(3) + pass
1606
if (pass .ne. 1) then
1607
print *,me,': ARMCI_NbGet_fa verify for 3D R4, m = ',m,' failed'
1615
vshape(1) = asize(4)
1616
call ARMCI_NbGet_fa(b4, dst_slice, a4, src_slice, remote_proc, rc)
1617
call ARMCI_Waitall_fa()
1621
! Check that recieved a is the piece of b that was sent.
1623
v(1:asize(4)) = reshape(a4,vshape)
1624
call check_b(rank,v,src_slice,dst_slice,remote_proc, &
1625
& lb,ub,lb,ub,joff,pass)
1626
score(4) = score(4) + pass
1627
if (pass .ne. 1) then
1628
print *,me,': ARMCI_NbGet_fa verify for 4D R4, m = ',m,' failed'
1636
vshape(1) = asize(5)
1637
call ARMCI_NbGet_fa(b5, dst_slice, a5, src_slice, remote_proc, rc)
1638
call ARMCI_Waitall_fa()
1642
! Check that recieved a is the piece of b that was sent.
1644
v(1:asize(5)) = reshape(a5,vshape)
1645
call check_b(rank,v,src_slice,dst_slice,remote_proc, &
1646
& lb,ub,lb,ub,joff,pass)
1647
score(5) = score(5) + pass
1648
if (pass .ne. 1) then
1649
print *,me,': ARMCI_NbGet_fa verify for 5D R4, m = ',m,' failed'
1657
vshape(1) = asize(6)
1658
call ARMCI_NbGet_fa(b6, dst_slice, a6, src_slice, remote_proc, rc)
1659
call ARMCI_Waitall_fa()
1663
! Check that recieved a is the piece of b that was sent.
1665
v(1:asize(6)) = reshape(a6,vshape)
1666
call check_b(rank,v,src_slice,dst_slice,remote_proc, &
1667
& lb,ub,lb,ub,joff,pass)
1668
score(6) = score(6) + pass
1669
if (pass .ne. 1) then
1670
print *,me,': ARMCI_NbGet_fa verify for 6D R4, m = ',m,' failed'
1678
vshape(1) = asize(7)
1679
call ARMCI_NbGet_fa(b7, dst_slice, a7, src_slice, remote_proc, rc)
1680
call ARMCI_Waitall_fa()
1684
! Check that recieved a is the piece of b that was sent.
1686
v(1:asize(7)) = reshape(a7,vshape)
1687
call check_b(rank,v,src_slice,dst_slice,remote_proc, &
1688
& lb,ub,lb,ub,joff,pass)
1689
score(7) = score(7) + pass
1690
if (pass .ne. 1) then
1691
print *,me,': ARMCI_NbGet_fa verify for 7D R4, m = ',m,' failed'
1698
if (score(m) .eq. 3) then
1699
print *,' ARMCI_NbGet_fa for R4, ',m,'D passed'
1704
! Free v, a and b arrays.
1707
call ARMCI_Free_fa(v, rc)
1708
call ARMCI_Free_fa(a1, rc)
1709
call ARMCI_Free_fa(b1, rc)
1710
call ARMCI_Free_fa(a2, rc)
1711
call ARMCI_Free_fa(b2, rc)
1712
call ARMCI_Free_fa(a3, rc)
1713
call ARMCI_Free_fa(b3, rc)
1714
call ARMCI_Free_fa(a4, rc)
1715
call ARMCI_Free_fa(b4, rc)
1716
call ARMCI_Free_fa(a5, rc)
1717
call ARMCI_Free_fa(b5, rc)
1718
call ARMCI_Free_fa(a6, rc)
1719
call ARMCI_Free_fa(b6, rc)
1720
call ARMCI_Free_fa(a7, rc)
1721
call ARMCI_Free_fa(b7, rc)
1725
subroutine testanb_r8(nproc,me,remote_proc)
1733
type(ARMCI_slice) :: src_slice, dst_slice
1734
integer :: nproc,me,remote_proc
1735
real(kind=R8), pointer :: a7(:,:,:,:,:,:,:), b7(:,:,:,:,:,:,:)
1736
real(kind=R8), pointer :: a6(:,:,:,:,:,:), b6(:,:,:,:,:,:)
1737
real(kind=R8), pointer :: a5(:,:,:,:,:), b5(:,:,:,:,:)
1738
real(kind=R8), pointer :: a4(:,:,:,:), b4(:,:,:,:)
1739
real(kind=R8), pointer :: a3(:,:,:), b3(:,:,:)
1740
real(kind=R8), pointer :: a2(:,:), b2(:,:)
1741
real(kind=R8), pointer :: a1(:), b1(:)
1742
real(kind=R8), pointer :: v(:)
1744
integer :: lb(7), ub(7), rc, i, j
1750
integer :: vshape(1)
1751
integer :: extent(7)
1754
integer :: vlb(1),vub(1)
1755
integer :: afirst,bfirst
1758
bfirst = afirst*afirst
1764
extent(:) = extent(:) + ub(:) - lb(:)
1765
asize(1) = extent(1)
1767
asize(m) = asize(m-1)*extent(m)
1773
call ARMCI_Malloc_fa(v,vlb,vub,rc)
1775
print *,' ARMCI_Malloc_fa for v failed rc = ',rc
1779
call ARMCI_Malloc_fa(a7, lb, ub, rc)
1781
print *,' ARMCI_Malloc_fa for a7 failed rc = ',rc
1785
call ARMCI_Malloc_fa(b7, lb, ub, rc)
1787
print *,' ARMCI_Malloc_fa for b7 failed rc = ',rc
1791
call ARMCI_Malloc_fa(a6, lb, ub, rc)
1793
print *,' ARMCI_Malloc_fa for a6 failed rc = ',rc
1797
call ARMCI_Malloc_fa(b6, lb, ub, rc)
1799
print *,' ARMCI_Malloc_fa for b6 failed rc = ',rc
1803
call ARMCI_Malloc_fa(a5, lb, ub, rc)
1805
print *,' ARMCI_Malloc_fa for a5 failed rc = ',rc
1809
call ARMCI_Malloc_fa(b5, lb, ub, rc)
1811
print *,' ARMCI_Malloc_fa for b5 failed rc = ',rc
1815
call ARMCI_Malloc_fa(a4, lb, ub, rc)
1817
print *,' ARMCI_Malloc_fa for a4 failed rc = ',rc
1821
call ARMCI_Malloc_fa(b4, lb, ub, rc)
1823
print *,' ARMCI_Malloc_fa for b4 failed rc = ',rc
1827
call ARMCI_Malloc_fa(a3, lb, ub, rc)
1829
print *,' ARMCI_Malloc_fa for a3 failed rc = ',rc
1833
call ARMCI_Malloc_fa(b3, lb, ub, rc)
1835
print *,' ARMCI_Malloc_fa for b3 failed rc = ',rc
1839
call ARMCI_Malloc_fa(a2, lb, ub, rc)
1841
print *,' ARMCI_Malloc_fa for a2 failed rc = ',rc
1845
call ARMCI_Malloc_fa(b2, lb, ub, rc)
1847
print *,' ARMCI_Malloc_fa for b2 failed rc = ',rc
1851
call ARMCI_Malloc_fa(a1, lb, ub, rc)
1853
print *,' ARMCI_Malloc_fa for a1 failed rc = ',rc
1857
call ARMCI_Malloc_fa(b1, lb, ub, rc)
1859
print *,' ARMCI_Malloc_fa for b1 failed rc = ',rc
1863
! Let all processors get alloccated.
1867
! R8 allocations done, now loop over slices.
1868
! We will test three flavors of slices,
1869
! all unit stride, unit stride in the first dimension only,
1870
! all non-unit stride (2).
1872
joff = remote_proc + 1
1877
! Initialize arrays.
1879
call init_7d(a7,b7,lb,ub,lb,ub,afirst,bfirst)
1880
a6(:,:,:,:,:,:) = a7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),lb(6):ub(6),1)
1881
a5(:,:,:,:,:) = a7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),1,1)
1882
a4(:,:,:,:) = a7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),1,1,1)
1883
a3(:,:,:) = a7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),1,1,1,1)
1884
a2(:,:) = a7(lb(1):ub(1),lb(2):ub(2),1,1,1,1,1)
1885
a1(:) = a7(lb(1):ub(1),1,1,1,1,1,1)
1886
b6(:,:,:,:,:,:) = b7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),lb(6):ub(6),1)
1887
b5(:,:,:,:,:) = b7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),1,1)
1888
b4(:,:,:,:) = b7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),1,1,1)
1889
b3(:,:,:) = b7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),1,1,1,1)
1890
b2(:,:) = b7(lb(1):ub(1),lb(2):ub(2),1,1,1,1,1)
1891
b1(:) = b7(lb(1):ub(1),1,1,1,1,1,1)
1893
! Let all processors get initialized.
1897
! Set up slice info for the put.
1899
! For m = 1, the slice has all unit strides.
1900
! For m = 2, the first dimension has a unit stride and all other
1901
! dimensions have a stride of 2.
1902
! For m = 3, all dimensions have a stride of 2.
1906
src_slice%stride(:) = (m+2)/2
1907
src_slice%stride(1) = (m+1)/2
1911
dst_slice%stride(:) = (m+2)/2
1912
dst_slice%stride(1) = (m+1)/2
1916
call ARMCI_NbPut_fa(a1, src_slice, b1, dst_slice, remote_proc, rc)
1917
call ARMCI_Waitall_fa()
1921
print *,me,': ARMCI_NbPut_fa for 1D R8, m = ',m,' failed, rc = ',rc
1924
! Check that received b1 is the piece of the sent a1.
1926
call check_b(rank,b1,dst_slice,src_slice,remote_proc, &
1927
& lb,ub,lb,ub,joff,pass)
1928
score(1) = score(1) + pass
1929
if (pass .ne. 1) then
1930
print *,me,': ARMCI_NbPut_fa verify for 1D R8, m = ',m,' failed'
1937
vshape(1) = asize(2)
1938
call ARMCI_NbPut_fa(a2, src_slice, b2, dst_slice, remote_proc, rc)
1939
call ARMCI_Waitall_fa()
1943
print *,me,': ARMCI_NbPut_fa for 2D R8, m = ',m,' failed, rc = ',rc
1946
! Check that received b2 is the piece of the sent a2.
1948
! call check_b(rank,reshape(b2,vshape),dst_slice,src_slice,remote_proc, &
1949
! call check_b(rank,b2,dst_slice,src_slice,remote_proc, &
1950
v(1:asize(2)) = reshape(b2,vshape)
1952
call check_b(rank,v,dst_slice,src_slice,remote_proc, &
1953
& lb,ub,lb,ub,joff,pass)
1954
score(2) = score(2) + pass
1955
if (pass .ne. 1) then
1956
print *,me,': ARMCI_NbPut_fa verify for 2D R8, m = ',m,' failed'
1963
vshape(1) = asize(3)
1964
call ARMCI_NbPut_fa(a3, src_slice, b3, dst_slice, remote_proc, rc)
1965
call ARMCI_Waitall_fa()
1969
print *,me,': ARMCI_NbPut_fa for 3D R8, m = ',m,' failed, rc = ',rc
1972
! Check that received b3 is the piece of the sent a3.
1974
v(1:asize(3)) = reshape(b3,vshape)
1975
call check_b(rank,v,dst_slice,src_slice,remote_proc, &
1976
& lb,ub,lb,ub,joff,pass)
1977
score(3) = score(3) + pass
1978
if (pass .ne. 1) then
1979
print *,me,': ARMCI_NbPut_fa verify for 3D R8, m = ',m,' failed'
1986
vshape(1) = asize(4)
1987
call ARMCI_NbPut_fa(a4, src_slice, b4, dst_slice, remote_proc, rc)
1988
call ARMCI_Waitall_fa()
1992
print *,me,': ARMCI_NbPut_fa for 4D R8, m = ',m,' failed, rc = ',rc
1995
! Check that received b4 is the piece of the sent a4.
1997
v(1:asize(4)) = reshape(b4,vshape)
1998
call check_b(rank,v,dst_slice,src_slice,remote_proc, &
1999
& lb,ub,lb,ub,joff,pass)
2000
score(4) = score(4) + pass
2001
if (pass .ne. 1) then
2002
print *,me,': ARMCI_NbPut_fa verify for 4D R8, m = ',m,' failed'
2009
vshape(1) = asize(5)
2010
call ARMCI_NbPut_fa(a5, src_slice, b5, dst_slice, remote_proc, rc)
2011
call ARMCI_Waitall_fa()
2015
print *,me,': ARMCI_NbPut_fa for 5D R8, m = ',m,' failed, rc = ',rc
2018
! Check that received b5 is the piece of the sent a5.
2020
v(1:asize(5)) = reshape(b5,vshape)
2021
call check_b(rank,v,dst_slice,src_slice,remote_proc, &
2022
& lb,ub,lb,ub,joff,pass)
2023
score(5) = score(5) + pass
2024
if (pass .ne. 1) then
2025
print *,me,': ARMCI_NbPut_fa verify for 4D R8, m = ',m,' failed'
2032
vshape(1) = asize(6)
2033
call ARMCI_NbPut_fa(a6, src_slice, b6, dst_slice, remote_proc, rc)
2034
call ARMCI_Waitall_fa()
2038
print *,me,': ARMCI_NbPut_fa for 6D R8, m = ',m,' failed, rc = ',rc
2041
! Check that received b6 is the piece of the sent a6
2043
v(1:asize(6)) = reshape(b6,vshape)
2044
call check_b(rank,v,dst_slice,src_slice,remote_proc, &
2045
& lb,ub,lb,ub,joff,pass)
2046
score(6) = score(6) + pass
2047
if (pass .ne. 1) then
2048
print *,me,': ARMCI_NbPut_fa verify for 6D R8, m = ',m,' failed'
2055
vshape(1) = asize(7)
2056
call ARMCI_NbPut_fa(a7, src_slice, b7, dst_slice, remote_proc, rc)
2057
call ARMCI_Waitall_fa()
2061
print *,me,': ARMCI_NbPut_fa for 7D R8, m = ',m,' failed, rc = ',rc
2064
! Check that received b7 is the piece of the sent a7
2066
v(1:asize(7)) = reshape(b7,vshape)
2067
call check_b(rank,v,dst_slice,src_slice,remote_proc, &
2068
& lb,ub,lb,ub,joff,pass)
2069
score(7) = score(7) + pass
2070
if (pass .ne. 1) then
2071
print *,me,': ARMCI_NbPut_fa verify for 7D R8, m = ',m,' failed'
2078
if (score(m) .eq. 3) then
2079
print *,' ARMCI_NbPut_fa for R8, ',m,'D passed'
2087
joff = (remote_proc + 1)*(remote_proc+1)
2090
! Initialize arrays.
2092
call init_7d(a7,b7,lb,ub,lb,ub,afirst,bfirst)
2093
a6 = a7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),lb(6):ub(6),1)
2094
a5 = a7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),1,1)
2095
a4 = a7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),1,1,1)
2096
a3 = a7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),1,1,1,1)
2097
a2 = a7(lb(1):ub(1),lb(2):ub(2),1,1,1,1,1)
2098
a1 = a7(lb(1):ub(1),1,1,1,1,1,1)
2099
b6 = b7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),lb(6):ub(6),1)
2100
b5 = b7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),1,1)
2101
b4 = b7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),1,1,1)
2102
b3 = b7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),1,1,1,1)
2103
b2 = b7(lb(1):ub(1),lb(2):ub(2),1,1,1,1,1)
2104
b1 = b7(lb(1):ub(1),1,1,1,1,1,1)
2106
! Let all processors get initialized.
2110
! Set up slice info for the get.
2112
! For m = 1, the slice has all unit strides.
2113
! For m = 2, the first dimension has a unit stride and all other
2114
! dimensions have a stride of 2.
2115
! For m = 3, all dimensions have a stride of 2.
2119
src_slice%stride(:) = (m+2)/2
2120
src_slice%stride(1) = (m+1)/2
2124
dst_slice%stride(:) = (m+2)/2
2125
dst_slice%stride(1) = (m+1)/2
2130
call ARMCI_NbGet_fa(b1, dst_slice, a1, src_slice, remote_proc, rc)
2131
call ARMCI_Waitall_fa()
2135
! Check that recieved a is the piece of b that was sent.
2137
call check_b(rank,a1,src_slice,dst_slice,remote_proc, &
2138
& lb,ub,lb,ub,joff,pass)
2139
score(1) = score(1) + pass
2140
if (pass .ne. 1) then
2141
print *,me,': ARMCI_NbGet_fa verify for 1D R8, m = ',m,' failed'
2149
vshape(1) = asize(2)
2150
call ARMCI_NbGet_fa(b2, dst_slice, a2, src_slice, remote_proc, rc)
2151
call ARMCI_Waitall_fa()
2155
! Check that recieved a is the piece of b that was sent.
2157
v(1:asize(2)) = reshape(a2,vshape)
2158
call check_b(rank,v,src_slice,dst_slice,remote_proc, &
2159
& lb,ub,lb,ub,joff,pass)
2160
score(2) = score(2) + pass
2161
if (pass .ne. 1) then
2162
print *,me,': ARMCI_NbGet_fa verify for 2D R8, m = ',m,' failed'
2170
vshape(1) = asize(3)
2171
call ARMCI_NbGet_fa(b3, dst_slice, a3, src_slice, remote_proc, rc)
2172
call ARMCI_Waitall_fa()
2176
! Check that recieved a is the piece of b that was sent.
2178
v(1:asize(3)) = reshape(a3,vshape)
2179
call check_b(rank,v,src_slice,dst_slice,remote_proc, &
2180
& lb,ub,lb,ub,joff,pass)
2181
score(3) = score(3) + pass
2182
if (pass .ne. 1) then
2183
print *,me,': ARMCI_NbGet_fa verify for 3D R8, m = ',m,' failed'
2191
vshape(1) = asize(4)
2192
call ARMCI_NbGet_fa(b4, dst_slice, a4, src_slice, remote_proc, rc)
2193
call ARMCI_Waitall_fa()
2197
! Check that recieved a is the piece of b that was sent.
2199
v(1:asize(4)) = reshape(a4,vshape)
2200
call check_b(rank,v,src_slice,dst_slice,remote_proc, &
2201
& lb,ub,lb,ub,joff,pass)
2202
score(4) = score(4) + pass
2203
if (pass .ne. 1) then
2204
print *,me,': ARMCI_NbGet_fa verify for 4D R8, m = ',m,' failed'
2212
vshape(1) = asize(5)
2213
call ARMCI_NbGet_fa(b5, dst_slice, a5, src_slice, remote_proc, rc)
2214
call ARMCI_Waitall_fa()
2218
! Check that recieved a is the piece of b that was sent.
2220
v(1:asize(5)) = reshape(a5,vshape)
2221
call check_b(rank,v,src_slice,dst_slice,remote_proc, &
2222
& lb,ub,lb,ub,joff,pass)
2223
score(5) = score(5) + pass
2224
if (pass .ne. 1) then
2225
print *,me,': ARMCI_NbGet_fa verify for 5D R8, m = ',m,' failed'
2233
vshape(1) = asize(6)
2234
call ARMCI_NbGet_fa(b6, dst_slice, a6, src_slice, remote_proc, rc)
2235
call ARMCI_Waitall_fa()
2239
! Check that recieved a is the piece of b that was sent.
2241
v(1:asize(6)) = reshape(a6,vshape)
2242
call check_b(rank,v,src_slice,dst_slice,remote_proc, &
2243
& lb,ub,lb,ub,joff,pass)
2244
score(6) = score(6) + pass
2245
if (pass .ne. 1) then
2246
print *,me,': ARMCI_NbGet_fa verify for 6D R8, m = ',m,' failed'
2254
vshape(1) = asize(7)
2255
call ARMCI_NbGet_fa(b7, dst_slice, a7, src_slice, remote_proc, rc)
2256
call ARMCI_Waitall_fa()
2260
! Check that recieved a is the piece of b that was sent.
2262
v(1:asize(7)) = reshape(a7,vshape)
2263
call check_b(rank,v,src_slice,dst_slice,remote_proc, &
2264
& lb,ub,lb,ub,joff,pass)
2265
score(7) = score(7) + pass
2266
if (pass .ne. 1) then
2267
print *,me,': ARMCI_NbGet_fa verify for 7D R8, m = ',m,' failed'
2274
if (score(m) .eq. 3) then
2275
print *,' ARMCI_NbGet_fa for R8, ',m,'D passed'
2280
! Free v, a and b arrays.
2283
call ARMCI_Free_fa(v, rc)
2284
call ARMCI_Free_fa(a1, rc)
2285
call ARMCI_Free_fa(b1, rc)
2286
call ARMCI_Free_fa(a2, rc)
2287
call ARMCI_Free_fa(b2, rc)
2288
call ARMCI_Free_fa(a3, rc)
2289
call ARMCI_Free_fa(b3, rc)
2290
call ARMCI_Free_fa(a4, rc)
2291
call ARMCI_Free_fa(b4, rc)
2292
call ARMCI_Free_fa(a5, rc)
2293
call ARMCI_Free_fa(b5, rc)
2294
call ARMCI_Free_fa(a6, rc)
2295
call ARMCI_Free_fa(b6, rc)
2296
call ARMCI_Free_fa(a7, rc)
2297
call ARMCI_Free_fa(b7, rc)
2302
subroutine testanb_c4(nproc,me,remote_proc)
2310
type(ARMCI_slice) :: src_slice, dst_slice
2311
integer :: nproc,me,remote_proc
2312
complex(kind=C4), pointer :: a7(:,:,:,:,:,:,:), b7(:,:,:,:,:,:,:)
2313
complex(kind=C4), pointer :: a6(:,:,:,:,:,:), b6(:,:,:,:,:,:)
2314
complex(kind=C4), pointer :: a5(:,:,:,:,:), b5(:,:,:,:,:)
2315
complex(kind=C4), pointer :: a4(:,:,:,:), b4(:,:,:,:)
2316
complex(kind=C4), pointer :: a3(:,:,:), b3(:,:,:)
2317
complex(kind=C4), pointer :: a2(:,:), b2(:,:)
2318
complex(kind=C4), pointer :: a1(:), b1(:)
2319
complex(kind=C4), pointer :: v(:)
2321
integer :: lb(7), ub(7), rc, i, j
2327
integer :: vshape(1)
2328
integer :: extent(7)
2331
integer :: vlb(1),vub(1)
2332
integer :: afirst,bfirst
2335
bfirst = afirst*afirst
2341
extent(:) = extent(:) + ub(:) - lb(:)
2342
asize(1) = extent(1)
2344
asize(m) = asize(m-1)*extent(m)
2350
call ARMCI_Malloc_fa(v,vlb,vub,rc)
2352
print *,' ARMCI_Malloc_fa for v failed rc = ',rc
2356
call ARMCI_Malloc_fa(a7, lb, ub, rc)
2358
print *,' ARMCI_Malloc_fa for a7 failed rc = ',rc
2362
call ARMCI_Malloc_fa(b7, lb, ub, rc)
2364
print *,' ARMCI_Malloc_fa for b7 failed rc = ',rc
2368
call ARMCI_Malloc_fa(a6, lb, ub, rc)
2370
print *,' ARMCI_Malloc_fa for a6 failed rc = ',rc
2374
call ARMCI_Malloc_fa(b6, lb, ub, rc)
2376
print *,' ARMCI_Malloc_fa for b6 failed rc = ',rc
2380
call ARMCI_Malloc_fa(a5, lb, ub, rc)
2382
print *,' ARMCI_Malloc_fa for a5 failed rc = ',rc
2386
call ARMCI_Malloc_fa(b5, lb, ub, rc)
2388
print *,' ARMCI_Malloc_fa for b5 failed rc = ',rc
2392
call ARMCI_Malloc_fa(a4, lb, ub, rc)
2394
print *,' ARMCI_Malloc_fa for a4 failed rc = ',rc
2398
call ARMCI_Malloc_fa(b4, lb, ub, rc)
2400
print *,' ARMCI_Malloc_fa for b4 failed rc = ',rc
2404
call ARMCI_Malloc_fa(a3, lb, ub, rc)
2406
print *,' ARMCI_Malloc_fa for a3 failed rc = ',rc
2410
call ARMCI_Malloc_fa(b3, lb, ub, rc)
2412
print *,' ARMCI_Malloc_fa for b3 failed rc = ',rc
2416
call ARMCI_Malloc_fa(a2, lb, ub, rc)
2418
print *,' ARMCI_Malloc_fa for a2 failed rc = ',rc
2422
call ARMCI_Malloc_fa(b2, lb, ub, rc)
2424
print *,' ARMCI_Malloc_fa for b2 failed rc = ',rc
2428
call ARMCI_Malloc_fa(a1, lb, ub, rc)
2430
print *,' ARMCI_Malloc_fa for a1 failed rc = ',rc
2434
call ARMCI_Malloc_fa(b1, lb, ub, rc)
2436
print *,' ARMCI_Malloc_fa for b1 failed rc = ',rc
2440
! Let all processors get alloccated.
2444
! C4 allocations done, now loop over slices.
2445
! We will test three flavors of slices,
2446
! all unit stride, unit stride in the first dimension only,
2447
! all non-unit stride (2).
2449
joff = remote_proc + 1
2454
! Initialize arrays.
2456
call init_7d(a7,b7,lb,ub,lb,ub,afirst,bfirst)
2457
a6(:,:,:,:,:,:) = a7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),lb(6):ub(6),1)
2458
a5(:,:,:,:,:) = a7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),1,1)
2459
a4(:,:,:,:) = a7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),1,1,1)
2460
a3(:,:,:) = a7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),1,1,1,1)
2461
a2(:,:) = a7(lb(1):ub(1),lb(2):ub(2),1,1,1,1,1)
2462
a1(:) = a7(lb(1):ub(1),1,1,1,1,1,1)
2463
b6(:,:,:,:,:,:) = b7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),lb(6):ub(6),1)
2464
b5(:,:,:,:,:) = b7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),1,1)
2465
b4(:,:,:,:) = b7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),1,1,1)
2466
b3(:,:,:) = b7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),1,1,1,1)
2467
b2(:,:) = b7(lb(1):ub(1),lb(2):ub(2),1,1,1,1,1)
2468
b1(:) = b7(lb(1):ub(1),1,1,1,1,1,1)
2470
! Let all processors get initialized.
2474
! Set up slice info for the put.
2476
! For m = 1, the slice has all unit strides.
2477
! For m = 2, the first dimension has a unit stride and all other
2478
! dimensions have a stride of 2.
2479
! For m = 3, all dimensions have a stride of 2.
2483
src_slice%stride(:) = (m+2)/2
2484
src_slice%stride(1) = (m+1)/2
2488
dst_slice%stride(:) = (m+2)/2
2489
dst_slice%stride(1) = (m+1)/2
2493
call ARMCI_NbPut_fa(a1, src_slice, b1, dst_slice, remote_proc, rc)
2494
call ARMCI_Waitall_fa()
2498
print *,me,': ARMCI_NbPut_fa for 1D C4, m = ',m,' failed, rc = ',rc
2501
! Check that received b1 is the piece of the sent a1.
2503
call check_b(rank,b1,dst_slice,src_slice,remote_proc, &
2504
& lb,ub,lb,ub,joff,pass)
2505
score(1) = score(1) + pass
2506
if (pass .ne. 1) then
2507
print *,me,': ARMCI_NbPut_fa verify for 1D C4, m = ',m,' failed'
2514
vshape(1) = asize(2)
2515
call ARMCI_NbPut_fa(a2, src_slice, b2, dst_slice, remote_proc, rc)
2516
call ARMCI_Waitall_fa()
2520
print *,me,': ARMCI_NbPut_fa for 2D C4, m = ',m,' failed, rc = ',rc
2523
! Check that received b2 is the piece of the sent a2.
2525
! call check_b(rank,reshape(b2,vshape),dst_slice,src_slice,remote_proc, &
2526
! call check_b(rank,b2,dst_slice,src_slice,remote_proc, &
2527
v(1:asize(2)) = reshape(b2,vshape)
2529
call check_b(rank,v,dst_slice,src_slice,remote_proc, &
2530
& lb,ub,lb,ub,joff,pass)
2531
score(2) = score(2) + pass
2532
if (pass .ne. 1) then
2533
print *,me,': ARMCI_NbPut_fa verify for 2D C4, m = ',m,' failed'
2540
vshape(1) = asize(3)
2541
call ARMCI_NbPut_fa(a3, src_slice, b3, dst_slice, remote_proc, rc)
2542
call ARMCI_Waitall_fa()
2546
print *,me,': ARMCI_NbPut_fa for 3D C4, m = ',m,' failed, rc = ',rc
2549
! Check that received b3 is the piece of the sent a3.
2551
v(1:asize(3)) = reshape(b3,vshape)
2552
call check_b(rank,v,dst_slice,src_slice,remote_proc, &
2553
& lb,ub,lb,ub,joff,pass)
2554
score(3) = score(3) + pass
2555
if (pass .ne. 1) then
2556
print *,me,': ARMCI_NbPut_fa verify for 3D C4, m = ',m,' failed'
2563
vshape(1) = asize(4)
2564
call ARMCI_NbPut_fa(a4, src_slice, b4, dst_slice, remote_proc, rc)
2565
call ARMCI_Waitall_fa()
2569
print *,me,': ARMCI_NbPut_fa for 4D C4, m = ',m,' failed, rc = ',rc
2572
! Check that received b4 is the piece of the sent a4.
2574
v(1:asize(4)) = reshape(b4,vshape)
2575
call check_b(rank,v,dst_slice,src_slice,remote_proc, &
2576
& lb,ub,lb,ub,joff,pass)
2577
score(4) = score(4) + pass
2578
if (pass .ne. 1) then
2579
print *,me,': ARMCI_NbPut_fa verify for 4D C4, m = ',m,' failed'
2586
vshape(1) = asize(5)
2587
call ARMCI_NbPut_fa(a5, src_slice, b5, dst_slice, remote_proc, rc)
2588
call ARMCI_Waitall_fa()
2592
print *,me,': ARMCI_NbPut_fa for 5D C4, m = ',m,' failed, rc = ',rc
2595
! Check that received b5 is the piece of the sent a5.
2597
v(1:asize(5)) = reshape(b5,vshape)
2598
call check_b(rank,v,dst_slice,src_slice,remote_proc, &
2599
& lb,ub,lb,ub,joff,pass)
2600
score(5) = score(5) + pass
2601
if (pass .ne. 1) then
2602
print *,me,': ARMCI_NbPut_fa verify for 4D C4, m = ',m,' failed'
2609
vshape(1) = asize(6)
2610
call ARMCI_NbPut_fa(a6, src_slice, b6, dst_slice, remote_proc, rc)
2611
call ARMCI_Waitall_fa()
2615
print *,me,': ARMCI_NbPut_fa for 6D C4, m = ',m,' failed, rc = ',rc
2618
! Check that received b6 is the piece of the sent a6
2620
v(1:asize(6)) = reshape(b6,vshape)
2621
call check_b(rank,v,dst_slice,src_slice,remote_proc, &
2622
& lb,ub,lb,ub,joff,pass)
2623
score(6) = score(6) + pass
2624
if (pass .ne. 1) then
2625
print *,me,': ARMCI_NbPut_fa verify for 6D C4, m = ',m,' failed'
2632
vshape(1) = asize(7)
2633
call ARMCI_NbPut_fa(a7, src_slice, b7, dst_slice, remote_proc, rc)
2634
call ARMCI_Waitall_fa()
2638
print *,me,': ARMCI_NbPut_fa for 7D C4, m = ',m,' failed, rc = ',rc
2641
! Check that received b7 is the piece of the sent a7
2643
v(1:asize(7)) = reshape(b7,vshape)
2644
call check_b(rank,v,dst_slice,src_slice,remote_proc, &
2645
& lb,ub,lb,ub,joff,pass)
2646
score(7) = score(7) + pass
2647
if (pass .ne. 1) then
2648
print *,me,': ARMCI_NbPut_fa verify for 7D C4, m = ',m,' failed'
2655
if (score(m) .eq. 3) then
2656
print *,' ARMCI_NbPut_fa for C4, ',m,'D passed'
2664
joff = (remote_proc + 1)*(remote_proc+1)
2667
! Initialize arrays.
2669
call init_7d(a7,b7,lb,ub,lb,ub,afirst,bfirst)
2670
a6 = a7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),lb(6):ub(6),1)
2671
a5 = a7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),1,1)
2672
a4 = a7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),1,1,1)
2673
a3 = a7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),1,1,1,1)
2674
a2 = a7(lb(1):ub(1),lb(2):ub(2),1,1,1,1,1)
2675
a1 = a7(lb(1):ub(1),1,1,1,1,1,1)
2676
b6 = b7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),lb(6):ub(6),1)
2677
b5 = b7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),1,1)
2678
b4 = b7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),1,1,1)
2679
b3 = b7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),1,1,1,1)
2680
b2 = b7(lb(1):ub(1),lb(2):ub(2),1,1,1,1,1)
2681
b1 = b7(lb(1):ub(1),1,1,1,1,1,1)
2683
! Let all processors get initialized.
2687
! Set up slice info for the get.
2689
! For m = 1, the slice has all unit strides.
2690
! For m = 2, the first dimension has a unit stride and all other
2691
! dimensions have a stride of 2.
2692
! For m = 3, all dimensions have a stride of 2.
2696
src_slice%stride(:) = (m+2)/2
2697
src_slice%stride(1) = (m+1)/2
2701
dst_slice%stride(:) = (m+2)/2
2702
dst_slice%stride(1) = (m+1)/2
2707
call ARMCI_NbGet_fa(b1, dst_slice, a1, src_slice, remote_proc, rc)
2708
call ARMCI_Waitall_fa()
2712
! Check that recieved a is the piece of b that was sent.
2714
call check_b(rank,a1,src_slice,dst_slice,remote_proc, &
2715
& lb,ub,lb,ub,joff,pass)
2716
score(1) = score(1) + pass
2717
if (pass .ne. 1) then
2718
print *,me,': ARMCI_NbGet_fa verify for 1D C4, m = ',m,' failed'
2726
vshape(1) = asize(2)
2727
call ARMCI_NbGet_fa(b2, dst_slice, a2, src_slice, remote_proc, rc)
2728
call ARMCI_Waitall_fa()
2732
! Check that recieved a is the piece of b that was sent.
2734
v(1:asize(2)) = reshape(a2,vshape)
2735
call check_b(rank,v,src_slice,dst_slice,remote_proc, &
2736
& lb,ub,lb,ub,joff,pass)
2737
score(2) = score(2) + pass
2738
if (pass .ne. 1) then
2739
print *,me,': ARMCI_NbGet_fa verify for 2D C4, m = ',m,' failed'
2747
vshape(1) = asize(3)
2748
call ARMCI_NbGet_fa(b3, dst_slice, a3, src_slice, remote_proc, rc)
2749
call ARMCI_Waitall_fa()
2753
! Check that recieved a is the piece of b that was sent.
2755
v(1:asize(3)) = reshape(a3,vshape)
2756
call check_b(rank,v,src_slice,dst_slice,remote_proc, &
2757
& lb,ub,lb,ub,joff,pass)
2758
score(3) = score(3) + pass
2759
if (pass .ne. 1) then
2760
print *,me,': ARMCI_NbGet_fa verify for 3D C4, m = ',m,' failed'
2768
vshape(1) = asize(4)
2769
call ARMCI_NbGet_fa(b4, dst_slice, a4, src_slice, remote_proc, rc)
2770
call ARMCI_Waitall_fa()
2774
! Check that recieved a is the piece of b that was sent.
2776
v(1:asize(4)) = reshape(a4,vshape)
2777
call check_b(rank,v,src_slice,dst_slice,remote_proc, &
2778
& lb,ub,lb,ub,joff,pass)
2779
score(4) = score(4) + pass
2780
if (pass .ne. 1) then
2781
print *,me,': ARMCI_NbGet_fa verify for 4D C4, m = ',m,' failed'
2789
vshape(1) = asize(5)
2790
call ARMCI_NbGet_fa(b5, dst_slice, a5, src_slice, remote_proc, rc)
2791
call ARMCI_Waitall_fa()
2795
! Check that recieved a is the piece of b that was sent.
2797
v(1:asize(5)) = reshape(a5,vshape)
2798
call check_b(rank,v,src_slice,dst_slice,remote_proc, &
2799
& lb,ub,lb,ub,joff,pass)
2800
score(5) = score(5) + pass
2801
if (pass .ne. 1) then
2802
print *,me,': ARMCI_NbGet_fa verify for 5D C4, m = ',m,' failed'
2810
vshape(1) = asize(6)
2811
call ARMCI_NbGet_fa(b6, dst_slice, a6, src_slice, remote_proc, rc)
2812
call ARMCI_Waitall_fa()
2816
! Check that recieved a is the piece of b that was sent.
2818
v(1:asize(6)) = reshape(a6,vshape)
2819
call check_b(rank,v,src_slice,dst_slice,remote_proc, &
2820
& lb,ub,lb,ub,joff,pass)
2821
score(6) = score(6) + pass
2822
if (pass .ne. 1) then
2823
print *,me,': ARMCI_NbGet_fa verify for 6D C4, m = ',m,' failed'
2831
vshape(1) = asize(7)
2832
call ARMCI_NbGet_fa(b7, dst_slice, a7, src_slice, remote_proc, rc)
2833
call ARMCI_Waitall_fa()
2837
! Check that recieved a is the piece of b that was sent.
2839
v(1:asize(7)) = reshape(a7,vshape)
2840
call check_b(rank,v,src_slice,dst_slice,remote_proc, &
2841
& lb,ub,lb,ub,joff,pass)
2842
score(7) = score(7) + pass
2843
if (pass .ne. 1) then
2844
print *,me,': ARMCI_NbGet_fa verify for 7D C4, m = ',m,' failed'
2851
if (score(m) .eq. 3) then
2852
print *,' ARMCI_NbGet_fa for C4, ',m,'D passed'
2857
! Free v, a and b arrays.
2860
call ARMCI_Free_fa(v, rc)
2861
call ARMCI_Free_fa(a1, rc)
2862
call ARMCI_Free_fa(b1, rc)
2863
call ARMCI_Free_fa(a2, rc)
2864
call ARMCI_Free_fa(b2, rc)
2865
call ARMCI_Free_fa(a3, rc)
2866
call ARMCI_Free_fa(b3, rc)
2867
call ARMCI_Free_fa(a4, rc)
2868
call ARMCI_Free_fa(b4, rc)
2869
call ARMCI_Free_fa(a5, rc)
2870
call ARMCI_Free_fa(b5, rc)
2871
call ARMCI_Free_fa(a6, rc)
2872
call ARMCI_Free_fa(b6, rc)
2873
call ARMCI_Free_fa(a7, rc)
2874
call ARMCI_Free_fa(b7, rc)
2879
subroutine testanb_c8(nproc,me,remote_proc)
2887
type(ARMCI_slice) :: src_slice, dst_slice
2888
integer :: nproc,me,remote_proc
2889
complex(kind=C8), pointer :: a7(:,:,:,:,:,:,:), b7(:,:,:,:,:,:,:)
2890
complex(kind=C8), pointer :: a6(:,:,:,:,:,:), b6(:,:,:,:,:,:)
2891
complex(kind=C8), pointer :: a5(:,:,:,:,:), b5(:,:,:,:,:)
2892
complex(kind=C8), pointer :: a4(:,:,:,:), b4(:,:,:,:)
2893
complex(kind=C8), pointer :: a3(:,:,:), b3(:,:,:)
2894
complex(kind=C8), pointer :: a2(:,:), b2(:,:)
2895
complex(kind=C8), pointer :: a1(:), b1(:)
2896
complex(kind=C8), pointer :: v(:)
2898
integer :: lb(7), ub(7), rc, i, j
2904
integer :: vshape(1)
2905
integer :: extent(7)
2908
integer :: vlb(1),vub(1)
2909
integer :: afirst,bfirst
2912
bfirst = afirst*afirst
2919
extent(:) = extent(:) + ub(:) - lb(:)
2920
asize(1) = extent(1)
2922
asize(m) = asize(m-1)*extent(m)
2928
call ARMCI_Malloc_fa(v,vlb,vub,rc)
2930
print *,' ARMCI_Malloc_fa for v failed rc = ',rc
2934
call ARMCI_Malloc_fa(a7, lb, ub, rc)
2936
print *,' ARMCI_Malloc_fa for a7 failed rc = ',rc
2940
call ARMCI_Malloc_fa(b7, lb, ub, rc)
2942
print *,' ARMCI_Malloc_fa for b7 failed rc = ',rc
2946
call ARMCI_Malloc_fa(a6, lb, ub, rc)
2948
print *,' ARMCI_Malloc_fa for a6 failed rc = ',rc
2952
call ARMCI_Malloc_fa(b6, lb, ub, rc)
2954
print *,' ARMCI_Malloc_fa for b6 failed rc = ',rc
2958
call ARMCI_Malloc_fa(a5, lb, ub, rc)
2960
print *,' ARMCI_Malloc_fa for a5 failed rc = ',rc
2964
call ARMCI_Malloc_fa(b5, lb, ub, rc)
2966
print *,' ARMCI_Malloc_fa for b5 failed rc = ',rc
2970
call ARMCI_Malloc_fa(a4, lb, ub, rc)
2972
print *,' ARMCI_Malloc_fa for a4 failed rc = ',rc
2976
call ARMCI_Malloc_fa(b4, lb, ub, rc)
2978
print *,' ARMCI_Malloc_fa for b4 failed rc = ',rc
2982
call ARMCI_Malloc_fa(a3, lb, ub, rc)
2984
print *,' ARMCI_Malloc_fa for a3 failed rc = ',rc
2988
call ARMCI_Malloc_fa(b3, lb, ub, rc)
2990
print *,' ARMCI_Malloc_fa for b3 failed rc = ',rc
2994
call ARMCI_Malloc_fa(a2, lb, ub, rc)
2996
print *,' ARMCI_Malloc_fa for a2 failed rc = ',rc
3000
call ARMCI_Malloc_fa(b2, lb, ub, rc)
3002
print *,' ARMCI_Malloc_fa for b2 failed rc = ',rc
3006
call ARMCI_Malloc_fa(a1, lb, ub, rc)
3008
print *,' ARMCI_Malloc_fa for a1 failed rc = ',rc
3012
call ARMCI_Malloc_fa(b1, lb, ub, rc)
3014
print *,' ARMCI_Malloc_fa for b1 failed rc = ',rc
3018
! Let all processors get alloccated.
3022
! C8 allocations done, now loop over slices.
3023
! We will test three flavors of slices,
3024
! all unit stride, unit stride in the first dimension only,
3025
! all non-unit stride (2).
3027
joff = remote_proc + 1
3032
! Initialize arrays.
3034
call init_7d(a7,b7,lb,ub,lb,ub,afirst,bfirst)
3035
a6(:,:,:,:,:,:) = a7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),lb(6):ub(6),1)
3036
a5(:,:,:,:,:) = a7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),1,1)
3037
a4(:,:,:,:) = a7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),1,1,1)
3038
a3(:,:,:) = a7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),1,1,1,1)
3039
a2(:,:) = a7(lb(1):ub(1),lb(2):ub(2),1,1,1,1,1)
3040
a1(:) = a7(lb(1):ub(1),1,1,1,1,1,1)
3041
b6(:,:,:,:,:,:) = b7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),lb(6):ub(6),1)
3042
b5(:,:,:,:,:) = b7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),1,1)
3043
b4(:,:,:,:) = b7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),1,1,1)
3044
b3(:,:,:) = b7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),1,1,1,1)
3045
b2(:,:) = b7(lb(1):ub(1),lb(2):ub(2),1,1,1,1,1)
3046
b1(:) = b7(lb(1):ub(1),1,1,1,1,1,1)
3048
! Let all processors get initialized.
3052
! Set up slice info for the put.
3054
! For m = 1, the slice has all unit strides.
3055
! For m = 2, the first dimension has a unit stride and all other
3056
! dimensions have a stride of 2.
3057
! For m = 3, all dimensions have a stride of 2.
3063
src_slice%stride(:) = (m+2)/2
3064
src_slice%stride(1) = (m+1)/2
3070
dst_slice%stride(:) = (m+2)/2
3071
dst_slice%stride(1) = (m+1)/2
3075
call ARMCI_NbPut_fa(a1, src_slice, b1, dst_slice, remote_proc, rc)
3076
call ARMCI_Waitall_fa()
3080
print *,me,': ARMCI_NbPut_fa for 1D C8, m = ',m,' failed, rc = ',rc
3083
! Check that received b1 is the piece of the sent a1.
3085
call check_b(rank,b1,dst_slice,src_slice,remote_proc, &
3086
& lb,ub,lb,ub,joff,pass)
3087
score(1) = score(1) + pass
3088
if (pass .ne. 1) then
3089
print *,me,': ARMCI_NbPut_fa verify for 1D C8, m = ',m,' failed'
3096
vshape(1) = asize(2)
3097
call ARMCI_NbPut_fa(a2, src_slice, b2, dst_slice, remote_proc, rc)
3098
call ARMCI_Waitall_fa()
3102
print *,me,': ARMCI_NbPut_fa for 2D C8, m = ',m,' failed, rc = ',rc
3105
! Check that received b2 is the piece of the sent a2.
3107
! call check_b(rank,reshape(b2,vshape),dst_slice,src_slice,remote_proc, &
3108
! call check_b(rank,b2,dst_slice,src_slice,remote_proc, &
3109
v(1:asize(2)) = reshape(b2,vshape)
3111
call check_b(rank,v,dst_slice,src_slice,remote_proc, &
3112
& lb,ub,lb,ub,joff,pass)
3113
score(2) = score(2) + pass
3114
if (pass .ne. 1) then
3115
print *,me,': ARMCI_NbPut_fa verify for 2D C8, m = ',m,' failed'
3122
vshape(1) = asize(3)
3123
call ARMCI_NbPut_fa(a3, src_slice, b3, dst_slice, remote_proc, rc)
3124
call ARMCI_Waitall_fa()
3128
print *,me,': ARMCI_NbPut_fa for 3D C8, m = ',m,' failed, rc = ',rc
3131
! Check that received b3 is the piece of the sent a3.
3133
v(1:asize(3)) = reshape(b3,vshape)
3134
call check_b(rank,v,dst_slice,src_slice,remote_proc, &
3135
& lb,ub,lb,ub,joff,pass)
3136
score(3) = score(3) + pass
3137
if (pass .ne. 1) then
3138
print *,me,': ARMCI_NbPut_fa verify for 3D C8, m = ',m,' failed'
3145
vshape(1) = asize(4)
3146
call ARMCI_NbPut_fa(a4, src_slice, b4, dst_slice, remote_proc, rc)
3147
call ARMCI_Waitall_fa()
3151
print *,me,': ARMCI_NbPut_fa for 4D C8, m = ',m,' failed, rc = ',rc
3154
! Check that received b4 is the piece of the sent a4.
3156
v(1:asize(4)) = reshape(b4,vshape)
3157
call check_b(rank,v,dst_slice,src_slice,remote_proc, &
3158
& lb,ub,lb,ub,joff,pass)
3159
score(4) = score(4) + pass
3160
if (pass .ne. 1) then
3161
print *,me,': ARMCI_NbPut_fa verify for 4D C8, m = ',m,' failed'
3168
vshape(1) = asize(5)
3169
call ARMCI_NbPut_fa(a5, src_slice, b5, dst_slice, remote_proc, rc)
3170
call ARMCI_Waitall_fa()
3174
print *,me,': ARMCI_NbPut_fa for 5D C8, m = ',m,' failed, rc = ',rc
3177
! Check that received b5 is the piece of the sent a5.
3179
v(1:asize(5)) = reshape(b5,vshape)
3180
call check_b(rank,v,dst_slice,src_slice,remote_proc, &
3181
& lb,ub,lb,ub,joff,pass)
3182
score(5) = score(5) + pass
3183
if (pass .ne. 1) then
3184
print *,me,': ARMCI_NbPut_fa verify for 4D C8, m = ',m,' failed'
3191
vshape(1) = asize(6)
3192
call ARMCI_NbPut_fa(a6, src_slice, b6, dst_slice, remote_proc, rc)
3193
call ARMCI_Waitall_fa()
3197
print *,me,': ARMCI_NbPut_fa for 6D C8, m = ',m,' failed, rc = ',rc
3200
! Check that received b6 is the piece of the sent a6
3202
v(1:asize(6)) = reshape(b6,vshape)
3203
call check_b(rank,v,dst_slice,src_slice,remote_proc, &
3204
& lb,ub,lb,ub,joff,pass)
3205
score(6) = score(6) + pass
3206
if (pass .ne. 1) then
3207
print *,me,': ARMCI_NbPut_fa verify for 6D C8, m = ',m,' failed'
3214
vshape(1) = asize(7)
3215
call ARMCI_NbPut_fa(a7, src_slice, b7, dst_slice, remote_proc, rc)
3216
call ARMCI_Waitall_fa()
3220
print *,me,': ARMCI_NbPut_fa for 7D C8, m = ',m,' failed, rc = ',rc
3223
! Check that received b7 is the piece of the sent a7
3225
v(1:asize(7)) = reshape(b7,vshape)
3226
call check_b(rank,v,dst_slice,src_slice,remote_proc, &
3227
& lb,ub,lb,ub,joff,pass)
3228
score(7) = score(7) + pass
3229
if (pass .ne. 1) then
3230
print *,me,': ARMCI_NbPut_fa verify for 7D C8, m = ',m,' failed'
3237
if (score(m) .eq. 3) then
3238
print *,' ARMCI_NbPut_fa for C8, ',m,'D passed'
3246
joff = (remote_proc + 1)*(remote_proc+1)
3249
! Initialize arrays.
3251
call init_7d(a7,b7,lb,ub,lb,ub,afirst,bfirst)
3252
a6 = a7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),lb(6):ub(6),1)
3253
a5 = a7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),1,1)
3254
a4 = a7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),1,1,1)
3255
a3 = a7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),1,1,1,1)
3256
a2 = a7(lb(1):ub(1),lb(2):ub(2),1,1,1,1,1)
3257
a1 = a7(lb(1):ub(1),1,1,1,1,1,1)
3258
b6 = b7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),lb(6):ub(6),1)
3259
b5 = b7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),lb(5):ub(5),1,1)
3260
b4 = b7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),1,1,1)
3261
b3 = b7(lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),1,1,1,1)
3262
b2 = b7(lb(1):ub(1),lb(2):ub(2),1,1,1,1,1)
3263
b1 = b7(lb(1):ub(1),1,1,1,1,1,1)
3265
! Let all processors get initialized.
3269
! Set up slice info for the get.
3271
! For m = 1, the slice has all unit strides.
3272
! For m = 2, the first dimension has a unit stride and all other
3273
! dimensions have a stride of 2.
3274
! For m = 3, all dimensions have a stride of 2.
3280
src_slice%stride(:) = (m+2)/2
3281
src_slice%stride(1) = (m+1)/2
3287
dst_slice%stride(:) = (m+2)/2
3288
dst_slice%stride(1) = (m+1)/2
3293
call ARMCI_NbGet_fa(b1, dst_slice, a1, src_slice, remote_proc, rc)
3294
call ARMCI_Waitall_fa()
3298
! Check that recieved a is the piece of b that was sent.
3300
call check_b(rank,a1,src_slice,dst_slice,remote_proc, &
3301
& lb,ub,lb,ub,joff,pass)
3302
score(1) = score(1) + pass
3303
if (pass .ne. 1) then
3304
print *,me,': ARMCI_NbGet_fa verify for 1D C8, m = ',m,' failed'
3312
vshape(1) = asize(2)
3313
call ARMCI_NbGet_fa(b2, dst_slice, a2, src_slice, remote_proc, rc)
3314
call ARMCI_Waitall_fa()
3318
! Check that recieved a is the piece of b that was sent.
3320
v(1:asize(2)) = reshape(a2,vshape)
3321
call check_b(rank,v,src_slice,dst_slice,remote_proc, &
3322
& lb,ub,lb,ub,joff,pass)
3323
score(2) = score(2) + pass
3324
if (pass .ne. 1) then
3325
print *,me,': ARMCI_NbGet_fa verify for 2D C8, m = ',m,' failed'
3333
vshape(1) = asize(3)
3334
call ARMCI_NbGet_fa(b3, dst_slice, a3, src_slice, remote_proc, rc)
3335
call ARMCI_Waitall_fa()
3339
! Check that recieved a is the piece of b that was sent.
3341
v(1:asize(3)) = reshape(a3,vshape)
3342
call check_b(rank,v,src_slice,dst_slice,remote_proc, &
3343
& lb,ub,lb,ub,joff,pass)
3344
score(3) = score(3) + pass
3345
if (pass .ne. 1) then
3346
print *,me,': ARMCI_NbGet_fa verify for 3D C8, m = ',m,' failed'
3354
vshape(1) = asize(4)
3355
call ARMCI_NbGet_fa(b4, dst_slice, a4, src_slice, remote_proc, rc)
3356
call ARMCI_Waitall_fa()
3360
! Check that recieved a is the piece of b that was sent.
3362
v(1:asize(4)) = reshape(a4,vshape)
3363
call check_b(rank,v,src_slice,dst_slice,remote_proc, &
3364
& lb,ub,lb,ub,joff,pass)
3365
score(4) = score(4) + pass
3366
if (pass .ne. 1) then
3367
print *,me,': ARMCI_NbGet_fa verify for 4D C8, m = ',m,' failed'
3375
vshape(1) = asize(5)
3376
call ARMCI_NbGet_fa(b5, dst_slice, a5, src_slice, remote_proc, rc)
3377
call ARMCI_Waitall_fa()
3381
! Check that recieved a is the piece of b that was sent.
3383
v(1:asize(5)) = reshape(a5,vshape)
3384
call check_b(rank,v,src_slice,dst_slice,remote_proc, &
3385
& lb,ub,lb,ub,joff,pass)
3386
score(5) = score(5) + pass
3387
if (pass .ne. 1) then
3388
print *,me,': ARMCI_NbGet_fa verify for 5D C8, m = ',m,' failed'
3396
vshape(1) = asize(6)
3397
call ARMCI_NbGet_fa(b6, dst_slice, a6, src_slice, remote_proc, rc)
3398
call ARMCI_Waitall_fa()
3402
! Check that recieved a is the piece of b that was sent.
3404
v(1:asize(6)) = reshape(a6,vshape)
3405
call check_b(rank,v,src_slice,dst_slice,remote_proc, &
3406
& lb,ub,lb,ub,joff,pass)
3407
score(6) = score(6) + pass
3408
if (pass .ne. 1) then
3409
print *,me,': ARMCI_NbGet_fa verify for 6D C8, m = ',m,' failed'
3417
vshape(1) = asize(7)
3418
call ARMCI_NbGet_fa(b7, dst_slice, a7, src_slice, remote_proc, rc)
3419
call ARMCI_Waitall_fa()
3423
! Check that recieved a is the piece of b that was sent.
3425
v(1:asize(7)) = reshape(a7,vshape)
3426
call check_b(rank,v,src_slice,dst_slice,remote_proc, &
3427
& lb,ub,lb,ub,joff,pass)
3428
score(7) = score(7) + pass
3429
if (pass .ne. 1) then
3430
print *,me,': ARMCI_NbGet_fa verify for 7D C8, m = ',m,' failed'
3437
if (score(m) .eq. 3) then
3438
print *,' ARMCI_NbGet_fa for C8, ',m,'D passed'
3443
! Free v, a and b arrays.
3446
call ARMCI_Free_fa(v, rc)
3447
call ARMCI_Free_fa(a1, rc)
3448
call ARMCI_Free_fa(b1, rc)
3449
call ARMCI_Free_fa(a2, rc)
3450
call ARMCI_Free_fa(b2, rc)
3451
call ARMCI_Free_fa(a3, rc)
3452
call ARMCI_Free_fa(b3, rc)
3453
call ARMCI_Free_fa(a4, rc)
3454
call ARMCI_Free_fa(b4, rc)
3455
call ARMCI_Free_fa(a5, rc)
3456
call ARMCI_Free_fa(b5, rc)
3457
call ARMCI_Free_fa(a6, rc)
3458
call ARMCI_Free_fa(b6, rc)
3459
call ARMCI_Free_fa(a7, rc)
3460
call ARMCI_Free_fa(b7, rc)