TWiki> TOTEM Web>SoftwareHowto (revision 14)EditAttachPDF

Software HOWTO

How to set up CMSSW workspace ?

Import some enviromental variables (this will enable you to run scram command for further compilation):

source /afs/

Go to empty directory and fetch local copy of CMS workspace:

scram project CMSSW CMSSW_3_1_1

Now you need to go to newly created CMSSW_3_1_1/src directory, put there you CMSSW modules, and start compilation.

How to compile your code (modules) ?

Import some enviromental variables (this will enable you to run scram):

source /afs/

Go to CMSSW_?_?_?/src or subdirectory of that. Compile everything under current directory

scram b

If you want to compile using parallel threads, you can specify how many of them you want. This will speed up compilation, especially on multicore/multiprocessor machines like pctotem31:

scram b -j 4

How to run your code (configuration file) ?

Import some environmental variables (this will enable you to run scram):

source /afs/

Go to CMSSW_?_?_?/src. Set up runtime enviroment (this will enable you to run cmsRun command):

eval `scram runtime -sh`

Run your config file:

cmsRun path_to_configuration_file.cfg

How to browse output file in ROOT ?

SSH to lxplus

ssh -X lgrzanka@lxplus

Import some environmental variables:

source /afs/

Change current dir to CMSSW workspace:

cd /afs/

Setup runtime:

eval `scram runtime -sh`

Setup root variables (you can use more up to date ROOT version):

export ROOTSYS=/afs/
export PATH=$PATH:$ROOTSYS/bin

Enter root and type:


To browse ROOT file use:

TBrowser t;

to plot some data from tree structure, RightClick on Event and choose StartViewer

To quit from ROOT use:


How to use CASTOR storage ?

  • nsls - list home castor directory
  • nsls /castor....
  • nsls -l - long listing
  • rfcp /castor/ my/local/file . - copy from castor to local disk

How to indent C++ code ?

How to manage jobs on lxbatch ?

  • Submit: bsub
  • Check status: bjobs
  • Kill: bkill

How to correct strange behavior of Backspace key on lxplus ?

If after pressing Backspace key you got something like ^?, then type:

stty sane

and your console will behave well.

How to create and SSH tunnel from outer world to computers located at CERN:

Open terminal on you local PC and type for example:

=ssh -N

Above command will bind port 30137 on localhost (your own PC) with port 8080 of via lxplus host. So, instead of using settings you shall use localhost:30137 or

Remember that if you are normal user on your own PC, then you need to use high local ports (number > 10000).

-- LeszekGrzanka - 05-Oct-2010

Edit | Attach | Watch | Print version | History: r17 < r16 < r15 < r14 < r13 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r14 - 2010-10-05 - LeszekGrzanka
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    TOTEM 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