Hello,
I am beginner in programming with OpenAcc
I am using pgi 14.4 and i think it works with OpenAcc 2.0 (namely the tile clause)
I tried to compile the laplace2d.c code by adding the tile clause but it doesn’t work!
I have replaced this part of code
#pragma acc kernels
#pragma acc loop gang, vector(4)
for( int j = 1; j < n-1; j++)
{
#pragma acc loop //gang, vector(64)
for( int i = 1; i < m-1; i++ )
{
// A[j][i] = Anew[j][i];
A[j][i] = 0.25f * ( Anew[j][i+1] + Anew[j][i-1]
+ Anew[j-1][i] + Anew[j+1][i]);
}
}
iter++;iter++;
}
by this one
#pragma acc kernels
#pragma acc loop tile(8,16) gang vector //gang, vector(4)
for( int j = 1; j < n-1; j++)
{
//#pragma acc loop //gang, vector(64)
for( int i = 1; i < m-1; i++ )
{
// A[j][i] = Anew[j][i];
A[j][i] = 0.25f * ( Anew[j][i+1] + Anew[j][i-1]
+ Anew[j-1][i] + Anew[j+1][i]);
}
}
iter++;iter++;
}
and it returns the following lines :
x_gargourif@c4hdn:v7$ make
pgcc -I…/common -acc -ta=nvidia,time -Minfo=accel -o laplace2d_acc laplace2d.c
PGC-S-0035-Syntax error: Recovery attempted by replacing identifier tile by keyword cache (laplace2d.c: 73)
PGC-S-0032-Syntax error: Unexpected input at identifier gang (laplace2d.c: 73)
PGC-S-0029-Syntax error: Recovery attempted by deleting from identifier gang on line 73 through identifier vector on line 73 (laplace2d.c)
PGC/x86-64 Linux 14.4-0: compilation completed with severe errors
make: *** [laplace2d_acc] Error 2
Could any helps me please