Useful commands on lxplus etc.

Some general commands

 setenv<project>[<version>] = SetupProject --build-env <Project>[<version>] 
Create a working directory for a given project

 Setup<project> = SetupProject <project> 
Load environment variables for the project, takes into account value of CMTCONFIG

 getpack -i 
List and choose from a list of all packages

 lhcb_bkk 
executes Feicim for choosing dataset

 fs listquota 
your local disk quota

 cmt show version 
shows version number of a package

 cmt show uses 
shows dependencies of a package

 SetupProject LHCb; dump_db_to_files.py  -c sqlite_file:$SQLITEDBPATH/DDDB.db/DDDB  -s /param/ParticleTable.txt -d ./ -v 
lists all particles and their properties

Check in new .dec files and Stripping lines

  • 1. Be a member of the group: lhcb-svn-writers

  • 2. Check out DecFiles package: getpack Gen/DecFiles head

  • 3. Optional in ./DecFiles:
    • 3.1 Compare packages with reference: svn status -u
    • 3.2 May be update of the package: svn update

  • 4. Copy mydecay.dec to Gen/DecFiles/dkfiles/.

  • 5. Tag your file for check in: svn add mydecay.dec

  • 6. Update release.notes in Gen/DecFiles/doc

  • 7. Do svn commit ./DecFiles

Stripping Lines

  • 1. getpack Phys/StrippingSelections head

  • 2. Optional in Phys/StrippingSelections/ : svn status -u and svn update

  • 4. Copy mystrippingfile.py to Phys/StrippingSelections/python/StrippingSelections/. :

  • 5. Tag your file for check in: svn add meineStrippingLine.py

  • 6. Import your new line in __init__.py

  • 7. Add a note in Phys/StrippingSelections/doc/release.notes

  • 8. In Phys/StrippingSelections/ : svn commit

Test .dec file with Gauss

  • 1. Check out Gauss : setenvGauss

  • 2. getpack Sim/Gauss , cd Sim/Gauss/cmt , cmt make

3. SetupProject Gauss # Gauss Umgeb.Variablen laden

4. Decay File schreiben # nutze emacs: emacs xyz.dec -> erstellt template

5. Option File schreiben, ggf. EventTypeNummer ausdenken

6. Gauss-Job.py bearbeiten: nEvts=2 , idFile='irgendein_Name' , auskommentieren von HistogramPersistencySvc ... und OutputStream ...

Aufruf:

gaudirun.py $GAUSSOPTS/Gauss-MC10.py $DECFILESROOT/options/11144101.opts $GAUSSOPTS/Gauss-Job.py

gaudirun.py $GAUSSOPTS/Gauss-MC10.py ./11624001.opts $GAUSSOPTS/Gauss-Job.py >& output.log &

Digitalisieren mit Boole ########################

1. setenvBoole

2. getpack Digi/Boole , cd Digi/Boole/cmt, cmt make

#############################################################################################################

Suche nach bereits vorhandenen Event type numbers #################################################

1. getpack Gen/DecFiles head # z.B. in ~/cmtuser/. # "head" ist die aktuelle Entwicklerversion

2. cd Gen/DecFiles/dkfiles/.

3. grep "searched number" .

#############################################################################################################

AFS Permissions abfragen: #########################

fs listacl ./ordner

AFS Permissions setzen: #######################

# einzeln: fs setacl ./ordner system:anyuser rl

# mehrere mit 'find' abfrage: find . -type d -exec fs setacl {} system:anyuser rl \;

# nur bis verzeichnistiefe 2: find . -type d -maxdepth 2 -exec fs setacl {} system:anyuser rl \;

#############################################################################################################

Ganga-Befehle #############

gridProxy.renew() # erneuern des Grid-Proxy Tickets

jobs # Listet jobs aus der registry templates # Listet templates aus der registry

jobs(i).remove() # entfernt job(i) aus registry templates(i).remove() # entfernt template(i) aus registry

Templates #########

t = JobTemplate(jobs(0)) # Aus Job 0 ein Template t erzeugen t.name = 'MyGangaJob' # Name von t Festlegen

Jobs Konfiguration ##################

j=Job() # Definiert neuen leeren Job j j=Job(t) # Definiert neuen Job j nach dem Template t j=Job(templates(1)) # Definiert neuen Job j nach dem Template 1 aus der Template-Liste

j.application = DaVinci(version="29r1") # j.application.optsfile = '/afs/cern.ch/user/o/ogruenbe/cmtuser/DaVinci_v29r1/Tutorial/Analysis/options/Lb2Kmu.py' #

j.inputdata = ... #

j.backend = Interactive() # = Local() # = LSF(queue="1nh") # = Dirac() #

j.outputsandbox = ... #

j.inputdata = LHCbDataset() j.inputdata.files = ['PFN:/afs/cern.ch/user/o/ogruenbe/public/toy/Brunel/test.dst']

j.inputdata.files.append('PFN:/afs/cern.ch/user/o/ogruenbe/public/toy/Brunel/test.dst')

data=BKQuery('/LHCb/Collision11/Beam3500GeV-VeloClosed-MagDown/Real Data/Reco12/Stripping17/90000000/DIMUON.DST', dqflag=['OK']).getDataset()

data = browseBK() # oeffnet Feicim in ganga

# in Ganga, lokale Datei als Input, die aus feicim abgespeichert wurde t.inputdata = t.application.readInputData(["/afs/cern.ch/user/o/ogruenbe/cmtuser/DaVinci_v29r1/Tutorial/Analysis/mydata/pfn/bhadron.py"])

j.outputdir j.status j.peek() j.subjobs j.splitter j.merger = CustomMerger, DSTMerger, RootMerger, SmartMerger, TextMerger

LSF Splitter bei ROOT files ###########################

t.splitter = SplitByFiles(filesPerJob=10)

t.merger = RootMerger(files=['MyTuple.root','MyTuple_2.root'])

###################################################################################################

Ganga-Backends ##############

There are 4 backends of interest for running LHCb jobs: PFN LFN

- Interactive : in the foreground on the client x - - Local : in the background on the client x - - LSF : on the LSF batch system (SGE/PBS/Condor systems supported as well) x x - Dirac : on the Grid via DIRAC x

###################################################################################################

CMT-Befehle ###########

> cmt config - Configures the package (creates setup and make files) - Invoked automatically by getpack

> cmt show uses - Show dependencies and actual versions used

> cmt show macro - Show the value of a macro for the current configuration

> cmt broadcast - Recursive CMT command in all used packages found in the current CMT project e.g. cmt broadcast gmake

> cmt run - Executes in current package environment

###################################################################################################

LSF-Queues ##########

> bqueues -u

There are queues for jobs requiring different lengths of CPU time (e.g. 8nm [8 minutes] -> default 1nh [1 hour] 8nh [8 hours] 1nd [1 day] 1nw [1 week] 2nw [2 weeks]

The queue time limit is based on normalised CPU time. This is not the run time limit (the real clock time limit), but is based on how much normalised CPU time your job consumes. The CPU value used in the calculation is normalised to ensure that the limit applies sensibly regardless of whether the job lands on a new, fast machine or an older, slower one.

By default, jobs are sent to the 8nm (8 normalised minutes) queue. This queue is intended for very short debug runs. For longer debugging and benchmarking of batch jobs, the best queue to use is the test queue, which has very high priority but can only run 1 job per user at any one time.

To specify the queue, use the bsub -q parameter. e.g. to send the job myjob to the 1 hour queue, type:

> bsub -q 1nh myjob

###################################################################################################

Castor-Verwaltung #################

http://castorold.web.cern.ch/castorold/ug/node2.html

rfdir $CASTOR_HOME/ rfrm $CASTOR_HOME//

###################################################################################################

LFN nach PFN wandeln ####################

I have seen the same problem but you can simply change "LFN:" to "PFN:castor:/castor/cern.ch/grid/" and that will give the PFN location.

i.e. 'LFN:/lhcb/LHCb/Collision11/BHADRON.DST/00012545/0000/00012545_00000002_1.bhadron.dst',

to

'PFN:castor:/castor/cern.ch/grid/lhcb/LHCb/Collision11/BHADRON.DST/00012545/0000/00012545_00000002_1.bhadron.dst',

###################################################################################################

###################################################################################################

Info ueber LFN ##############

dirac-dms-lfn-replicas

It happens that some files are temporarily unavailable at a site for multiple reasons: * Site in downtime. Then usual the SE is banned. You can see this using dirac-dms-lfn-replicas --All * Disk server temporarily down. This is usually temporary (up to few hours to a few days). In case the event is reported by the site with a list of files, they are marked unavailable in the LFC. This can be seen as well with the above command.

You can have a look in the computing/operation elog, a known problem will be mentioned. http://lblogbook.cern.ch/Operations/

###################################################################################################

VNC benutzen ############

vncserver # auf dem Server, vergibt displayport, z.b. 2

export DISPLAY=:2.0 # auf dem Server, lenkt Bildschirmausgabe auf Port 2

vncviewer -via ogruenbe@lxplus421NOSPAMPLEASE.cern.ch localhost:1 # auf dem client

vncserver -kill :2 # im vncviewer Terminal, beendet vncserver und schliesst vncviewer

http://lhcb-comp.web.cern.ch/lhcb-comp/support/DevStudio/VNC.html

###################################################################################################

Panoramix #########

SetupPanoramix

python $myPanoramix --help

###################################################################################################

# ansicht der z.V. stehenden Teilchenlisten

SetupDaVinci # setzt variable $COMMONPARTICLESROOT

cd $COMMONPARTICLESROOT/python/CommonParticles/.

###################################################################################################

# Falls es Probleme beim SetupXXX gibt wegen der Plattform # -> neu einloggen mit:

LbLogin -c x86_64-slc5-gcc43-opt

###################################################################################################

## Info ueber DaVinci configuration

less $DAVINCIROOT/python/DaVinci/Configuration.py

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r2 - 2013-04-29 - OliverGruenberg
 
    • 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-2024 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