20

I am uploading my OpenCL and Cuda code to hgpu.org because I don't have a graphics card on my laptop. When I upload my code I get the following error:

make: Warning: File `main.cu' has modification time 381 s in the future
make: warning:  Clock skew detected.  Your build may be incomplete.

I know that clock skew is due to difference in my machines clock time and the server's clock time, so I synchronized my time with the server's. The OpenCL and C++ code is running fine now but the Cuda code is still giving me this error.

So my question is:

Is there any other reason for clock skew error besides the time synchronization? And if there is then how do I solve it?

Cuda Code:

__global__
void test()
{
}

int main()
{
    dim3 gridblock(1,1,1);
    dim3 threadblock(1,1,1);

    test<<<gridblock,threadblock>>>();
    return 0;
}

Note: I can provide the make file too.

Yuriko
  • 545
  • 3
  • 14
zindarod
  • 5,532
  • 2
  • 23
  • 50

4 Answers4

7

Simply go to the directory where the troubling file is, type touch * without quotes in the console, and you should be good.

Nerox
  • 89
  • 1
  • 3
  • 3
    And update the timestamps of all the files in that directory ? Isn't that a bit dangerous, especially if accidentally done in the wrong directory ? –  Nov 23 '14 at 01:28
4

I am going to answer my own question.

I added the following lines of code to my Makefile and it fixed the "clock skew" problem:

clean:  
    find . -type f | xargs touch
    rm -rf $(OBJS)
zindarod
  • 5,532
  • 2
  • 23
  • 50
  • 16
    This only treats the symptom and not the underlaying cause, it doesn't "fix" the problem. If someone else has this problem, please don't do this! – RolKau Jun 06 '17 at 09:19
  • 2
    @RolKau What do you think the problem is? – zindarod Jun 07 '17 at 00:52
4

One of the reason may be improper date/time of your PC.

In Ubuntu PC to check the date and time using:

date

Example, One of the ways to update date and time is:

date -s "23 MAR 2017 17:06:00"
jmlemetayer
  • 4,334
  • 1
  • 28
  • 42
1

please try to do

make clean

(instead of make), then

make

again.

Paul Roub
  • 35,100
  • 27
  • 72
  • 83
Sean
  • 121
  • 1
  • 1
  • 7