D0 software on Linux/RedHat system(s) HOWTO.
  1. Definitions
  2. Requirements
  3. Release installation
  4. KCC 3.3f and RedHat 6.x
  5. KCC 3.3g and RedHat 6.x
  6. Graphics
  7. Troubleshooting

Definitions: for simplicity I will use the following notaions:
  • RH6 is RedHat 6.x based on new set of GNU libraries, glibc 2.x
  • RH5 is RedHat 5.x based on old set of GNU libraries libc5
  • Announcements:

        A new XFree86 version 4.0 has been released. It is supported the OpenGL/Mesa and provides hardware acceleration for some graphics cards. Installation of mrdatae etc. on RedHat 6.x is coming soon.

    Valentin Kouznetsov, UCR
    March 20, 2000










    Requirements.
    Linux distribution: Official RedHat 6.1,
    C++ compiler: KCC C++ version 3.3g-4 or 3.4 for Linux/RedHat
    FermiTools: upd/ups and d0cvs systems, need help please follow instruction how to setup these systems,
    Libraries: glibc 2.1, required by D0 software (cernlib, root, histo)
    System resources: At least 2 Gb of free disk space. More is needed if you want to build with debugging information and/or keep several build trees. A fast system. Using a 2CPU/PIII-550 and 512 Mb of RAM it takes about 1.5 hour to build everthing.
    Usefull links:
    KAI C++ compiler
    KAI C++ license can be requested from Fermilab, please contact to Qizhong Li (you need to provide node name, IP address, budget code)
    Recommendation: download source files and install by yourself for your system using gcc.


    Release installation:
    1) Setup upd/ups
    setup upd; setup ups
    2) Download and setup proper packages
    upd list -aK+ package
    upd install -f Linux+2 package version -G "-c"
    setup package
    3) Download and setup D0 release
    upd install -h www-d0 -q dist D0RunII t00.xx.00
    ups declare D0RunII t00.xx.00 -z /d0dist/dist/upsdb -m D0RunII -f NULL -r /d0dist/dist/release/t00.xx.00

    The rest is simple.

    alias gmake 'make LDFLAGS+="-Bstatic"'
    gmake all
    Comment: current release still have problem of building dependencies and invoking gmake all produce a lot of warning(s)/error(s) messages, you can ignore them or pre-build required packages.
    You can also use CVS to download and update any of your packages
    The command cd package; cvs -n up . will tell you if you need to update this package.
    Usefull tips:
    Cleaning: gmake clean
    Libraries building: gmake lib
    Test: gmake test
    Full installation: gmake all
    Individual package: gmake package.lib (or test, bin, all)
    Search for undefined symbol(s): nm -o path/lib*.a | grep symbol
    Recommendation: Create a temporary directory for release building. Copy release there and start with following packages:
    CINT, DSPACK, ZMutility, Exceptions, d0_util, d0om. It allows you to create d0cint used by other packages.


    KCC 3.3f and RedHat 6.x
    There is a way to build D0software using KCC 3.3f and RH6 system. Since KCC 3.3f was built for RH5 system its libraries rely on RH5 libc5 ones. Particular example, the (IO_stdout, IO_stdin, IO_stderr) system calls are undefined inside of KCC libraries and provided by static and/or dynamic libc5 libraries. Due to this uncompatibilities you cannot use straigtforward KCC 3.3f on your RH6 box. Solution is the following: you need to copy a static libraries (libc5) to your RH6, store them somewhere and build your executable versus these libraries, like:
    > gmake LDFLAGS+="-Bstatic -L/path_to_libc5" package
    But there is a problem here, you cannot access environment variables, call getenv("HOME") doesn't work. The only way to avoid this problem is specify explicitly the environment variable. This problem occurs due to mismatching of RH6 and libc5.
    Usefull tips:
    Set of libc5 for RH6:
    libc.a, libc_nonshared.a, libdl.a, libm.a, libstdc++.a, libz.a
    Recommendation: build static executable, it is usefull for people using extensively debugger, it is loaded at least 2 times faster.


    KCC 3.3g and RedHat 6.x
    This version of KAI C++ compiler is based on new glibc system and you can use it on any Linux based on glibc. Installation on RH6 is straightforward. Download a new release and installed with
    > gmake LDFLAGS+="-Bstatic" all
    There is a problem with dynamic executables which is under investigation now. The option -Bstatic will allow you to build a static executable.


    D0 graphics and RedHat 6.x
    There are two different graphics projects under way in D0 collaboration. One of them is using OpenInventor and another based on Motif interaces. (Installation description is coming soon).
    D0 graphics tips:
    OpenInventor is built for KAI C++ 3.3f and RH5 platform.



    For comparison I've used my node (d0lxucr02) which is equipped with 2CPU/PIII-550 Mhz and 512 of RAM, LVD-SCSI3 disks and central cluster machine d0mino. Time was produced by time program, invoking
    time D0reco_x -rcp runD0reco.rcp
    Comparison
    Executable Notes d0mino (time output) d0lxucr02 (time output)
    D0reco_x Linux/d0lxucr02: static executable, size 111Mb
    SGI/d0mino: dynamic executable, size 139Mb.
    Test program was running with full global tracking software using sample of single muon events.
    User CPU time: 29.347 (sec)
    System CPU time: 0.933 (sec)
    Real time: 0:34.67 (sec)
    CPU percentage (user+system)/real: 87.3%
    User CPU time: 15.220 (sec)
    System CPU time: 0.240 (sec)
    Real time: 0:15.89 (sec)
    CPU percentage (user+system)/real: 97.2%


    Usefull links
    1. The Professor's Guide to Installing the D0 Environment on Off-site Linux Systems can be found here
    2. D0 Release Users Group (d0rug@fnal.gov) mailing list archive
    3. ODS archive
    4. D0 graphics web page