Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

getclock() always returns zero? #15

Open
carstenbauer opened this issue Sep 8, 2021 · 0 comments · May be fixed by #16
Open

getclock() always returns zero? #15

carstenbauer opened this issue Sep 8, 2021 · 0 comments · May be fixed by #16

Comments

@carstenbauer
Copy link

https://github.com/RRZE-HPC/pylikwid/blob/master/pylikwid.c#L861:

static PyObject *
likwid_getClock(PyObject *self, PyObject *args)
{
    TimerData timer;
    uint64_t start,stop;
    if (!PyArg_ParseTuple(args, "KK", &start, &stop))
    {
        Py_RETURN_NONE;
    }
    if (timer_initialized == 0)
    {
        timer_init();
        timer_initialized = 1;
    }
    return Py_BuildValue("d", timer_print(&timer));
}

Unless I'm overlooking something this function doesn't even use the input arguments start and stop in timer_print and, depending on the initialization of TimerData, will always return zero.

Same for likwid_getClockCycles.

@TomTheBear TomTheBear linked a pull request Sep 9, 2021 that will close this issue
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant