johnh
April 4, 2021, 3:45am
1
Definitely worth reading if you are interested in finding detail on the CPU or GPU system you are working with.
If this belongs in Off Topic I will happily move it.
March 2020: I was planning to write about CPU microarchitecture analysis for a long time. I started writing this post more than a year ago, just before the beginning of COVID-19. But with so many things happening around (and new parenting...
Est. reading time: 42 minutes
6 Likes
For those who are interested in using LIKWID with Julia.
Setting LIKWID markers:
Using likwid-pin
for Julia threads:
Alright, I’ve done some testing and had some discussion on Slack/GitHub. Let me share my findings.
1) Query the core id of a thread.
Let’s start with the second question of the OP first:
Is there a way in Julia to figure out which core a thread is running on?
Thanks @pbayer for the pointer to schedule_getcpu(). We can call it in Julia like so:
glibc_coreid() = @ccall sched_getcpu()::Cint
and query the core id of a specific thread using ThreadPools’ @tspawnat:
using ThreadPools
tglibc_co…
2 Likes