HPCE / hpce-2018-cw1

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

user time is very different from real time

xz5116 opened this issue · comments

Dear all

As shown in the picture, I was running code 'julia'. I think the user time should be closed to real time before optimization, but my results are opposite. Why? If I'm wrong (i.e. real >> user +sys), where is the time difference taken.

use

I have seen this issue to, using the canned minGW version and the provided make found in /mingw64/bin/mingw32-make.exe.

Sorry, I'm using the canned minGW version which is downloaded from https://imperialcollegelondon.app.box.com/v/HPCE-2017-mingw64-tbb-opencl
but I can't find /mingw64/bin/mingw32-make.exe .

Downloaded it from the same place, thats the direction from the mingw64 terminal, full path on an win explorer should be <extracted location>\HPCE-2017-mingw64-tbb\msys64\mingw64\bin. What did you compile it with then? I wasn't sure if the compiler was the problem, just providing information.

in the package downloaded, there are three files as shown in below. I compile and run 'julia' using 'runme.bat'.
image

Interesting, it looks like mingw is not supporting the total user time. Though if
it was making it up, then you would expect it to always be zero.

I can confirm the behaviour on my version of mingw - I'm not sure if this is
a regression in mingw. I notice that /usr/bin/time has the same problem.

I'll try to see if there is a workaround.

Found one work-around, which is just to re-implement time using windows calls.

I hadn't noticed the problem with mingw32-make - it should just have been available as make,
I must have missed the package when assembling it. It can be added in with:

pacman -S make

I've created a simplified version of time, just for mingw64, which shows the difference between
wall-clock and user time (though has no other functions at all).

What it adds is a new source file called src/mingw64-time.cpp, which can be built
into bin/mingw64-time, and has the same minimal functionality as time:

image

This only works on mingw64, and is irrelevant for all other platforms.

Leaving this open for now - could you see if it works? So in particular, @jeg114, could
you pull from master, then try it out? If it works, I'll update the readme (though I'll
have to explain how to pull from master, which I prefer to defer till CW2. Never mind.).

pulled from master and workaround works, thanks!
tried investigating if this is a known minGW limitation or other reasons but could not find much.
Did open a stack overflow question which has found no answer either yet.