I have dual core processor and noticed each time when I run a macro with ROOT it uses only one core but other is idle. I found this situation very frustraiting
Is there any way to use both cores when I running ROOT?
Thank you!
==
OS: WinXP, ROOT 5.14 (I use gcc/Cygwin as well as VC6)
Yes, you can use threads. Try the macro in attachment. To run it: ā.x pirndmthread.C+ā.
The threads will be distributed to your cores (if you have a quad-core, it will use the four processorsā¦)
Do I understand correctly that you renamed the file āpirndmthread.C+ā??
Please donāt. The + in ā.x pirndmthread.C+ā tells Root to compile the macro using ACLiC (please read the documentation).
And I donāt see any problem running this on Windows (it has even been developped on Windowsā¦):
Yes, I did wrong since I renamed the file, it was stupid. But now I hope I do right but get an errors again. Maybe this is because Iām using VC++ v6.0 (as you noticed before)?
root -l
root [0] .x pirndmthread.C+
Info in TWinNTSystem::ACLiC: creating shared library C:\cygwin\home\Mustang\an
alysis\susy\pirndmthread_C.dll
23868109_cint.cxx
s5jo_.cxx
C:\root/include\TDatime.h(101) : error C2248: āfDatimeā : cannot access protecte
d member declared in class 'TDatimeā
C:\root/include\TDatime.h(43) : see declaration of 'fDatimeā
C:\root/include\TDatime.h(101) : error C2248: āfDatimeā : cannot access protecte
d member declared in class 'TDatimeā
C:\root/include\TDatime.h(43) : see declaration of 'fDatimeā
C:\root/include\TDatime.h(103) : error C2248: āfDatimeā : cannot access protecte
d member declared in class 'TDatimeā
C:\root/include\TDatime.h(43) : see declaration of 'fDatimeā
C:\root/include\TDatime.h(103) : error C2248: āfDatimeā : cannot access protecte
d member declared in class āTDatimeā
ā¦
C:\root/include\TDatime.h(43) : see declaration of 'fDatimeā
C:\root/include\TH1.h(368) : fatal error C1903: unable to recover from previous
error(s); stopping compilation
Error in : Compilation failed!
Error: Function pirndmthread() is not defined in current scope (0)
*** Interpreter error recovered ***
root [1]