Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Tests/acc_attach.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ int test1(){

#pragma acc enter data copyin(data.a[0:n], data.b[0:n])
#pragma acc enter data copyin(data)
acc_attach(&data.a);
acc_attach(&data.b);
acc_attach((void**)&data.a);
acc_attach((void**)&data.b);

#pragma acc parallel loop default(present)
for(int x = 0; x < n; ++x){
data.a[x] = data.a[x] * 2;
}

acc_detach(&data.a);
acc_detach(&data.b);
acc_detach((void**)&data.a);
acc_detach((void**)&data.b);
#pragma acc exit data copyout(data.a[0:n], data.b[0:n])
#pragma acc exit data copyout(data)

Expand Down Expand Up @@ -65,8 +65,8 @@ int test2(){
data.a[x] = data.a[x] * 2;
}

acc_detach(&data.a);
acc_detach(&data.b);
acc_detach((void**)&data.a);
acc_detach((void**)&data.b);
#pragma acc exit data copyout(data.a[0:n], data.b[0:n])
#pragma acc exit data copyout(data)

Expand Down
4 changes: 2 additions & 2 deletions Tests/acc_create_with_len.F90
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ LOGICAL FUNCTION test1()

!Initilization
SEEDDIM(1) = 1
#ifdef SEED
# ifdef SEED
SEEDDIM(1) = SEED
#endif
# endif
CALL RANDOM_SEED(PUT=SEEDDIM)
CALL RANDOM_NUMBER(a)
CALL RANDOM_NUMBER(b)
Expand Down
12 changes: 6 additions & 6 deletions Tests/acc_detach.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ int test1(){

#pragma acc enter data copyin(data.a[0:n], data.b[0:n])
#pragma acc enter data copyin(data)
acc_attach(&data.a);
acc_attach(&data.b);
acc_attach((void**)&data.a);
acc_attach((void**)&data.b);

#pragma acc parallel loop default(present)
for(int x = 0; x < n; ++x){
data.a[x] = data.a[x] * 2;
}

acc_detach(&data.a);
acc_detach(&data.b);
acc_detach((void**)&data.a);
acc_detach((void**)&data.b);
#pragma acc exit data copyout(data.a[0:n], data.b[0:n])
#pragma acc exit data copyout(data)

Expand Down Expand Up @@ -59,8 +59,8 @@ int test2(){

#pragma acc enter data copyin(data.a[0:n], data.b[0:n])
#pragma acc enter data copyin(data)
acc_attach(&data.a);
acc_attach(&data.b);
acc_attach((void**)&data.a);
acc_attach((void**)&data.b);

#pragma acc parallel loop default(present)
for(int x = 0; x < n; ++x){
Expand Down
4 changes: 2 additions & 2 deletions Tests/acc_deviceptr.F90
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ LOGICAL FUNCTION test1()

!Initilization
SEEDDIM(1) = 1
#ifdef SEED
# ifdef SEED
SEEDDIM(1) = SEED
#endif
# endif
CALL RANDOM_SEED(PUT=SEEDDIM)

CALL RANDOM_NUMBER(a)
Expand Down
4 changes: 2 additions & 2 deletions Tests/acc_map_data.F90
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ LOGICAL FUNCTION test1()
INTEGER :: x,i
!Initilization
SEEDDIM(1) = 1
#ifdef SEED
# ifdef SEED
SEEDDIM(1) = SEED
#endif
# endif
CALL RANDOM_SEED(PUT=SEEDDIM)

CALL RANDOM_NUMBER(a)
Expand Down
4 changes: 2 additions & 2 deletions Tests/acc_unmap_data.F90
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ LOGICAL FUNCTION test1()

!Initilization
SEEDDIM(1) = 1
#ifdef SEED
# ifdef SEED
SEEDDIM(1) = SEED
#endif
# endif
CALL RANDOM_SEED(PUT=SEEDDIM)

CALL RANDOM_NUMBER(a)
Expand Down
2 changes: 1 addition & 1 deletion Tests/atomic_expr_neqv_x.F90
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ LOGICAL FUNCTION test1()
END DO

DO x = 1, LOOPCOUNT
IF (totals_comparison(x) .NE. totals(x)) THEN
IF (totals_comparison(x) .NEV. totals(x)) THEN
errors = errors + 1
WRITE(*, *) totals_comparison(x)
END IF
Expand Down
4 changes: 2 additions & 2 deletions Tests/enter_data_attach.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ int test1(){
data.a[x] = data.a[x] * 2;
}

acc_detach(&data.a);
acc_detach(&data.b);
acc_detach((void**)&data.a);
acc_detach((void**)&data.b);
#pragma acc exit data copyout(data.a[0:n], data.b[0:n])
#pragma acc exit data copyout(data)

Expand Down
4 changes: 2 additions & 2 deletions Tests/exit_data_detach.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ int test1(){

#pragma acc enter data copyin(data.a[0:n], data.b[0:n])
#pragma acc enter data copyin(data)
acc_attach(&data.a);
acc_attach(&data.b);
acc_attach((void**)&data.a);
acc_attach((void**)&data.b);

#pragma acc parallel loop default(present)
for(int x = 0; x < n; ++x){
Expand Down
2 changes: 1 addition & 1 deletion Tests/kernels_if.F90
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ LOGICAL FUNCTION test4()
# endif
CALL RANDOM_SEED(PUT=SEEDDIM)

IF (devtest(1) .eq. 1) THEN
IF (devtest(1)) THEN
CALL RANDOM_NUMBER(a)
b = 0

Expand Down
25 changes: 13 additions & 12 deletions Tests/kernels_loop.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
LOGICAL FUNCTION test1()
IMPLICIT NONE
INCLUDE "acc_testsuite.Fh"
INTEGER :: x, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9 !Iterators
INTEGER :: x, x_0, x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9 !Iterators
REAL(8),DIMENSION(1024):: a, b !Data
INTEGER :: errors = 0

Expand All @@ -20,26 +20,27 @@ LOGICAL FUNCTION test1()
!$acc data copyin(a(1:1024)) copyout(b(1:1024))
!$acc kernels
!$acc loop
DO _0 = 0, 1
DO x_0 = 0, 1
!$acc loop
DO _1 = 0, 1
DO x_1 = 0, 1
!$acc loop
DO _2 = 0, 1
DO x_2 = 0, 1
!$acc loop
DO _3 = 0, 1
DO x_3 = 0, 1
!$acc loop
DO _4 = 0, 1
DO x_4 = 0, 1
!$acc loop
DO _5 = 0, 1
DO x_5 = 0, 1
!$acc loop
DO _6 = 0, 1
DO x_6 = 0, 1
!$acc loop
DO _7 = 0, 1
DO x_7 = 0, 1
!$acc loop
DO _8 = 0, 1
DO x_8 = 0, 1
!$acc loop
DO _9 = 1, 2
b(_0*512+_1*256+_2*128+_3*64+_4*32+_5*16+_6*8+_7*4+_8*2+_9)=a(_0*512+_1*256+_2*128+_3*64+_4*32+_5*16+_6*8+_7*4+_8*2+_9)
DO x_9 = 1, 2
b(x_0*512+x_1*256+x_2*128+x_3*64+x_4*32+x_5*16+x_6*8+x_7*4+x_8*2+x_9) &
= a(x_0*512+x_1*256+x_2*128+x_3*64+x_4*32+x_5*16+x_6*8+x_7*4+x_8*2+x_9)
END DO
END DO
END DO
Expand Down
2 changes: 1 addition & 1 deletion Tests/parallel_if.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ int test2(){
dev_test[0] = 0;
}

if (devtest[0] != 0){
if (dev_test[0] != 0){
for (int x = 0; x < n; ++x){
a[x] = rand() / (real_t)(RAND_MAX / 10);
b[x] = rand() / (real_t)(RAND_MAX / 10);
Expand Down
4 changes: 2 additions & 2 deletions Tests/serial_loop_gang_blocking.F90
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ LOGICAL FUNCTION test1()
errors = 0

SEEDDIM(1) = 1
# ifdef SEED
# ifdef SEED
SEEDDIM(1) = SEED
# endif
# endif
CALL RANDOM_SEED(PUT=SEEDDIM)

CALL RANDOM_NUMBER(a)
Expand Down
4 changes: 2 additions & 2 deletions Tests/serial_loop_reduction_bitand_vector_loop.F90
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ LOGICAL FUNCTION test1()
errors = 0
false_margin = exp(log(.5) / LOOPCOUNT)
SEEDDIM(1) = 1
#ifdef SEED
# ifdef SEED
SEEDDIM(1) = SEED
#endif
# endif
CALL RANDOM_SEED(PUT=SEEDDIM)

CALL RANDOM_NUMBER(randoms)
Expand Down
4 changes: 2 additions & 2 deletions Tests/serial_loop_reduction_bitor_vector_loop.F90
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ LOGICAL FUNCTION test1()
errors = 0
false_margin = exp(log(.5) / LOOPCOUNT)
SEEDDIM(1) = 1
#ifdef SEED
# ifdef SEED
SEEDDIM(1) = SEED
#endif
# endif
CALL RANDOM_SEED(PUT=SEEDDIM)

CALL RANDOM_NUMBER(randoms)
Expand Down
4 changes: 2 additions & 2 deletions Tests/serial_loop_reduction_max_general.F90
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ LOGICAL FUNCTION test1()
INTEGER:: errors, x

SEEDDIM(1) = 1
#ifdef SEED
# ifdef SEED
SEEDDIM(1) = SEED
#endif
# endif
CALL RANDOM_SEED(PUT=SEEDDIM)

CALL RANDOM_NUMBER(a)
Expand Down
4 changes: 2 additions & 2 deletions Tests/serial_loop_reduction_min_loop.F90
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ LOGICAL FUNCTION test1()
errors = 0

SEEDDIM(1) = 1
#ifdef SEED
# ifdef SEED
SEEDDIM(1) = SEED
#endif
# endif
CALL RANDOM_SEED(PUT=SEEDDIM)

CALL RANDOM_NUMBER(a)
Expand Down
4 changes: 2 additions & 2 deletions Tests/serial_loop_reduction_multiply_vector_loop.F90
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ LOGICAL FUNCTION test1()
errors = 0

SEEDDIM(1) = 1
#ifdef SEED
# ifdef SEED
SEEDDIM(1) = SEED
#endif
# endif
CALL RANDOM_SEED(PUT=SEEDDIM)

CALL RANDOM_NUMBER(a)
Expand Down
4 changes: 2 additions & 2 deletions Tests/serial_loop_reduction_or_loop.F90
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ LOGICAL FUNCTION test1()

errors = 0
SEEDDIM(1) = 1
#ifdef SEED
# ifdef SEED
SEEDDIM(1) = SEED
#endif
# endif
CALL RANDOM_SEED(PUT=SEEDDIM)

CALL RANDOM_NUMBER(randoms)
Expand Down