Using ROOT 6.09 on CVMFS

I am writing a software tool for my working group that has the software
requirements of:

  • ROOT v6.09
  • Python 2.7 (or greater)
  • PyROOT
  • root_numpy

From the ROOT 6.09/02 release notes it seems that there was an intentional move to release only a CentOS 7 version on CVMFS. I assume this is in preparation for CERN transitioning to SL7 in the near(ish) future.

My tool relies on TRatioPlot and as my group wants to be able to use it not only on lxplus7.cern.ch but also on different Tier-2 and Tier-3 sites need it to be CVMFS based. However, as all of those sites aren’t running SL7 at the moment it seems that these two constraints (ROOT 6.09 and CVMFS on SL6) are incompatible. Is there any known way to achieve this? Or am I going to have to just do without TRatioPlot for the next few years?

Hi,

The problem with SLC6 is that its compiler is really old - people had to set up a different compiler, and that’s always a mess. Now you can just run ROOT, as is.

For SLC6 you can use the LCG releases which package a whole lot of dependencies (including the compiler). I thought that this is set up like this:

$ . /cvmfs/sft.cern.ch/lcg/releases/LCG_88/ROOT/6.08.06/x86_64-slc6-gcc62-opt/ROOT-env.sh
$ root -l -b

but the first line gives

-bash: /cvmfs/sft.cern.ch/lcg/releases/LCG_88/ROOT/6.08.06/x86_64-slc6-gcc62-opt/bin/root-config: /cvmfs/sft.cern.ch/lcg/releases/curl/7.19.7-dde5e/x86_64-slc6-gcc62-opt/bin/en: bad interpreter: No such file or directory

I have contacted the LCG people, I’ll let you know…

Axel.

They are working on a fix. Until then, please use the previous version:

. /cvmfs/sft.cern.ch/lcg/releases/LCG_87/ROOT/6.08.02/x86_64-slc6-gcc62-opt/ROOT-env.sh 

Axel.

Thanks for the info, Axel. However, when I do

$ . /cvmfs/sft.cern.ch/lcg/releases/LCG_87/ROOT/6.08.02/x86_64-slc6-gcc62-opt/ROOT-env.sh

on lxplus I get the following:

Unknown option: -r
Unknown option: -w
Unknown option: -r
Unknown option: --
Unknown option: -r
Unknown option: --
Unknown option: -.
Unknown option: -r
usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `python -h' for more information.

Also, I’m concerned that even this might not work, as there was a seg fault inducing bug when using TRatioPlot with PyROOT (that I assumed appeared in ROOT 6.08). This was fixed in ROOT 6.09, but I need to check to see if it was also corrected in ROOT 6.08.

I asked the authors of that script for help - it works for me. But I have bash as shell - maybe you have a different one?

To get a super recent build you can take the nightlies, e.g. “dev4” for the tip of the v6-08-00-patches branch:

. /cvmfs/sft.cern.ch/lcg/nightlies/dev4/Tue/ROOT/v6-08-00-patches/x86_64-slc6-gcc49-opt/ROOT-env.sh

or “dev3” for a snapshot of the master:

. /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/ROOT/HEAD/x86_64-slc6-gcc62-opt/ROOT-env.sh 

You can take a debug build, different compilers, etc.

Axel.

1 Like

Hm, are you setting up any environments before you run that? I’m still having problems.

For comparison at login to lxplus for me:

$ uname -a
Linux lxplus052 2.6.32-642.15.1.el6.x86_64 #1 SMP Fri Feb 24 16:56:37 CET 2017 x86_64 x86_64 x86_64 GNU/Linux
$ echo $SHELL
/bin/bash
$ root-config --version
5.34/36
$ python --version
Python 2.6.6
$ gcc --version | head -n 1
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-17)

and in my .bash_profile I have this setup at login (but I’ve tested removing it to no effect)

export ATLAS_LOCAL_ROOT_BASE=/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase
alias setupATLAS='source ${ATLAS_LOCAL_ROOT_BASE}/user/atlasLocalSetup.sh'
setupATLAS

and then this happens

$ . /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/ROOT/HEAD/x86_64-slc6-gcc62-opt/ROOT-env.sh
Unknown option: -r
Unknown option: -w
Unknown option: -r
Unknown option: --
Unknown option: -r
Unknown option: --
Unknown option: -.
Unknown option: -r
usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `python -h' for more information.
Unknown option: -r
Unknown option: -w
Unknown option: -r
Unknown option: --
Unknown option: -r
Unknown option: --
Unknown option: -.
Unknown option: -r
usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `python -h' for more information.

I’m very confused (as to why). Obviously the two python commands in ROOT-env.sh are throwing the errors, but I’m not sure what that is.

What you have proposed seem like they could be viable solutions, but I won’t know until I can test them.

You could enable same tracing like this:

set -x
. /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/ROOT/HEAD/x86_64-slc6-gcc62-opt/ROOT-env.sh

Using tracing, the output is the following (and attached as a log file):

$ set -x
++ printf '\033]0;%s@%s:%s\007' feickert lxplus009 '~'
$ . /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/ROOT/HEAD/x86_64-slc6-gcc62-opt/ROOT-env.sh
+ . /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/ROOT/HEAD/x86_64-slc6-gcc62-opt/ROOT-env.sh
++++ dirname -- /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/ROOT/HEAD/x86_64-slc6-gcc62-opt/ROOT-env.sh
+++ cd /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/ROOT/HEAD/x86_64-slc6-gcc62-opt
+++ pwd
++ scriptdir=/cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/ROOT/HEAD/x86_64-slc6-gcc62-opt
+++ basename /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/ROOT/HEAD/x86_64-slc6-gcc62-opt
++ BINFO_PLATFORM=x86_64-slc6-gcc62-opt
++ /usr/bin/which --tty-only --read-alias --show-dot --show-tilde lcgenv
++ alias
++ lcgenv=
++ idx=1
++ dir=/cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/ROOT/HEAD/x86_64-slc6-gcc62-opt
++ '[' -z '' ']'
+++ ls -lhBF --color=auto '/cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/ROOT/HEAD/x86_64-slc6-gcc62-opt/lcgenv/*/*/lcgenv'
++ test -z ''
+++ dirname /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/ROOT/HEAD/x86_64-slc6-gcc62-opt
++ dir=/cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/ROOT/HEAD
++ let 'idx = 1 + 1'
++ '[' 2 -ge 15 ']'
++ '[' -z '' ']'
+++ ls -lhBF --color=auto '/cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/ROOT/HEAD/lcgenv/*/*/lcgenv'
++ test -z ''
+++ dirname /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/ROOT/HEAD
++ dir=/cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/ROOT
++ let 'idx = 2 + 1'
++ '[' 3 -ge 15 ']'
++ '[' -z '' ']'
+++ ls -lhBF --color=auto '/cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/ROOT/lcgenv/*/*/lcgenv'
++ test -z ''
+++ dirname /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/ROOT
++ dir=/cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue
++ let 'idx = 3 + 1'
++ '[' 4 -ge 15 ']'
++ '[' -z '' ']'
+++ ls -lhBF --color=auto /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/lcgenv/1.3.3/x86_64-centos7-gcc62-dbg/lcgenv /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/lcgenv/1.3.3/x86_64-centos7-gcc62-opt/lcgenv /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/lcgenv/1.3.3/x86_64-slc6-gcc49-dbg/lcgenv /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/lcgenv/1.3.3/x86_64-slc6-gcc49-opt/lcgenv /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/lcgenv/1.3.3/x86_64-slc6-gcc62-dbg/lcgenv /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/lcgenv/1.3.3/x86_64-slc6-gcc62-opt/lcgenv /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/lcgenv/1.3.3/x86_64-ubuntu1604-gcc54-dbg/lcgenv /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/lcgenv/1.3.3/x86_64-ubuntu1604-gcc54-opt/lcgenv
++ test -z '-rwxr-xr-x. 1 cvmfs cvmfs 19K Nov  4 19:48 /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/lcgenv/1.3.3/x86_64-centos7-gcc62-dbg/lcgenv*
-rwxr-xr-x. 1 cvmfs cvmfs 19K Nov  4 19:50 /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/lcgenv/1.3.3/x86_64-centos7-gcc62-opt/lcgenv*
-rwxr-xr-x. 1 cvmfs cvmfs 19K Oct  3 15:25 /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/lcgenv/1.3.3/x86_64-slc6-gcc49-dbg/lcgenv*
-rwxr-xr-x. 1 cvmfs cvmfs 19K Oct 10 11:18 /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/lcgenv/1.3.3/x86_64-slc6-gcc49-opt/lcgenv*
-rwxr-xr-x. 1 cvmfs cvmfs 19K Nov  4 21:01 /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/lcgenv/1.3.3/x86_64-slc6-gcc62-dbg/lcgenv*
-rwxr-xr-x. 1 cvmfs cvmfs 19K Nov  4 20:50 /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/lcgenv/1.3.3/x86_64-slc6-gcc62-opt/lcgenv*
-rwxr-xr-x. 1 cvmfs cvmfs 19K Dec  6 11:25 /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/lcgenv/1.3.3/x86_64-ubuntu1604-gcc54-dbg/lcgenv*
-rwxr-xr-x. 1 cvmfs cvmfs 19K Nov  4 19:56 /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/lcgenv/1.3.3/x86_64-ubuntu1604-gcc54-opt/lcgenv*'
+++ head -1
+++ ls -lhBF --color=auto /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/lcgenv/1.3.3/x86_64-centos7-gcc62-dbg/lcgenv /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/lcgenv/1.3.3/x86_64-centos7-gcc62-opt/lcgenv /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/lcgenv/1.3.3/x86_64-slc6-gcc49-dbg/lcgenv /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/lcgenv/1.3.3/x86_64-slc6-gcc49-opt/lcgenv /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/lcgenv/1.3.3/x86_64-slc6-gcc62-dbg/lcgenv /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/lcgenv/1.3.3/x86_64-slc6-gcc62-opt/lcgenv /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/lcgenv/1.3.3/x86_64-ubuntu1604-gcc54-dbg/lcgenv /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/lcgenv/1.3.3/x86_64-ubuntu1604-gcc54-opt/lcgenv
++ lcgenv='-rwxr-xr-x. 1 cvmfs cvmfs 19K Nov  4 19:48 /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/lcgenv/1.3.3/x86_64-centos7-gcc62-dbg/lcgenv*'
++ LCGDIR=/cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue
+++ dirname /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue
++ dir=/cvmfs/sft.cern.ch/lcg/nightlies/dev3
++ let 'idx = 4 + 1'
++ '[' 5 -ge 15 ']'
++ '[' -z '-rwxr-xr-x. 1 cvmfs cvmfs 19K Nov  4 19:48 /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/lcgenv/1.3.3/x86_64-centos7-gcc62-dbg/lcgenv*' ']'
+++ mktemp
++ tmpenv=/tmp/feickert/tmp.caCst9jI8N
++ find /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/ROOT/HEAD/x86_64-slc6-gcc62-opt -type f -iname '.buildinfo*' -print0
++ IFS=
++ read -r -d '' buildinfo
+++ cat /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/ROOT/HEAD/x86_64-slc6-gcc62-opt/.buildinfo_ROOT.txt
+++ sed 's/, /\n/g'
+++ awk -F ' ' '/^NAME/{print $2}'
++ BINFO_NAME=ROOT
+++ cat /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/ROOT/HEAD/x86_64-slc6-gcc62-opt/.buildinfo_ROOT.txt
+++ sed 's/, /\n/g'
+++ awk -F ' ' '/^VERSION/{print $2}'
+++ cut -d, -f 1
++ BINFO_VERSION=HEAD
++ cd /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue
++ python -rwxr-xr-x. 1 cvmfs cvmfs 19K Nov 4 19:48 /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/lcgenv/1.3.3/x86_64-centos7-gcc62-dbg/lcgenv /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/lcgenv/1.3.3/x86_64-centos7-gcc62-dbg/lcgenv-env.sh ROOT HEAD x86_64-slc6-gcc62-opt
Unknown option: -r
Unknown option: -w
Unknown option: -r
Unknown option: --
Unknown option: -r
Unknown option: --
Unknown option: -.
Unknown option: -r
usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `python -h' for more information.
++ IFS=
++ read -r -d '' buildinfo
++ '[' '!' -s /tmp/feickert/tmp.caCst9jI8N ']'
++++ dirname /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/ROOT/HEAD/x86_64-slc6-gcc62-opt
+++ basename /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/ROOT/HEAD
++ BINFO_VERSION=HEAD
+++++ dirname /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/ROOT/HEAD/x86_64-slc6-gcc62-opt
++++ dirname /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/ROOT/HEAD
+++ basename /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/ROOT
++ BINFO_NAME=ROOT
++ cd /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue
++ python -rwxr-xr-x. 1 cvmfs cvmfs 19K Nov 4 19:48 /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/lcgenv/1.3.3/x86_64-centos7-gcc62-dbg/lcgenv /cvmfs/sft.cern.ch/lcg/nightlies/dev3/Tue/lcgenv/1.3.3/x86_64-centos7-gcc62-dbg/lcgenv-env.sh ROOT HEAD x86_64-slc6-gcc62-opt
Unknown option: -r
Unknown option: -w
Unknown option: -r
Unknown option: --
Unknown option: -r
Unknown option: --
Unknown option: -.
Unknown option: -r
usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `python -h' for more information.
++ source /tmp/feickert/tmp.caCst9jI8N
++ rm -f /tmp/feickert/tmp.caCst9jI8N
++ printf '\033]0;%s@%s:%s\007' feickert lxplus009 '~'

So it can be seen that this is a problem because lcgenv is set using ls instead of using find. I have aliased ls to be alias ls='ls -lhBF --color=auto'. Removing this fixes the problem. Many thanks, @mato, for the suggestion.

Given that aliasing ls is fairly common, can we either have a warning RE: this at the top of these scripts, or just using find by something along the lines of (a more elegant form of)

function getFullFilePath () {
    if [[ "$#" -eq 2 ]]; then
        echo "$(readlink -f "$(find $2 -iname $1)")"
    else echo "$(readlink -f "$(find . -iname $1)")"
    fi
}

function getFullDirPath () {
    pth="$(getFullFilePath $1)"
    if [[ -z "${pth}" ]]; then
        echo ""
    else echo "$(dirname "${pth}")"
    fi
}

I understand that this is another issue and that this really isn’t the place to discuss it, but I don’t think it is that crazy to alias ls.

Good that the origin of the problem is understood. I 'll pass the issue to the author of the script to improve it.
Created https://sft.its.cern.ch/jira/browse/SPI-968
I think a simple replacement of ls by \ls should solve this particular problem.

1 Like

@Axel’s suggestion of using the nightlies v6-08-00-patches branch works and solves my problem.

. /cvmfs/sft.cern.ch/lcg/nightlies/dev4/Tue/ROOT/v6-08-00-patches/x86_64-slc6-gcc49-opt/ROOT-env.sh

(The dev3 master snapshot causes a segfault for some reason, but I can worry about that later).

If I’m going to start using this in my tool, I have a question RE: the nightlies. I don’t know how the nightlies actually work, so If I want to always in the future be sourcing from the branch of v6.08 with the latest patches then will that path always work? Given that it has a day of the week in the path name I assume not. Is that correct? Or do I not understand the path naming conventions here?

Hi,

That’s correct - we don’t have a “latest” link to figure out which day to use. Shall I ask for that?

But either way, if you build software on top, changing the ROOT version underneath is probably not a good idea. We do have binary incompatible changes from time to time :slight_smile:

Axel.

Yeah, @Axel if it is possible to get that link I think it would be helpful.

You make a good point. However, if I’ve designed most of the code to be able to deal with ROOT v6.09 safely then if I’m just using the latest patched version of ROOT v6.08 then as long as a patch to TRatioPlot doesn’t cause TRatioPlot to self induce a segfault I think I should be okay(?). Or is that horribly naive?

Hi,

That’s the binary compatibility issue that I was referring to: if we change ROOT from Tue to Wed in a binary incompatible way, your program built against Tuesday’s ROOT would not run anymore on Wednesday.

I.e. no, in general you need to build a dedicated binary of your program for a given ROOT version. Using the v6.08 release series sounds like the right approach.

Axel.

Okay great. So does it seem like getting a path to the latest v6-08-00-patches release on cvmfs will be a feasible thing?

Hi,

But it won’t help you, as I explained: you build against “latest” on Tuesday, then because of a change in ROOT you cannot run anymore on Wednesday.

So you’ll have to take release tags. You can use a nightly for cross checking that a patch has been integrated and works.

In the meantime, LCG88 has been fixed, so you should be able (likely without the ls alias) to do:

$ . /cvmfs/sft.cern.ch/lcg/releases/LCG_88/ROOT/6.08.06/x86_64-slc6-gcc62-opt/ROOT-env.sh
$ root -l -b

Cheers, Axel.

Okay, thanks for the news. I think I understand what you mean now, however I have one more dumb question about LCG nightlies, if you don’t mind.

You suggested using nightlies for checking that a patch has been integrated. How do I know that a patch that has been applied to the nightlies has also been integrated into the latest version tag? Just by checking to see if the tag has been increased lately?

So for example, if it is currently a Monday and I have reported a bug in ROOT v6.08 and the latest version number in LCG_88 and on Tuesday if I run

. /cvmfs/sft.cern.ch/lcg/nightlies/dev4/Tue/ROOT/v6-08-00-patches/x86_64-slc6-gcc49-opt/ROOT-env.sh

and the bug is fixed then I should just assume that as soon as LCG_89 is released that I can run

$ . /cvmfs/sft.cern.ch/lcg/releases/LCG_89/ROOT/6.08.06/x86_64-slc6-gcc62-opt/ROOT-env.sh

and the patch will be in there? Or do I have this wrong?

Hi,

We (ROOT) only tag once every month or so. So if it’s not in 6.08/06 but in the nightlies then it will appear in 6.08/08. 6.08/06 is never updated itself; it is superseded by a (possibly binary incompatible, thus the new tag!) 6.08/08.

Now, due to you using lxplus (SLC6) instead of lxplus7 (CC7) you also depend on the LCG releases. I would assume that LCG_89 will then pick up 6.08/08 once we (ROOT) have released it. But maybe LCG_89 gets released earlier - that’s not under our control. But indeed: as soon as we (ROOT) have released 6.08/08 the next LCG release should contain the fix.

Or: log on (and tell your users to log on) to lxplus7 and simply use 6.09/02 from . /cvmfs/sft.cern.ch/lcg/app/releases/ROOT/6.09.02/x86_64-centos7-gcc48-opt/root/bin/thisroot.sh.

Summary:

  • if you build software on top of ROOT, use releases
  • if you want simplicity, use lxplus7 (which has a compiler that is reasonably new)
  • if you want everything provided, use LCG releases - but then you add latency for new ROOT releases.

Cheers, Axel.

1 Like

I’ve updated the previous post -

ssh lxplus7.cern.ch
. /cvmfs/sft.cern.ch/lcg/app/releases/ROOT/6.09.02/x86_64-centos7-gcc48-opt/root/bin/thisroot.sh.

works just fine!

Axel.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.