I have been trying to compile the example (without any editing) from Michael Wolfe’s article(http://www.pgroup.com/lit/articles/insider/v5n1a1.htm), but, I got error when executing the saxpy_test_data target in his Makefile. Here is the error message from pgc++ 13.2 compiler:
$ make saxpy_test_data pgc++ -fast -acc -Minfo=accel -c saxpy.cpp _Z5saxpyifPfS_: 1, Generating present_or_copy(y[0:n]) Generating present_or_copyin(n) Generating present_or_copyin(a) Generating present_or_copyin(x[0:n]) Accelerator kernel generated 3, #pragma acc loop gang, vector(256) /* blockIdx.x threadIdx.x */ 1, Generating NVIDIA code Generating compute capability 1.0 binary Generating compute capability 2.0 binary Generating compute capability 3.0 binary pgc++ -acc -O -c saxpy_main_data.cpp "saxpy_main_data.cpp", line 1: catastrophic error: cannot open source file "iostream" #include <iostream> ^ 1 catastrophic error detected in the compilation of "saxpy_main_data.cpp". Compilation terminated. make: *** [saxpy_main_data.o] Error 2
The saxpy.cpp was compiled sucessfully. But, pgc++ 13.2 met problem with iostream? How to solve this? Any suggestion are welcome.