Advanced search

Forums : Wish list : stderr msg
Message board moderation

To post messages, you must log in.

AuthorMessage
Profile ohiomike
Avatar

Send message
Joined: 17 Jul 07
Posts: 302
Credit: 5,006,319
RAC: 0
Message 3594 - Posted: 27 Oct 2007, 17:05:27 UTC
Last modified: 27 Oct 2007, 17:23:13 UTC

Could we add the task start and stop times to stderr out?
Also, could we write a msg when the task re-starts from a checkpoint?
As a note, if you use the Intel Performance Primitive pack-

#ifdef USE_IPP
int actfreq;
ippGetCpuFreqMhz(&actfreq);
fprintf(stderr,"CPU actual speed: %d MHznn",actfreq);
#endif

is nice, it will return the actual speed of the host cpu. This is handy of you want to compare "apples to apples" when looking at run times.

If you don't use IPP, the following code does the same thing:
// ====================================================================
// CPU_Speed.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <windows.h>
#include <stdio.h>

_declspec(naked) ULONGLONG GetCycleCount()
{
_asm rdtsc;
_asm ret;
}

DWORD GetCPUSpeed()
{
ULONGLONG ullStart, ullStop;
ullStart = GetCycleCount();
Sleep(1000);
ullStop = GetCycleCount();
return (DWORD)((ullStop - ullStart) / 1000000);
}

int main(int argc, char* argv[])
{
printf("Processor speed:t%.2f GHzn", ((float)GetCPUSpeed() / 1000));

return 0;
}
// ====================================================================

PS- "back-slash n" doesn't show here, the CR/LF in the prints should be obvious.

Boinc Button Abuser In Training >My Shrubbers<
ID: 3594 · Report as offensive     Reply Quote

Forums : Wish list : stderr msg