devito icon indicating copy to clipboard operation
devito copied to clipboard

Using pgc++(nvc++) with PGI(NVidia) compiler instead of pgcc(nvc)

Open FabioLuporini opened this issue 4 years ago • 1 comments

pgcc doesn't swallow the following

float (*restrict buf)[buf_y_size] __attribute__ ((aligned (64))) = (float (*)[buf_y_size]) buf_vec;

when the variable buf_y_size is of type const int. No matter what C we compile for (c99 and later)

pgc++ accepts it instead. So currently:

  • we wrap the entry point in C with
extern "C" {
int Kernel( ...) {
  ...
}
}
  • we use pgc++ instead of pgcc

FabioLuporini avatar Apr 08 '20 06:04 FabioLuporini

update: same applies to nvc++ vs nvc (which inherit from pgcc++/pgcc, so really no surprise)

FabioLuporini avatar Oct 20 '21 08:10 FabioLuporini