TWiki
>
LHCb Web
>
TipsAndTricks
(revision 4) (raw view)
Edit
Attach
---+ Tips and Tricks ---++ Running lxplus in a Screen Session To run a screen session on lxplus the simplest way is to add the following line to your bashrc and then use the newly created *krb5screen* command : <pre><pre>alias krb5screen="pagsh.krb -c 'kinit && screen'" </pre></pre> This will prompt you for your password and then open a screen session. By default running screen on lxplus will lead to a timeout and your progress will be lost, you will no longer have write access within the session. <br />Don't forget to make a note of the node you are using (e.g. lxplus012) so you can return to it later. ---++ Running Software without Knowing the Platform If you are unsure what platform an application has been built on you can state the option "best" when choosing which to use: <verbatim>lb-run -c best LHCbDirac/prod bash</verbatim> this is especially useful for applications such as Dirac where, for example, we do not care necessarily version details, we just want to download files from bookkeeping. ---++ Using the Local Batch System At HEP Birmingham the local batch is run under the Condor system, to submit jobs to Condor you need to first create a script to be run and then create a submission script. <br />The submission script contains a set of parameters: * *Universe:* What style of job (usually set to "vanilla"). * *Initial_dir:* The directory from which to start the job from (this is where any output files produced will be sent). * *Executable:* The script to run. * *Error:* Name and location of the error log file. * *Output:* Name and location of the job command output log file. * *Log:* Name and location of the job condor log. * *stream_output:* send the stdout live to the output file, True/False (as opposed to at the end of the job, default is False). * *stream_error:* send the stderror live to the error file, True/False (as opposed to at the end of the job, default is False). * *should_transfer_files:* Optional argument, if "YES" then files are downloaded to the Initial_dir location. * *when_to_transfer_output:* When the files should be downloaded (usually when the job is finished so "ON_EXIT"). * *arguments:* Any arguments to pass to the script. * *Queue:* The number of subjobs to run. As a simple example if we wanted to create a text file containing "Hello World!" 50 times in parallel (not recommended!), we would create a bash script *hello_word.sh*: <pre>#!/bin/bash </pre><pre>echo "Hello World! Hello $1!" >> hello.txt</pre>Then a submission script *hello_world.sub*:<br /><verbatim>Universe=vanilla Initial_dir=/disk/moose/lhcb/lhcb_bham_user/my_condor_output Executable=/home/lhcb_bham_user/my_scripts/hello_world.sh Error=/disk/moose/lhcb/lhcb_bham_user/my_condor_output/hello_world_$(process).err Output=/disk/moose/lhcb/lhcb_bham_user/my_condor_output/hello_world_$(process).out Log=/disk/moose/lhcb/lhcb_bham_user/my_condor_output/hello_world_$(process).log should_transfer_files = YES when_to_transfer_files = ON_EXIT arguments = "LHCb Bham User" Queue 50</verbatim> Note the use of the variable *$(process)* which returns the job number. To submit this job to condor first access the *slc6* environment: <verbatim>sl6 condor_submit hello_world.sub </verbatim> We can then list our jobs using *condor_q*, and view the output live using *condor_tail -f* . ---++ Adding/Removing Content to EOS on Lxplus You can mount *eos* on the lxplus system to easily modify files, to mount it to your home directory: <verbatim>eos -b fuse mount ~/eos </verbatim> Now you can access content for the mounted location and add/remove files, when you have finished remember to unmount after: <verbatim style="background-color: transparent">eos -b fuse unmount ~/eos</verbatim> -- Main.KristianAlexanderZarebski - 29 Oct 2018
Edit
|
Attach
|
Watch
|
P
rint version
|
H
istory
:
r8
|
r6
<
r5
<
r4
<
r3
|
B
acklinks
|
V
iew topic
|
Raw edit
|
More topic actions...
Topic revision: r4 - 20 Nov 2018
-
_47DC_61ch_47DC_61cern_47OU_61Organic_32Units_47OU_61Users_47CN_61kzarebsk_47CN_61763242_47CN_61Kristian_32Alexander_32Zarebski
?
LHCb
Log In
LHCb Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
Webs
ALICE
ATLAS
BILPA
CALICE
Computing
General
LHCb
LinearCollider
Main
NA62
Publish
Sandbox
TWiki
Welcome
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback