CERN BOX

  • CERNBox DFS to CERNBox migration (talk on 13 Jan 2020)

Docker

C++

Debugger

Whenever you run into an exception, the first thing that you should do is to figure out where it is coming from exactly. Unfortunately unlike StatusCode based errors, exceptions don't usually advertise which function/file/line they were thrown from. You need to use a debugger to get that information.
With GDB you can stop the execution on exceptions with:

(gdb) catch throw
The "only" tricky thing is figuring out how to run GDB correctly. These days you should only really be running EventLoop jobs from PyROOT python scripts. So if you normally execute your job with simply:
MySuperJob.py
, then with gdb you'd run it like:
# gdb python
...
(gdb) catch throw
(gdb) run /full/path/to/MySuperJob.py
...

EOS access

I just managed to get CERN /eos/ access working on symmetry and was advised to share the information here.

For access, you need to use your CERN credentials via kerberos.
I added the following line in my ~/.bash_profile:
export KRB5_CONFIG=$ATLAS_LOCAL_ROOT_BASE/user/krb5.conf
Which configures kerberos to use CERN.CH as the host.

Once this is set up, the kerberos ticket is requested using:
$ kinit ekay@CERNNOSPAMPLEASE.CH
(note - with the above krb5.conf file, you can also just type kinit or just kinit if your username on symmetry is the same as your username on lxplus)

I access /eos/ using xrootd
$ lsetup xrootd

The tool is then 'xrdfs', documented here.

More info is here.

Main thing to note is the host - for /eos/user/... it's eosatlas.cern.ch, while for something like /eos/atlascerngroupdisk/... it's eosatlas.cern.ch
Most of the commands have the structure xrdfs
So, for example, if I want to list a directory I would do:
$ xrdfs eosatlas.cern.ch ls /eos/atlas/atlascerngroupdisk/phys-exotics/jdm/monojet/ntuples/R21/andreas/MJ350_MC16a/

To copy a file to /eos/ you can use xrdcp, which has a different syntax
$ xrdcp test.txt root://eosuser.cern.ch//eos/user/e/ekay...
NOTE that, due to the nature of /eos/, this will automatically create any directory structure you give in the path.

xrootd can also be used in root.
e.g. inputfile = ROOT.TFile("root://eosuser.cern.ch//eos/user/e/ekay/test.root", "READ")

Hope this is helpful.
Cheers, Ellis

-- KenjiHamano - 2015-06-11

Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r7 - 2020-09-08 - KenjiHamano
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback