CPUMeter.c does not work

Hello everybody,

I have tried the CPUMeter.c script but it does not work. It gives me no messages, I can only see is the display with zero memory usage and zero cpu load!

Does anybody could help me?

Cheers, Luís

Hi Luís,

I see no problem running this macro on Windows with cvs head of ROOT. Please provide information about your environment: operating system, ROOT version in use, CPU.

Cheers, Ilka

Ohh sorry!

I forgot to mention: ROOT 5.14.00 on Linux 2.6.18 (compiled for Athlon-XP K7) with gcc 4.1.1.
And I also forgot to mention that I have to copy by myself the speed.gif to proper directory after compiling/installing such ROOT version.

Thanks, Luís

Hi Luís,

Your comment looks strange. [quote]And I also forgot to mention that I have to copy by myself the speed.gif to proper directory after compiling/installing such ROOT version.[/quote]
The file speedo.gif is located in $ROOTSYS/icons and there is no need to copy it somewhere else. It might be useful if you provide details about your environment and how the root version was installed (from source files or binaries, configure parameters, environment settings, the use of .rootrc file etc.).

Thank you, Ilka

Hi Luís,

Just an additional info that I see no problem running CPUMeter.C on Linux too.

Cheers, Ilka

[quote=“antcheva”]Hi Luís,

Your comment looks strange. [quote]And I also forgot to mention that I have to copy by myself the speed.gif to proper directory after compiling/installing such ROOT version.[/quote]
The file speedo.gif is located in $ROOTSYS/icons and there is no need to copy it somewhere else. It might be useful if you provide details about your environment and how the root version was installed (from source files or binaries, configure parameters, environment settings, the use of .rootrc file etc.).

Thank you, Ilka[/quote]

Hi Ilka,

What I mean is that ‘make install’ does not copy the “speed.gif” file to $ROOTSYS/icons, at least in the version 5.14/00.
Here is the configure options which I used:

	./configure \
		--prefix=/usr \
		--bindir=/usr/bin \
		--mandir=/usr/share/man/man1 \
		--incdir=/usr/include/${PN} \
		--libdir=/usr/$(get_libdir)/${PN} \
		--aclocaldir=/usr/share/aclocal/ \
		--datadir=/usr/share/${PN} \
		--cintincdir=/usr/share/${PN}/cint \
		--fontdir=/usr/share/${PN}/fonts \
		--iconpath=/usr/share/${PN}/icons \
		--macrodir=/usr/share/${PN}/macros \
		--srcdir=/usr/share/${PN}/src \
		--docdir=/usr/share/doc/${P} \
		--testdir=/usr/share/doc/${P}/test \
		--tutdir=/usr/share/doc/${P}/tutorial \
		--elispdir=/usr/share/emacs/site-lisp \
		--etcdir=/etc/${PN} \
		--disable-alien \
		--enable-builtin-afterimage \
		--disable-builtin-freetype \
		--disable-builtin-pcre \
		--disable-builtin-zlib \
		--disable-chirp \
		--disable-dcache \
		--disable-globus \
		--disable-rfio \
		--disable-rpath \
		--disable-sapdb \
		--disable-srp \
		--enable-cintex \
		--enable-exceptions	\
		--enable-explicitlink \
		--enable-mathcore \
		--enable-mathmore \
		--enable-minuit2 \
		--enable-reflex \
		--enable-roofit \
		--enable-shared	\
		--enable-soversion \
		--enable-table \
		--enable-thread \
		--enable-opengl \
		--enable-pgsql \
		--enable-python \
		--enable-qt \
		--enable-xml \
		--enable-ssl

Well, it is embarrassing for me, but it did work only twice after several trials! Even if I start a new root session in bash it do not work anymore. I got no errors, nothing! When it works it holds my terminal while it is running. When it does not, nothing happens.
I tried to get the CPU by running gSystem->GetCpuInfo(&cpuInfo) directly in command line and I got sane numbers from the structure CpuInfo_t cpuInfo.
I am running Gentoo and this version works everything except this one.

Thanks, Luís

Hi Luís,

Well, my point on $ROOTSYS/icons was given without the knowledge that you have installed ROOT with “–prefix” flag. I hope you have not set $ROOTSYS in this case, as the help of ./configure saysIf any of the flags --cintincdir, --datadir, --docdir, --etcdir, --iconpath, --incdir, --libdir, --macrodir, --mandir, or --prefix is given, ROOT will be compiled with static directory names, and you should not set the ROOTSYS environment variable. My ROOT version is not installed this way - I am using ROOTSYS and LD_LIBRARY_PATH. In this case, the problem you are faced on might be related to bad installation (the facts that speedo.gif was not on place and that gSystem-GetCpuInfo(…) gives right numbers lead to this reason).

Cheers, Ilka

Hello Ilka,

Please, do not be confused by my post. I am reporting 2 different problems at the same time:

  1. ROOT installation script (by make install) did not copy the speedo.gif file to the correct directory, which is /usr/share/root/icons in my case*. This seems to be similar to this post http://root.cern.ch/phpBB2/viewtopic.php?t=3340&highlight=. Early, when I tried to run it ROOT complained about such missing file, after I manually copied I was able to run it with error messages at all;

  2. but where I should see around 20% of CPU usage was 0%, the same thing happened to the memory usage.

The strange thing is that I was able to run it fine twice :open_mouth: from several trials.

I do not think it could be a bad installation (or I do not know where it could be!) because I can run several others ROOT examples fine (I did not tried all, but several of them)!

*Sorry again, I am not setting ROOTSYS env-variable, since I am using --prefix=. In fact, I should told you in previous post.

Hi Luís,

Thank you for this clarification.

It might be better to report the problem 1) separately, if the installation script copied only the .xpm files in the specified icon directory.

When I run the CPUMeter.C this morning, I got 0% CPU and memory usage for some reason (no idea why). In this case I noticed that the prompt line “root[1]” appeared with CPUMeter window. I was able to enter .q and to quit the root session. This is not the case when CPUMeter.C runs - I have to close first its window (via Window Manager [x] button) and after that the prompt line “root[1]” shows up. Unfortunately, this happened only once on Linux and all other tries were fine. Bertrand (the author of TGSpeedo widget and CPUMeter.C macro) is absent this week. I will let him know this problem.

Cheers, Ilka

Hello Ilka,

The installation script copies all image files to correct place except for speedo.gif. Files such .xpm and .png are copied, but I noticed that speedo.gif is the only .gif file in the icons directory. If there should be more .gif files, they are missing too.

Feel free to ask me any other questions in order to figure out the strange behavior of TGSpeedo/CPUMeter.C.

Cheers, Luís

Hi Luís,

The .gif files in icons directory should be three: icons/bld_fontselect.gif icons/speedo.gif icons/Splash.gif.

Do you observe the same behavior running CPUMeter.C (as explained by me above)?

Cheers, Ilka

[quote=“antcheva”]
When I run the CPUMeter.C this morning, I got 0% CPU and memory usage for some reason (no idea why). In this case I noticed that the prompt line “root[1]” appeared with CPUMeter window. I was able to enter .q and to quit the root session. [/quote]
This is exactly what happens to me, but more often than to you (actually it only worked 3 times after uncountable tries)

I have copied the icons directory from ROOT source package as icons-original in /usr/share/root and I run diff in these directories, see I have got:

hal9000 ~ # diff /usr/share/root/icons /usr/share/root/icons-original/ Somente em /usr/share/root/icons-original/: bld_fontselect.gif Somente em /usr/share/root/icons-original/: CVS Somente em /usr/share/root/icons-original/: RootIcon.obj Somente em /usr/share/root/icons-original/: Splash.gif
my system is in Portuguese, so “Somente em”=“Only in”.

I also can find in the /usr/share/root/icons these files: bld_fontselect.png and Splash.xpm

Cheers, Luís

Hi,

the copying of the gif files during “make install” is now fixed in the cvs head. Thanks for pointing out the problem.

Cheers, Fons.

Hi Fons,

Thank you,
Luís A. Perles