After finally getting around getting the GPU doing some computations with simple numbers and vectors successfully, I decided it was time to move on writing some kernels that can take in large amounts of experimental data from file.
However I cant seem to get nvcc to compile code that includes any form of IO code. My simple test example is
using namespace std;
cout << “Data read from file Successfully!”;
However I keep getting the following
/usr/include/c++/4.4/ext/atomicity.h(46): error: identifier “__sync_fetch_and_add” is undefined
/usr/include/c++/4.4/ext/atomicity.h(50): error: identifier “__sync_fetch_and_add” is undefined
2 errors detected in the compilation of “/tmp/tmpxft_00000c77_00000000-4_Powerspec.cpp1.ii”.
I tried using both the stdio.h and iosteam libraries since I figured that might be the cause, but I get the same error in all cases. I hope someone can spread some light on how to tackle this problem since I have been unable to locate anything about it in the CUDA material I have on hand. Thanks in advance.