bsc-quantic / Extrae.jl

Julia bindings for extrae Basic API
Apache License 2.0
6 stars 0 forks source link

Fix event codes corruption in PCF files #14

Open mofeing opened 1 year ago

mofeing commented 1 year ago

Fixes #13. The problem was (again) the wrapping of some Vector{Int} into a Ref for a @ccall.

@clasqui could you try this code to check if it works? I will merge it when you give me the ok.

codecov[bot] commented 1 year ago

Codecov Report

Merging #14 (d5744a6) into master (c1be9cb) will not change coverage. The diff coverage is 0.00%.

@@          Coverage Diff           @@
##           master     #14   +/-   ##
======================================
  Coverage    0.37%   0.37%           
======================================
  Files           6       6           
  Lines         267     267           
======================================
  Hits            1       1           
  Misses        266     266           
Impacted Files Coverage Δ
src/FFI.jl 0.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

clasqui commented 1 year ago

I tested it and I see the same behaviour... :( Did you manage to obtain a good register of the events? Is there something I need to reproduce this?

mofeing commented 1 year ago

Strange... What script are you running to test? I'm upgrading Extrae_jll to v4.0.3 and will try this.

clasqui commented 1 year ago

I am using the same script that I used for testing before. But the code that registers the events is in the initialization function, so I think that the the actual code that we trace should not affect on this... Did you manage to get a good execution with a good event registering?

mofeing commented 1 year ago

I actually have been fighting Docker and Extrae_jll because it downloads an incompatible PAPI version for the currently built Extrae binary.

yeah, i agree that the traced software should not affect. I’ve been testing that the value codes are correctly taken at the register function and it seems that is correct. Also, type codes are correctly generated.

It looks like the only problem is how we pass the vector of value codes to the @ccall. I cannot test it right now until I fix some problems but I can only ask you: did you correctly check out to the branch of this PR? Did you reset the Julia terminal? Did you precompile the package? Keep in mind that in order to see any change of the code reflected, you have to restart the Julia REPL.

clasqui commented 1 year ago

Yes, I have everything set up correctly. I always run a new Julia process for every test with the script as a parameter (i run it with scripts/env.sh julia --project=. scripts/test-distributed-work.jl). I would suggest to debug this with the debug flags of Extrae, that will report at the library level what is happening when registering events. I can do this.

mofeing commented 1 year ago

I would suggest to debug this with the debug flags of Extrae, that will report at the library level what is happening when registering events. I can do this.

This would be great. Thanks. I will try also myself when I finish updating the Extrae_jll package.