Hello Masa, Sometimes ago I did report this problem but it was never replied.
I’ve prepared the short ROOT macro to demonstrate and reproduce the problem.
Start trhe macro attached
It should produce the empty histogram and message
“Error: Bytecode compilation SelectionQWERTY”
I go to the
root.cern.ch/root/htmldoc/src/TT … :EntryLoop
comment out the line
// #define BYTECODE
start the same macro again,.
Now one can see non-empty histogram and no error message.
If you type ".t> folloed by the macro invokcation then it revelas the source code of the trouble autogenerated macro:
1 void SelectionQWERTY(float *results, float **address, int& i$, int& n$ )
3 float energy = *(address);
Error: Bytecode compilation SelectionQWERTY
I would appreciate you explain how one chnage the code in question to be able to use the bytecode optimization. his did work in past.
Thank you, Valeri
testTable.C (706 Bytes)
Sorry for not responding. Looks like I totally overlooked your message.
The SelectionQWERTY function can be compiled as bytecode. There
is no problem. I do not know why you see the error message.
So far, I’ve only looked into SelectionQWERTY as an independent
function and haven’t looked at the whole thing yet.
Could you reproduce the problem?
Do you need any extra information?
I can not reproduce the problem with the latest ROOT.
You did not mention which version of ROOT you tried.
Could you please try with the latest ROOT and attach the fill output you are getting in both cases.
I quickly check my test with ROOT version from CERN AFS
and it does work from there.
I still doesn’t with any BNL/STAR build. Weird !!!
I’ll check thank you.
I have discovered the problem is caused by
#pragma optimize 0
within STAR custom “rootlogon.C” script
To reproduce the problem one needs
- Start root
- turn the optimization OFF with either
#pragma optimize 0
- start testTable.C script attached earlier.
Is it normal ?
The request ‘.O 0’ disable the generation of the bytecode and hence it is not available to run. You can either try to figure out where the bytecode is available before hand or force the optimization level before loading your temporary file.
Note that Masa is working on a re-implemetation of the CINT code execution layer which should solve this problem (same engine for all optimization level).
Is there any news?
I am still wondering if the code explcitly asks for the byte code why it can not be provided regardless of the currentdefault optimization level.
Or whether it is possible to query / set the current CINT optimization level by the user code.
This way I may have solved the problem nyslef.
Okey, I’ve got it. You mean you want to have a function compiled even in optimization level 0 if it is required explicitly. You have reason. I’ll make that change in next release.
In G__MethodInfo::GetBytecode(), bytecode compilation is done only if the optimization level is greater than 3. I’ll make it for all cases.