Hello everybody,
I I have a strange problem.
I simply try to read out a file in the following way:
#include <iostream>
#include <fstream>
#include <cuda.h>
using namespace std;
int main() {
ifstream ifs;
ifs.open("sequence.fl",ifstream::in);
string line;
while(!ifs.eof()) {
getline(ifs,line);
cout << line << endl;
}
ifs.close();
return 0;
}
When I compile the code with nvcc (release 4.0, V0.2.1221) then the while loop never converges. This means the eof() always returns false.
If I compile the code with g++ or gcc (4.2), everything works fine.
I use OS-X Snow Leopard.
Does someone know what the problem could be? That is a really annoying problem because I try to parallelize some computations in a big project. Everything works fine until now. Only try to figure out this strange behavior.
Thanks a lot,
Dominik