Archive for the ‘Installation’ Category

Matt requested that /proc/sys/vm/overcommit_memory is set to 2 on some nodes. To do this, edit /etc/sysctl.conf. To the end of the file, add this line:

vm.overcommit_memory = 2

To make it take effect without rebooting, run:

sysctl -p

To determine which version of a python package using, import the package and then check the version. Something like this:

>>> import matplotlib
>>> matplotlib.__version__
'1.2.0'

We were missing the tkinter package on some of our systems and this was causing a problem with matplotlib. You could see the error by running these commands:

import matplotlib
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt
Traceback (most recent call last):
 File "", line 1, in 
 File "/usr/lib64/python2.6/site-packages/matplotlib/pyplot.py", line 97, in 
   _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
 File "/usr/lib64/python2.6/site-packages/matplotlib/backends/__init__.py", line 25, in pylab_setup
   globals(),locals(),[backend_name])
 File "/usr/lib64/python2.6/site-packages/matplotlib/backends/backend_tkagg.py", line 11, in 
   import matplotlib.backends.tkagg as tkagg
 File "/usr/lib64/python2.6/site-packages/matplotlib/backends/tkagg.py", line 2, in 
   from matplotlib.backends import _tkagg
ImportError: cannot import name _tkagg

The solution was to install the tkinter package (yum install tkinter) and then recompile matplotlib so that it used tkinter.

$ python setup.py build
$ python setup.py install

After that, the same commands as above worked fine.

To determine the version of matplotlib, you can either look in /usr/lib64/python26/site-packages for the matplotlib egg file (the version should be in the name of the file) or import the module in python itself.

[ ~]$ python
Python 2.6.6 (r266:84292, Aug 28 2012, 10:55:56) 
[GCC 4.4.6 20120305 (Red Hat 4.4.6-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib
>>> matplotlib.__version__
'0.99.1.1'
>>> 

This is the default version get with RHEL6. To use a newer version of matplotlib, remove the python-matplotlib and seekwatcher packages. Download the latest matplotlib and install that.

[ matplotlib-1.2.0]# python setup.py build
[ matplotlib-1.2.0]# python setup.py install

The run the check again and you should see the newer version being loaded.

[ matplotlib-1.2.0]# python
Python 2.6.6 (r266:84292, Aug 28 2012, 10:55:56) 
[GCC 4.4.6 20120305 (Red Hat 4.4.6-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib
>>> matplotlib.__version__
'1.2.0'

The NVIDIA linux driver cannot be installed when the system is using the nouveau driver. The nouveau driver has been installed on all of the systems I’ve set up so far. To use the nvidia driver, do the following:

1. Edit /etc/grub.conf and add rdblacklist=nouveau vga=791 to the end of the kernel line.

2. yum remove xorg-x11-drv-nouveau

3. Edit /etc/inittab to change the runlevel to boot to from 5 to 3.

4. Create the file /etc/modprobe.d/blacklist-nouveau.conf and in it, put the following line:
blacklist nouveau

5. Reboot

6. Install the Nvidia driver and make sure to run the nvidia config in the last step.

7. Test it out by either rebooting or running init 5.

RHEL6 seems to prefer to use UUIDs in /etc/fstab instead of device names. So, will want to do something like this to get the uuid.

[root@server]# blkid|grep sda1 >> /etc/fstab

This then gets added to /etc/fstab.
/dev/sda1: UUID=”a7a23967-f2c5-43a7-9245-270a818b6106″ SEC_TYPE=”ext2″ TYPE=”ext3″

Edit the line so it looks like this:
UUID=a7a23967-f2c5-43a7-9245-270a818b6106 /local/s13 ext3 defaults 1 2

Install epel repo to download some needed packages:

http://mirror.chpc.utah.edu/pub/epel/6/i386/repoview/epel-release.html

Packages want to get from epel:

patchy
cernlib-2006
(will also get xbae)

From this website, download:

Manual
Makefile
isajet.car
isared.tar.gz

Unzip, but don’t untar the isared.tar.gz file.

The cernlib from the epel repo puts the files we are concerned about in /usr/lib64/cernlib/2006-g77/lib. However, it puts a version number on the libraries we want to use and this will cause an error in our Makefile. So, in /usr/lib64/cernlib/2006-g77/lib, make the following links:

ln -s libpacklib.so.1 libpacklib.so
ln -s libpdflib804.so.2 libpdflib804.so
ln -s libmathlib.so.2 libmathlib.so
ln -s libkernlib.so.1 libkernlib.so

Next, edit the Makefile with our info. Here is what the one I used looked like:

#       Do not change this -- you will break everything.
SHELL = /bin/csh

########## Installation parameters #####################################

#       Some versions of make (e.g. Linux) treat inconsequential warnings
# as errors and stop. Ignore all errors; comment out if possible:
##.IGNORE:

#       Name for temporary subdirectory. This will be deleted and 
# recreated:
MAKETMP = ./MakeTmpDir

#       Link with CERN libraries. This is recommended for HP, IBMRT, or 
# LINUX to get date and time information but is not required:
##CERN = NOCERN
CERN = CERN

#       Directories for Cernlib, terminated with a /. These must be set
# if you select CERN or PDFLIB:
CERNDIR = /usr/lib64/cernlib/
CERNBIN = $(CERNDIR)/bin/
CERNLIB = $(CERNDIR)lib/
CERNLIB2 = $(CERNDIR)2006-g77/lib/

#       PDFLIB support. PDFLIB (part of the CERN library) contains many
# partion distributions but produces a larger executable image:
PDFLIB =
#PDFLIB = PDFLIB

#       RANLUX support. RANLUX provides better random numbers than the
# standard RANF, and each seed gives an independent sequence. It is
# more difficult to restart and slightly slower.
RANLUX = RANLUX
#RANLUX = NORANLUX

#       Computer type. Most only differ in minor ways, e.g., the system
# clock interface. Uncomment the right one:
# ANSI          ANSI Fortran
# DECS          DECStation with Ultrix
# HPUX          HP/700 with HPUX
# IBMRT         IBM RS/6000 with AIX
# LINUX         PC with LINUX and f2c/gcc or g77 or Absoft f77
# OSF           Digital OSF on Alpha processor
# SGI           Silicon Graphics with IRIX
# SUN           Sparc or PC with Solaris
#MACHINE = ANSI
#MACHINE = DECS
#MACHINE = HPUX
#MACHINE = IBMRT
MACHINE = LINUX
#MACHINE = OSF
#MACHINE = SGI
#MACHINE = SUN

#       Fortran 77 compiler.
#F77 = f77
#       For HPUX; note that f77 on HPUX is brain dead. fort77 is also an
# alternate f2c/gcc interface on Linux:
#F77 = fort77
#       GNU Fortran compiler
#F77 = g77
F77 = /usr/bin/g77

#       Fortran compile flags: Want -c, highest safe optimization, all
# variables static, and postpended underscore for Cernlib compatibility.
# Uncomment the right one or make your own:
#       DECS
#FFLAGS = -c -O -static -w
#       HPUX, -O is broken
#FFLAGS = -c -O2 -K +ppu -w
#       IBMRT
#FFLAGS = -c -O -qextname -w
#       LINUX with f2c/gcc or g77. The -fno-silent displays progress...
FFLAGS = -c -O -fno-automatic -fno-silent
#       LINUX  with Absoft Fortran
#FFLAGS = -c -O -w -f -s
#       OSF
#FFLAGS= -c -O -w
#       SGI
#FFLAGS = -c -O -static -w
#       SUN - the second option traps floating errors
#FFLAGS = -c -O -w
#FFLAGS = -c -O -w -fnonstd -ftrap=common

#       Use fsplit or CERN's fcasplit to split the whole Fortran source into
# individual subroutines:
#FSPLIT = $(CERNBIN)fcasplit
#FSPLIT = fsplit
FSPLIT = /usr/bin/fcasplit

#       Link command for Fortran, c.f. $(F77):
#LINK = f77
#LINK = fort77
#LINK = g77
LINK = $(F77)

#       Extra libraries (e.g. Cernlib) and flags for link. If you want 
# PDFLIB support, you must also define $(PDFLIB) above. The Zebra
# version requires libpacklib.a.
#LFLAGS =
#LFLAGS = -L$(CERNLIB) -lmathlib -lkernlib
#LFLAGS = -L$(CERNLIB) -lpdflib804 -lmathlib -lkernlib
LFLAGS = -L$(CERNLIB) -L$(CERNLIB2) -lpdflib804 -lpacklib -lmathlib -lkernlib

#       Ranlib command if required (it is for Sun 4.x and Linux):
RANLIB = ranlib
#RANLIB = $(ECHO)

#       Name for this Makefile:
MAKEFILE = Makefile

#       Patchy commands. YPATCHY can be either ypatchy or nypatchy,
# perhaps with a full path. A temporary cradle file YCRADLE is required;
# it is deleted and recreated:
#YPATCHY = $(CERNBIN)ypatchy
#YPATCHY = $(CERNBIN)nypatchy
YCRADLE = ./tmpcradle.cra
YPATCHY = /usr/bin/nypatchy

#       Echo command. /bin/echo works on most (all?) systems; plain echo
# fails on AIX 4.1:
ECHO = /bin/echo

#       Remove command:
RM = /bin/rm

#       Parameters to use ISATOOLS and ISAFLAVR. Note ISAFLAVR does not
# create a separate library.

ISATOOLS = ISATOOLS
#ISATOOLS =

LIBTOOLS = -lisared
#LIBTOOLS =

ISAFLAVR = ISAFLAVR
#ISAFLAVR =

########## End of installation parameters ##############################

Next make isatools.

[root@higgs isajet]# make isatools

Takes a while to run. This creates the file libisared.a.

Next run make.

[root@higgs isajet]# make

This should produce the following executables: isajet.x, isasusy.x and isasugra.x. You can run make clean to get rid of the temporary files.

After starting ROOT, need to check that it can make plot windows. In root, run this command to open up a new window.

root [0] TCanvas c

If on starting matlab, you get this error:

terminate called after throwing an instance of 'std::runtime_error'
  what():  locale::facet::_S_create_c_locale name not valid

Set this environment variable.

$ export LC_ALL="en_US.utf8"

Matlab should then start ok.

To run a kickstart installation for RHEL6, boot as usual. At the window “Welcome to Red Hat Enterprise Linux 6.0”, select “Install or upgrade an existing system”. Press the tab key to stop the boot process. You should be presented with a prompt that looks like this:

> vmlinuz initrd=initrd.img

Add your kickstart information to the end of this prompt. So, it should look something like this:

> vmlinuz initrd=initrd.img linux ks=http://rhel6.example.com/ks/cfg/org/24/label/kickstart_file 
ip=192.168.4.45 
netmask=255.255.255.0 
gateway=192.168.4.1 
dns=192.168.5.14

(all on one line)

A student wanted the latest version of ROOT added to the ups database. The software was already installed in /cdf/code/cdfsoft/root, but didn’t show up with ups list -a root. To fix this, I became the owner of all our cdf software and ran the following command:

ups declare root v_5_22_00j -r root/v5_22_00j-GCC_3_4_6/Linux+2.6 -f Linux+2 -z /cdf/code/cdfsoft/products/upsdb -m root.table -q GCC_3_4_6

It took a few times to get this correct. If you make a mistake you can run the undeclare command, or even easier, just delete the file in /cdf/code/cdfsoft/products/upsdb/root/v_5_22_00j and then run the declare command again.

All the software is installed in /cdf/code/cdfsoft/products. Then look in root/v5_22_00j-GCC_3_4_6 to find that version. The important bit for ups is the table file, which in this case is in /cdf/code/cdfsoft/products/root/v5_22_00j-GCC_3_4_6/Linux+2.6/ups/root.table.

[/ups]$ more root.table 
File    = table
Product = root

Group:

  Flavor     = ANY
  Qualifiers = "GCC_3_4_6"

  Flavor     = ANY
  Qualifiers = "GCC_3_4_6:debug"

  Flavor     = ANY
  Qualifiers = "64bit:GCC_3_4_6"

  Flavor     = ANY
  Qualifiers = "64bit:GCC_3_4_6:debug"

Common:
  Action = setup
    setupEnv()
    prodDir()
    envSet(ROOTSYS,${UPS_PROD_DIR});
    envPrepend(LD_LIBRARY_PATH,${ROOTSYS}/lib)
    envPrepend(PYTHONPATH,${ROOTSYS}/lib)
    pathPrepend(PATH,${ROOTSYS}/bin)
End:

This is the file that lists the flavor and qualifiers that must be used when declaring the version.