Computational Stuffs

Shell Scripting:

  • To run a shell script use:
source file.sh
  • Bash doesn't have the command "rehash", instead use:
hash -r
  • To obtain permission to work, copy a some file:
chmod 777 file_name
  • To check the libraries that are linking to an executable (-d -r show the undefined symbols):
ldd -d -r name_of_executable
  • To see libraries dependencies:
readelf -d name_of_executable
  • To create a ("soft") link to a file (when the linked file is modified all the linked directories also will use the modified file, it creates a pointer to the file):
ln -s (Directory_Path) .

CMSSW:

  • At the moment of start session in lxplus or cmslpc (LS5), is required to run the commmands (these can be added in the .bashr file, the second one as an alias):
source /uscmst1/prod/grid/gLite_SL5.csh
source /uscmst1/prod/sw/cms/cshrc uaf

  • To obtain a CMSSW release and setup the CMS environment (LS5 machines):
cmsrel CMSSW_5_X_X
cd CMSSW_5_3_3/src
cmsenv

  • In the case of using the LSC6 or LS6 as architecture the commands to set up a CMSSW release are:
source /uscmst1/prod/sw/cms/cshrc cvmfs
scram --arch slc6_amd64_gcc481 list CMSSW | grep CMSSW_7_1
scram --arch slc6_amd64_gcc481 project CMSSW_7_1_0_pre8
cd CMSSW_7_1_0_pre8/src/
cmsenv
scram b

Grid Credentials:

ROOT:

export ROOTSYS=~/root/ 
export PATH=$PATH:$ROOTSYS/bin 
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ROOTSYS/lib
  • If you want to do it in a more simple way, just run:
sudo apt-get install root-system
  • With the command System is possible to load external libraries to ROOT, e.g in an interactive session:
gSystem->Load("~/work/PFCal/PFCalEE/userlib/lib/libPFCalEEuserlib.so")

Emacs

  • To download emacs run:
sudo apt-get install emacs

Java

  • To download java in ubuntu run:
sudo apt-get update
java -version
sudo apt-get install default-jdk

Vidyo

FIT Cluster:

  • To access the cluster and have acces to CMS setup run:
ssh -X username@uscms1.fltech-grid3.fit.edu
source $VO_CMS_SW_DIR/cmsset_default.sh

LPC Connection:

  • To connect to the LPC a kerberos client is required, to obtain this run:
sudo apt-get install krb5-user

GIT Hub

  • Is important to move the files 'id_rsa' and 'id_rsa.pub' to the home directories in any server where is is planned to work. This files contain the permission to access git
  • To check the ssh access in git:
ssh -T git@github.com
  • To copy a repository with git is required to initialized the same:
git init
git remote add name_choosen url_address
git clone https://url  or git clone git://url
  • It can be use also:
git init
git remote add name_choosen url_address
git clone git://url
  • To verified the remote connections (after git add):
git remote -v
  • To check the tag of a repository run:
git tag
  • To download objects from another repository or update the possible changes due new tags do:
git fetch --all
  • To select one specific tag to work:
git checkout -f (tag_version)

Geant4:

Prerequisites

./bootstrap
make
make install

Configuration for compilation

mkdir geant4.(version)-build
cd geant4.(version)-build
sudo apt-get install expat    (in case if needed)
sudo apt-get install mesa    
sudo apt-get install mesa-utils
sudo apt-get install libXmu-dev
  • To configure for compilation run (this will create the main directory for G4 in the path /usr/local, installing examples, and using openGL as visualization tool):
cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DGEANT4_INSTALL_DATA=ON -DGEANT4_USE_OPENGL_X11=ON -DGEANT4_INSTALL_EXAMPLES=ON -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON  /home/..(your path)../Desktop/geant4.(version)
  • Install the missing packages indicated after the previous process and repeat until there is no warnings

Compilation and Installation

  • Still in the building directory run:
nproc    (or lscpu to find the number of cores of the CPU)
make -j# VERBOSE=1    (# is the number found previously)
  • After this to install:
sudo make install

How to run an example

  • In this case, to run example number 3 of G4, copy the folder B3 from the directory /usr/local/share/Geant_directory/examples/basic to the Desktop
  • Run:
cd Desktop
mkdir B3-build
cd B3-build
source /usr/local/bin/geant4.sh
cmake -DGeant4_DIR=/usr/local/share/Geant4.9.6 /home/wukong/Desktop/B3
make -j#    (#: number of cores of the CPU)
  • Finally:
./exampleB3
  • For more commands check the G4 documentation
Edit | Attach | Watch | Print version | History: r14 < r13 < r12 < r11 < r10 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r14 - 2014-07-16 - HectorHernandez
 
    • 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