Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
4995 Discussions

Installation on nonsupported distro (Gentoo)...

maverick6664
Beginner
1,144 Views
I'm trying to install VTune 3.0 on Gentoo Linux (kernel 2.6.11.11, P4 2.8G HT.)

Downloaded the tar file, untarred, and invoked ./install.
After accepting some license agreements, it stops saying:

ERROR: unable to find command chkconfig
Please add the location to the above commands to your PATH and re-run the script

I know chkconfig on Redhat, but Gentoo doesn't use/have it. Then I tried by editing config.ini;

NONSUPPORTEDINSTALL=Yes

But in vain. Nothing has changed. What can I do?

Thanks in advance!
0 Kudos
20 Replies
jeffrey-gallagher
1,121 Views
Well written posting! Here's the official answer:
1) install the linux remote agent on this gentoo puppy, called vtserver, it's installation program is "install.sh"
2) Install a VTune GUI on a fully supported server on the same network: either Windows, or Linux (RH or SuSE)
Then, you sit at the GUI and launch profliling activities over to the remote agent running on the gentoo server, and, look at the data when it is sent over to you.
Unsupported answer:
1) Install vtl/vtlec on a supported OS
2) tar up the installed files
3) untar them on the gentoo server
4) run the drivers scripts to create and load a sampling kernel driver
5) manually edit startup to launch the necessary vtune scripts at boot
6) hope everything works, because it MAY NOT even if you do everything right
If you go the supported route, you have a much better chance of success, although still not a guarantee.
If you want guarantees, stick to the tested OS environments outlined in the VTune release notes.
cheers
jdg
0 Kudos
maverick6664
Beginner
1,121 Views
Thank you for the quick answer. I've been trying to "unsupported" way :) I have vmware running on Gentoo, so I installed Redhat7.3, then VTune on it and tar,gzipped the whole direcotry of VTune and then xfer it to Gentoo and overwrote the VTune directory on Gentoo. Then set (probably correct) shared library path in /etc/ld.so.conf.

Now my problem is I cannot load the kernel module..I guess this is not a distro-dependent problem if one builds a custom kernel driver.

In /opt/intel/vtune/vdk/src, I followed README instructions:

1. run ./build-driver
This worked fine. My kernel driver is named "vtune_drv-x32-2.6.11.11-mavericksmp.ko

2. run ./insmod-driver
--------
bash-2.05b# ./insmod-vtune
Executing: insmod ./vtune_drv-x32-2.6.11.11-mavericksmp.ko
insmod: error inserting './vtune_drv-x32-2.6.11.11-mavericksmp.ko': -1 Unknown symbol in module

Error: sampling driver failed to load!

You may need to build a sampling driver for your kernel.
Please see the sampling driver README for instructions.
--------
yes! I'm following README!!! :) build-driver script rebuilt kernel itself, so I rebooted the new kernel, but I am getting the same error.

I'll use VTune on RedHat in vmware, then when I'm familialized, I may bring it to Gentoo. I hope performance bottleneck can be found in vmware also, and with ssh, X Window clients in vmware can be displayed on Xserver on Gentoo.

Thank you very much!

Message Edited by maverick6664 on 06-09-2005 02:28 PM

PS: Looking at system requirements page, I found there's no kernel 2.6 based system listed. Isn't kernel 2.6 "officially" supported? But the script built a module with .ko extension.

Message Edited by maverick6664 on 06-09-2005 02:35 PM

0 Kudos
jeffrey-gallagher
1,121 Views
Ah, Grasshopper, you have indeed reported from the path of wisdom...
(Sorry, couldn't resist.)
The latest release of VTune for linux supports ONLY SuSE 2.6 kernels, for a variety of reasons. The next release, due at the end of this year, will have the support you seek, both in the cli/gui, and linux remote agent.
Any chance you could try a supported kernel on that gentoo, for grins, 2.4 something, and go from there? You could just boot it for the purposes of profiling...
cheers
jdg

Message Edited by jdgallag on 06-09-2005 10:32 AM

0 Kudos
maverick6664
Beginner
1,121 Views
Sounds nice to me, but now I wonder how useful VTune in my field. I am optimizing seti@home (if you don't know what it is, please take a look at http://setiweb.ssl.berkeley.edu/ It runs in the background to fill the idle time of the cpu, calculating incoming signals from the space to find extraterrestrial intelligence. It contains some fft functions, and very heavy although it's designed as a background process. So I want to know where the bottleneck is, and optimize there.

Is VTune really useful for that purpose? I haven't used VTune in real purpose or haven't tried yet, though I confirmed it works in my environment. And remote agent doesn't matter to me. Just using ssh -X will be fine. I can display eclipse running in vmware on Gentoo. And that kernel 2.4 will be fine with SETI@home. So my environment should be perfect.

Now I refrain from using VTune just because I haven't found any useful documentation yet. If I find it useful, I am willing to jump to VTune :)

Will you recommend a nice novice documentation(s) for VTune? If I can utilize it, it must be wonderful.

Message Edited by maverick6664 on 06-10-2005 04:03 AM

0 Kudos
jeffrey-gallagher
1,121 Views
Oh yes, the SETI@home software is known around these parts!
To answer your question, here are the documents that I think might serve you, on the linux side. Please, absolutely report back if you think they don't hit the mark for you (or, even if they do).
cheers,
jdg
----------------------------------------
All directory listings are defaults: your mileage may vary...
1) USER'S GUIDE: a great place to get started if you've done application profiling before, but just don't know VTune or haven't looked at VTune in a while. Bring up a browser and load:
/opt/intel/vtune/doc/users_guide/index.htm
Note: quick start sections for callgraph and sampling
2) GETTING STARTED: A basic tutorial for folks who haven't ever profiled before:
/opt/intel/vtune/doc/training/gs_vtl/index.htm
3) REFERENCE GUIDE: an encyclopaedia of processor events. Organized by processor and by general importance, primary tuning events, secondary tuning events, etc.
/opt/intel/vtune/doc/reference/index.htm
4) There are some extremely concise and well-written man pages, that are my personal bread and butter, but I'm a man page kind-o-guy. Try them all, and see what I mean:
$ man vtl
$ man vtlec
$ man sampling
$ man callgraph
$ man ActivityController
$ man code # or
$ man 7 source # same as 'man code'
5) If you're a vtlec fan, you can use click on HELP that is available on the GUI itself.
6) We also have tons of online help. You might check out each of these, just to see what's where:
# register to download up to date versions of all intel software products
# our world class techincal support for all intel products
# the Intel Software Network, home of strategies and technologies, solutions and services, etc etc etc etc etc.

http://www.intel.com/cd/ids/developer/asmo-na/eng/support/index.htm

# our "software support" site, a kind of one-stop shopping for finding self help

0 Kudos
jeffrey-gallagher
1,121 Views
OH WAIT! There's more.
I meant to mention in my posting above that there aretwo publications from Intel Press that are top notch with regard to using VTune, the how's and why's and wherefores.
Here they are:
"VTune Performance Analyzer Essentials - Measurement and Tuning Techniques for Software Developers" by James Reinders
and
"The Software Optimization Cookbook - High-performance Recipies for the Intel Architecture" by Rich Gerber
If you want to know more, check out this website:
cheers
jdg

Message Edited by jdgallag on 06-09-2005 11:28 AM

Message Edited by jdgallag on 06-09-2005 11:29 AM

0 Kudos
maverick6664
Beginner
1,121 Views
Thank you! I'll try that.

As for SETI@home, I've already made very fast clients using Intel C++ compiler and IPP...more than twice faster than the official client. See this thread. Now i'm feeling I'm advertising Intel's products in that message board... And personally I want to make even faster one. That's why I want to use VTune.

BTW mixture of kernel 2.4 and 2.6 on the same system is impossible, IMHO, because module systems are quite different. modprobe/insmod, etc...are quite different. So I need another 2.4 system to use VTune. That's why vmware comes up. It's very easy to install a distro in it and make a backup copy of the whole virtual harddisks. Using ssh on Gentoo, I can use VTune or any other apps in vmware as if I were in vmware.

Message Edited by maverick6664 on 06-10-2005 04:45 AM

0 Kudos
jeffrey-gallagher
1,121 Views
For the record: we know we're *behind* on the 2.6 thing...
...I just felt it was important for you to know what the options were right here and now, not just later in the year.
Let us know how things go and what you think. Our documentation specialists love feedback: kudos, complaints, suggestions, what's missing, anything.
Pour it on!
cheers
jdg

Message Edited by jdgallag on 06-09-2005 11:36 AM

Message Edited by jdgallag on 06-09-2005 11:37 AM

0 Kudos
maverick6664
Beginner
1,121 Views
Thanks....vtune is partially working on RH9 on vmware, but in a virtual machine, profrun of ICC doesn't work. Now I'm trying to install vtune on my base Gentoo and returned to the first problem.

My problem is the kernel module for vtune cannot be loaded; ie.

# insmod vtune_drv-x32-2.6.11.11-mavericksmp.ko
insmod: error inserting 'vtune_drv-x32-2.6.11.11-mavericksmp.ko': -1 Unknown symbol in module

I suspect this be due to the kernel change (last year or so), because vtune seems to support up to 2.6.5 as seen in /opt/intel/vtune/vdk. I once thought of installing 2.6.5, but found it didn't support HT (my machine is HT box.) So I need to stick to more recent one.

IMHO there are two options.
1. Hack the source of vtune kernel driver so it can be loaded into the current kernel.
2. Find the older kernel supporting both vtune and HT.

I'm not sure which is better yet, trying both... #2 isn't preferable.
And in addition, "the unknown symbol in module" in the error message of vtune module is "vtune_drv: Unknown symbol remap_page_range" (seen with dmesg.)

EDIT: I also tried new driver by Intel available at here but in vain. It's also old.

EDIT2: Finally I installed kernel 2.6.9 on my Gentoo (dual-kernel boot) and now the kernel driver can be loaded. But now I have another problem. When I invoke vtl, it says:

maverick:~% vtl
1 Ntd is not running on existing shared memory
2 Error: NTD is not running at the moment, please start it before using NT services.

What can I do? I hope I'm almost there....

Thanks in advance.

Message Edited by maverick6664 on 06-18-2005 01:12 AM

0 Kudos
witzel
Beginner
1,121 Views
Hello,

the collector module can easily be patched to run on newer kernels. I'm using it right now on 2.6.11-gentoo-r11.
The trick is that you have to replace remap_page_range with remap_pfn_range (and change the arguments according to the new function). I'm not quite sure about the licensing yet (there are so many you accept when installing the noncommercial version), but if it turns out that there is no problem, I'd be glad to provide you the patched version.

Thomas
0 Kudos
witzel
Beginner
1,121 Views


maverick6664 wrote:

When I invoke vtl, it says:

maverick:~% vtl
1 Ntd is not running on existing shared memory
2 Error: NTD is not running at the moment, please start it before using NT services.

What can I do? I hope I'm almost there....

Thanks in advance.

Message Edited by maverick6664 on 06-18-2005 01:12 AM





I did not come across this problem. I just manually started ntd from /opt/sag/exx/bin/ntd.
I had to set the environment variables,
export PATH=/opt/sag/exx/v711/bin:$PATH
export LD_LIBRARY_PATH=/opt/sag/exx/v711/lib:$LD_LIBRARY_PATH
export EXXDIR=/opt/sag/exx
export EXXVERS=v711
export SAG=/opt/sag

also I had to copy the config file:
cp /opt/sag/exx/v711/etc/dcomconfig /etc/

Then just start ntd manually, and it will be fine.
Then use vtl just as you wish.

I'll make some gentoo installer script in a couple of days, and see how I can contribute the module patch (maybe just post the diff here ?)

Thomas
0 Kudos
maverick6664
Beginner
1,121 Views
Thank you for your help...

However after that, I installed RH9 on another partition and tried profrun (of ICC) and failed with internal error. I reported it to the Premier support and the answer was "It's an issue with Prescott core." What processor are you using?

So I don't expect profrun will run on Gentoo, either....anyway I'm trying to use vtune.

EDIT:

I edited the source /opt/intel/vtune/vdk/src/vtune.c (just replace remap_page_range() with remap_pfn_range...arguments look the same...am I wrong?) set the environment variables (added SHAREDBIN), set group permissions of /opt/intel/vtune/global_data and /dev/vtune_d,/dev/vtune_m, /dev/vtune_p. module can be loaded w/o problem, ntd runs apparently fine, but vtl fails with

1 OSMapFile: open failed. errno: 13
/opt/intel/vtune/bin/vtl: line 32: 17729 Segmentation fault (core dumped) "${BINARY}"


I'm not sure what's the problem yet.....if license issues aren't a problem, will you send the patch/config file to tetsuji_rai@yahoo.com? I have a non-commercial license.

Thanks in advance....

Message Edited by maverick6664 on 07-11-2005 11:11 PM

0 Kudos
witzel
Beginner
1,121 Views
The edited line should read

if(remap_pfn_range(vma, vma->vm_start,__pa(pdsa) >> PAGE_SHIFT,pdsa->length,vma->vm_page_prot))

(this should be one line without all these spaces and the linebreak, this forum seems to interpret that as formating).
This is because the third argument has to be a page number, not a physical address.

Thomas

Message Edited by witzel@mit.edu on 07-11-2005 06:10 AM

0 Kudos
maverick6664
Beginner
1,121 Views
Thank you..but it still fails with

1 OSMapFile: open failed. errno: 13
/opt/intel/vtune/bin/vtl: line 32: 19179 Segmentation fault (core dumped) "${BINARY}"

Actually manually vtl.bin is invoked, it fails with

1 OSMapFile: open failed. errno: 13
zsh: segmentation fault (core dumped) /opt/intel/vtune/shared/bin/vtl.bin

Anyway, Prescott has a problem, so I'll abandon this...

Thank you.

Message Edited by maverick6664 on 07-11-2005 11:31 PM

0 Kudos
witzel
Beginner
1,121 Views
Is that on a 2.6.11 kernel or the 2.6.12 ? I should do some more testing here, but I had no crashes yet.

What is your exact kernel version ?

Thomas

Update: I'm getting the same crash now. Is that the same you got with an older kernel ?

Message Edited by witzel@mit.edu on 07-11-2005 08:18 AM

Update: This error only occurs if I run as a user other than root. It does work when I run vtl as root, which makes me think it must be a permission problem somewhere.

Message Edited by witzel@mit.edu on 07-11-2005 10:42 AM

0 Kudos
witzel
Beginner
1,120 Views
I'm now stuck with the error:

Mon Jul 11 17:55:52 2005 Exports instrumentation of module "libacl.so.1.1.0" was skipped.
Mon Jul 11 17:55:52 2005 Exports instrumentation of module "libattr.so.1.1.0" was skipped.
libgcc_s.so.1 must be installed for pthread_cancel to work

There is also some issues with the properties file. I'm investigating that now.

Update:

All these issues have been fixed. I copied the gcc-3.2 directory to /opt and also discovered that there was a false configuration for the user sag (was not member of group sag, caused by previous installation attempts).

Thomas

Message Edited by witzel@mit.edu on 07-11-2005 05:10 PM

0 Kudos
maverick6664
Beginner
1,121 Views
I'm using 2.6.12.2 on Gentoo and 2.4.??(default one) on RH9.

but I won't use vtune...because now I know where my bottleneck is.

Message Edited by maverick6664 on 07-12-2005 05:07 AM

0 Kudos
witzel
Beginner
1,121 Views
Sorry you're giving up on vtune. I think I'm pretty sure the kernel module works fine with the patch. I meanwhile also upgraded to 2.6.12-gentoo-r4. I think the critical part is still in starting the ntd service properly. I'm working on that /etc/init.d/ntd script now to get it to do everything under gentoo, and I believe that will be the key to getting the whole thing work.

Update: It works fine now without any problems for user root. It still doesn't work if vtl is run by a user other than root. This may still be connected to issues with running ntd, but I believe its an half success and I can sample my programs now.

Thomas

Message Edited by witzel@mit.edu on 07-11-2005 05:24 PM

0 Kudos
maverick6664
Beginner
1,121 Views
hmm...I'm still here :)

I want to utilize vtune...now I am optimizing SETI@home enhanced, but vtune can be used in many ways. I'll keep trying. I'll send you email.

EDIT: I think I can start ntd w/o problem...daemons are running in the background.

And I'm using the standard kernel 2.6.12.2...maybe there's just a little difference between gentoo-r4.

regards,

Message Edited by maverick6664 on 07-13-2005 12:12 AM

0 Kudos
jeffrey-gallagher
1,009 Views
Reminder which may or may not be useful: all users who expect to run VTune have to belong to the group which is given permissions to do so. This group can be any group, but is chosen by the installer during install.
The default suggestion is the group "vtune." Users who expect to run vtl or vtlec have to be a member of the vtune group as listed in /etc/group, or whatever group services you use if you do in fact use any.
The root user is exempt from this requirement, since they have access to all files, always.
In the past, when I've seen systems where only root can use VTune properly, the problem is sometimes highly secure file permission sets, or, just a group thing.
I try the group thing first: is usually easiest.
cheers
jdg
PS: if you look at the mode of the VTune sampling driver files which get installed during install (/dev/vtune*, should be three of them) you'll see why non-root users who don't belong to the vtune group will have problems...)
0 Kudos
Reply