Gentoo Forums
Gentoo Forums
Quick Search: in
vtune ebuild
View unanswered posts
View posts from last 24 hours

rackathon
 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
timblech
Tux's lil' helper
Tux's lil' helper


Joined: 28 Oct 2003
Posts: 89

PostPosted: Mon Oct 11, 2004 7:48 am    Post subject: vtune ebuild Reply with quote

hi all ...

since intel distributes their vtune profiler for noncommertial purposes for free, now, i'm curious, if someone was able to install it on gentoo ...

my dream would be some kind of ebuild ...

cheers ... t
Back to top
View user's profile Send private message
gmarcus
n00b
n00b


Joined: 01 Oct 2004
Posts: 5
Location: Mannheim, Germany

PostPosted: Wed Nov 10, 2004 4:26 am    Post subject: VTune on Gentoo Reply with quote

Hi all,

Unfortunately the VTune installer does not work in Gentoo. It fails with a "Error obtaining shared lock in the RPM Database" message, error that I was not able to correct. Also, the Vtune installer consists of a number of RPM packages wrapped in a binary file, therefore installing the packages is not easy. This just means it is more work involved.

At the end, I was able to install it on Gentoo (kernel 2.4.27), but requires some amount of work and a Red Hat distribution. I believe an ebuild is not possible, given the actual license of Intel. But I can post the procedure and the custom scripts I made to install the VTune.

The procedure consists of the following steps:

    Installing VTune in Red Hat
    Copy /opt/intel/vtune directory
    Copy /opt/intel/licenses directory
    Copy /opt/sag directory
    Copy /etc/dcom directory
    Compile the VDK for Gentoo
    Create the sag group (GID:107)
    Create the sag user (UID:507)
    Create custom init scripts for dcom, vtune and vtl
    Add the users to the vtune group.


To compile the VDK, just execute:
Code:

cd /opt/intel/vtune/vdk/src/
./build-driver
cp vtune_drv-x32-<your-kernel-version>.o ..

To create the group and user execute (don't forget to set a password for sag):
Code:

groupadd -g 107 sag
useradd -u 507 -g sag sag
passwd sag

Now, four custom files. Two of them are for initializing the services, the others are for setting the environment variables automatically.

/etc/init.d/dcom
Code:

#!/sbin/runscript
# Copyright (c) 2000 Software AG Darmstadt, Germany.  All rights reserved.
#
# Author: Software AG <dcom@softwareag.com>, 2000
#
# /sbin/init.d/dcom or /etc/init.d
#
# Modified by Guillermo Marcus, Universitaet Mannheim, 2004
#   to work on Gentoo Distributions
# NOTE: there are still things to improve.

setvars() {
     rc_done="\033[71G\033[32mdone\033[m"
   rc_failed="\033[71G\033[31m\033[1mfailed\033[m"
  rc_skipped="\033[71G\033[1mskipped\033[m"
  rc_done_up="\033[1Ac_done"
rc_failed_up="\033[1Ac_failed"
   rc_unused="\033[71G\033[1munused\033[m"
    rc_reset="\033[m\017"

   export SAG=/opt/sag
   export EXXDIR=/opt/sag/exx
   export EXXVERS=v611
   export LDPATH="$LDPATH:/${EXXDIR}/${EXXVERS}/lib"
   export PATH="$PATH:/${EXXDIR}/${EXXVERS}/bin"

   return 0
}

checkconfig() {
   if [ ! -f /${EXXDIR}/${EXXVERS}/INSTALL/exxenv ] ; then
      eerror "DCOM requires exxenv! (/${EXXDIR}/${EXXVERS}/INSTALL/exxenv)"
          return 1
   fi
   return 0
}

start() {
        ebegin "Starting DCOM ..."

   setvars

   checkconfig || return 1
   /${EXXDIR}/${EXXVERS}/INSTALL/exxenv

        ntwopper -u sag ntd 1>/dev/null 2>/dev/null
        sleep 5 1>/dev/null
        return=$rc_done
        sermon obj 2>/dev/null 1>/dev/null || return=$rc_failed

        eend 0
}

stop() {
        ebegin "Stopping DCOM ..."

   setvars

        sermon shut 2>/dev/null 1>/dev/null
        sleep 7 2>/dev/null 1>/dev/null
        return=$rc_failed
        sermon shut 2>/dev/null 1>/dev/null || return=$rc_done

        eend 0
}


/etc/init.d/vtune
Code:

#! /sbin/runscript
# This script initializes the vtune driver
# Author: Guillermo Marcus, Universitaet Mannheim, 2004

checkconfig() {
   if [ ! -d /opt/intel/vtune/vdk ] ; then
      eerror "VDK is not installed in /opt/intel/vtune/vdk !"
      return 1
   fi
}

start() {
   checkconfig || return 1

   ebegin "Starting VTune driver"
   /opt/intel/vtune/vdk/insmod-vtune   
   eend 0
}

stop() {
   ebegin "Stopping VTune driver"
   /opt/intel/vtune/vdk/rmmod-vtune   
   eend 0
}


/etc/env.d/99vtl
Code:

PATH="/opt/intel/vtune/bin"
MANPATH="/opt/intel/vtune/man"
LDPATH="/opt/intel/vtune/lib"
INTEL_LICENSE_FILE="/opt/intel/licenses"
VTUNE_GLOBAL_DIR="/opt/intel/vtune/global_data"


/etc/env.d/99dcom
Code:

PATH="/opt/sag/exx/v611/bin"
LDPATH="/opt/sag/exx/v611/lib"
SAG="/opt/sag"
EXXDIR="/opt/sag/exx"
EXXVERS="v611"


Finally, to add the scripts to start at boot up:
Code:

rc-update add dcom default
rc-update add vtune default


And to refresh the environment:
Code:

env-update
source /etc/profile



Hope this is useful for everyone.

Cheers!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum