RRZE-HPC / likwid

Performance monitoring and benchmarking suite
https://hpc.fau.de/research/tools/likwid/
GNU General Public License v3.0
1.64k stars 226 forks source link

Add function for manually writing marker file #584

Closed OoJJBoO closed 8 months ago

OoJJBoO commented 9 months ago

Add likwid_writeMarkerFile function to address the issue described in #583.

TomTheBear commented 9 months ago

Looks good, thanks for your work on the comments.

I found a small error in the F90 interface. The function in likwid_f90_interface.c has to have an underscore in the end: likwid_writemarkerfile_.

OoJJBoO commented 9 months ago

Updated. Looking at the other functions in the same file, I guess I should probably also use the way of passing in the string argument's length and copying it first before passing it to the likwid_writeMarkerFile function, right? Didn't notice that earlier for some reason.

TomTheBear commented 9 months ago

Yes, you should copy the string before providing it to the C functions.

OoJJBoO commented 9 months ago

Okay, I changed it. I also added the missing register macro in the Lua bindings.

TomTheBear commented 9 months ago

Sorry that I didn't check more thoroughly. I'm on a business trip (SC23) and read your code in between meetings. Next week I have more time to go through your changes.

OoJJBoO commented 9 months ago

No worries, take your time :)

TomTheBear commented 8 months ago

I looked at your code again and I realized that the new functions/macros do not follow the current naming scheme:

OoJJBoO commented 8 months ago

Ah, I see, you're right. I'll update them soon

OoJJBoO commented 8 months ago

I think my last commit should have updated all function names accordingly.

TomTheBear commented 8 months ago

Thanks, that should be all functions for the CPU MarkerAPI.

I should probably add similar functions for the Nvidia MarkerAPI and the ROCm MarkerAPI.