Problem related to fgets() in CUDA

Hello all…

      I am trying to implement a k-means clustering . I have one problem in my code. I am reading input from text file. For that I am using fopen() and fgets() functions. But when control goes to fgets(),it gets stucked there and program never gets terminated. So is this problem related to fgets() ? If yes,kindly suggest me the solution or the alternative for the same.

There can be several reasons for your code getting stuck at fgets. Could you share a bit more like what does your file contain? How are you reading its contents with fgets. What is the problem you are trying to solve? Without any concrete thing, I am afraid we cant be of much help.

fgets doesn’t have anything to do with CUDA.