Workflow quick reference

From Charm-Tau Detector
Jump to: navigation, search

Contents

Register and prepare account

  • Log in to stark.inp.nsk.su (BINP local access only) or proxima.inp.nsk.su (accessible from the Internet, pubkey authentication only)

The login servers have similar configuration and share common /home.

The git is accessible using ssh protocol with key authorization.

  • If necessary, create ssh key using
ssh-keygen

Agree to everything, passwordless keys are allowed.

Then you'll have in your ~/.ssh/ two files id_rsa and id_rsa.pub - these are your private and public keys. Full paths to the files are displayed in the terminal.

  • Log in to gitlab server https://git.inp.nsk.su/ using the same name/password as for stark
  • Register your public key for your account: i. e add ~/.ssh/id_rsa.pub contents to a from at the following link
https://git.inp.nsk.su/-/profile/keys


Setup remote ssh connection via PuTTy on Windows

  • Run PuTTy
  • In the Session tab, in the "Host Name (or IP addres)" field, write: user_name@proxima.nsk.su
 Use PuTTyGen program to create public and private key
 The public key must be sent to Andrey Sukharev
  • In the Connection -> SSH -> Auth tab, in the "Private key file for authentication" field, write the path to your private key
  • In the Session tab in the "Saved session" field, write: a name that will be used for the current settings
  • In the Session tab, click on the "Save" button

Create working repository (fork)

Open central repository

https://git.inp.nsk.su/sctau/aurora

and make fork.


Tune working environment

Each time you log in to a server stark/proxima, you need to

setupSCTAU
asetup The software version

Available version are at least:

  • 0.2.3 ``release - the environment before first official release
asetup Aurora,0.2.3
  • 1.0.0 release - fixed build for detector investigation tasks, for physics and

other task requiring stable environment. The 1.0.X series are intended for bug fixes.

asetup Aurora,1.0.0
  • master - branch and build for future development without any warranty on

stability, compatibility or meaningful working.

asetup Aurora,master,latest

Ask software coordinators if you're unsure what to put as the software version.

To tune git do once:

First, do:

git sctau init-config

Check if the settings are correct. But the defaults should be fine.

Then apply the settings:

git sctau init-config --apply

tune working directory

To develop new code or to modify existing one, do:

create workare in your home directory (at stark/proxima)

mkdir workarea
cd workarea

create directories for build and run:

mkdir build  run

workarea preparation (just once):

git sctau init-workdir ssh://git@git.inp.nsk.su/sctau/aurora.git

Go to working directory

cd aurora

Fetch updates from head repository (must be done before creating a branch when the workarea exists for a long time)

git fetch upstream

Create a working branch. Give it a sensible name:

git checkout -b <TopicDevelopmentBranch> upstream/<target_branch> --no-track


The line above will not work if you simply copy-paste it. It is intentional. It is important to choose correct target branch. If unsure ask software coordinators.


To modify an existing package check it out:

git sctau addpkg GenExamples

To create new package, one should create its whole directory structure, provide CMakeLists.txt and everything.

Before creating new package ask software coordinators how to name and where to place it

Useful commands to manage packages in you working area:

List local packages

git sctau listpkg

List packages in the whole repository

git sctau listpkg --all

or with regexp filter

git sctau listpkg --all 'Det'
git sctau listpkg --all '/G4.*U'


Remove local package (the repository left intact)

git sctau rmpkg <PackageName>

It is recommended to keep locally only the packages under active development.

Build and run

To build:

cd ../build/
cmake ../aurora/Projects/WorkDir
make

To setup local environment (to use locally built packages instead of default versions):

source x86_64-slc7-gcc9-opt/setup.sh

To run

cd ../run

Run primary generators:

ctaurun GenExamples/evtgen.py 

Run full simulation:

ctaurun G4SimExamples/fullsim_example.py

Download standard job options and run with local file:

get_joboptions fullsim_example.py
ctaurun ./fullsim_example.py

Commit changes

In the 'aurora' directory:

Add changed files

git add <list of files>

remove unnecessary files

git rm <list of files>


Commit changes in the local repository:

git commit -m 'Meaningful message concerning the introduced changes'

Each commit should contain a minimal set of logically interconnected changes. You may (and will) have many commits when developing a package.

Put the changes to the server:

git push

Wheh doing push for the first time, it is necessary to do it like

git push --set-upstream origin <TopicDevelopmentBranch>


After the push, git displays a link to be followed for a Merge Request (adding your contributions to common repository).

When doing a merge request, make sure:

  • the branch is correct
  • changes are well described
    • reasons for the changes are demonstrated
    • the changes are described
    • influence on the other software and possible side effects are indicated
    • there are links to related issues, if any

Running graphical applications remotely

If your connection does not allow you to run X applications directly, please try x2go.

Personal tools