Visions:NoobiesTutorial: Difference between revisions

From KIP Wiki
ā§¼kip-jumptonavigationā§½ā§¼kip-jumptosearchā§½
Line 43: Line 43:
| Users and hardware guys discussing about current topics related to hardware usage.
| Users and hardware guys discussing about current topics related to hardware usage.
| ENI
| ENI
| Weekly, Monday at 10:30
| Weekly, Monday at 9:30
| SS (backup: MK or ECM)
| SS (backup: MK or ECM)
|-
|-

Revision as of 11:59, 23 July 2019

Abbreviated Names

 ASA: Aamir, Syed Ahmed
 AG:  Andreas GrĆ¼bl
 AH:  Andreas Hartel
 BK:  Bjƶrn Kindler
 BV:  Bernhard Vogginger
 CK:  Christoph Koke
 CM:  Christian Mauch
 CP:  Christian Pehle
 DH:  Dan Husmann
 ECM: Eric MĆ¼ller
 FK:  Felicitas Kleveta
 IB:  Ilja Bytschok
 JB:  Johannes Bill
 JI:  Joscha Ilmberger
 JK:  Johann KlƤhn
 JS:  Johannes Schemmel
 KHS: Kai Husmann
 KM:  Karlheinz Meier
 LL:  Luziwei Leng
 MAP: Mihai Petrovici
 MD:  Markus Dorn
 MG:  Maurice GĆ¼ttler
 MK:  Mitja Kleider
 OA:  Oscar MartĆ­n-Almendral
 OJB: Oliver Breitwieser
 PM:  Paul MĆ¼ller
 SS:  Sebastian Schmitt
 TP:  Tom Pfeil
 VK:  Vitali Karasenko
 YS:  Yannik Stradmann

Meetings, sorted by time

Meeting Title Description Location Datetime Manager
BrainScaleS-1 Users and hardware guys discussing about current topics related to hardware usage. ENI Weekly, Monday at 9:30 SS (backup: MK or ECM)
PCB Meeting PCB and System-Design related discussions. Platform setup and installation also covered. #MeetingLog. ENI Weekly, Monday after Hardware Users Meeting (if necessary) AG
HICANN DLS Meeting Chip design meeting ENI Weekly, Tuesday at 10:00 JS
Softies' Meeting Mandatory Softies meeting ;). Logs and agenda can be found here. ENI Weekly, Tuesday at 14:00 ECM
FPGA Development Logs and agenda can be found here. ENI Weekly, Tuesday at 15:30 AG (backup: ECM).
DLS Users Meeting HICANN DLS users meeting (DLSHWFUM) ENI Weekly, Wednesday at 10:00 CM
TMA Meeting Logs and agenda can be found here. ENI Weekly, Wednesday at 14:00 MAP
ASIC Meeting Seminarbox 1.Stock KIP, SB1 Weekly, Wednesday at 16:00, alternating between ASIC classic and ASIC DLS JS
F9/Electronic Vision(s)' Group Meeting Mandatory group meeting. Logs and agenda can be found here (login using BrainScaleS account). ENI Weekly, Thursday at 9:00 JS
Journal Club Stay up-to-date with scientific literature (one featured publication + spot lights) channel. ENI Weekly, Friday at 11:00 DD, KS

Accounts

Typically, you will need the following accounts:

  • KIP-Account (see KIP Institute Login)
  • Flagship/ex-BrainScaleS-Account (which provides Access to the gitviz-Repository)

If you work on the waferscale hardware or need access to the computer cluster ask your supervisor to write an email to ECM (+ get an introduction by your supervisor). If you do chip or FPGA development, you need ASIC permissions. Ask your supervisor to write an email to MD (+ get an introduction by your supervisor).

Login

KIP

The KIP login process is used for both, physical (i.e. keys) and virtual (i.e. user login stuff) access to KIP facilities. All F9 group services use some kind of KIP account/authentication. The login form can be found here: https://www.kip.uni-heidelberg.de/service/verwaltung/form_forms (needs KIP login).

Rules (as a hint for your supervisor) regarding the "LOGIN Computing" part:

  • students should not use their URZ account name but rather a readable abbreviation of their real name, e.g. emueller
  • state that the student should be added to f9 mailing list (IT) ... (it is an *alias* mailing list for kip_vision)
  • same for kip visions wiki (IT)
  • chip design permission if needed
  • internshippers and bachelor students should be assigned to primary group F9_guests (field "3")
  • master students and beyond should be assigned to primary group F9 (field "3")

You will have to collect all signatures and give your 50ā‚¬ key deposit to Mrs. Hafranke or Mrs. Potthoff. Suggested waypoints:

  • 1st floor: Signature of JS and FK
  • Ground floor: deposit for key in room 00.304
  • 2nd floor: Signature of H. Jacobsen or alternatively E. Schmetzer
  • 3rd floor: First go to EDV (they will cut off the lower part of the form) then go to P. Doust to ask for a key (he will keep the upper part of the form)

Vision(s)

  • inform cluster commissioner, i.e. CM, ECM, they will create wang home and slurm user
  • Sign form to allow open sourcing of contributions.

Flagship/ex-BrainScaleS

Flagship/ex-BrainScaleS accounts are managed by BK. You can contact him directly. This account is also needed for Redmine/GitViz access.

Redmine/GitViz Permissions

When your login works, please create ssh keys as indicated in [1] and upload the key to gitviz. Afterwards you should ask the project managers to add you to the needed repositories (your supervisor can help you). In case of ssh-key fails, please stick to the description in the symap2ic wiki (it's always the user's fault ;p). If you need further help, you may ask ECM/JS, the gitviz/redmine administrators.

Workplace

Who should I call for help? (FAQ)

- The power is not working/toilet is overflowing/... ā†’ 54-5111 Stƶrungsstelle (ā€žAlles was zur Grundversorgung gehƶrt: Strom/Gas/Wasserā€œ; ā€žder Hausmeister wĆ¼rde ohnehin nur dort anrufenā€œ)

Computers

We use a Debian Jessie-based default installation. The configuration is automatically managed. In case of package requests, please ask KHS. Bugs and requests should be posted here.

The spack package manager is used to provide modules, if you run into issues try to find your question here.

If the GUI session is blocked by a previous user, go to a non GUI session (Ctrl+Alt+F1/2/3) log in and start GUI with startx

The list of visionary desktop computers can be found here Visions_Privat:ComputerUsage. Available unused machines can be found in this list.

Space

There are some places in the "Werkstatt" building (room 501) and in the container building. In case of a transient shortage of spaces, internshippers and bachelors are expected to "fill up" (i.e. they do not have a static assignment to a specific place) all available places.

Network

If you want to use your own laptop inside the KIP network, you first need to register your laptop's MAC address. AG, JS are allowed to edit the list.

From inside the KIP network, outgoing traffic has to go through the EDV:KIPProxy. You can create a proxy auto-config file, e.g. /etc/proxy.pac and configure your browser and system to use it. This way you do not need to manually switch proxy settings when switching between KIP and other networks.

function FindProxyForURL(url, host)
{
  if (isInNet(myIpAddress(), "129.206.180.0", "255.255.255.0")) {
    if (isInNet(host, "129.206.0.0", "255.255.0.0")) {
      return "DIRECT";
    }
    return "PROXY proxy.kip.uni-heidelberg.de:8080" ;
  } else {
    return "DIRECT";
  }
}

Communication

To stay informed (and to provide information to others) you should join F9's own slack-like chat server on chatviz. The main channels are:

Channel Topic
#softies Software and stuff
#hardies Hardware
#tma Modeling
#clusteraner Cluster usage and announcements


You should create an account on https://chat.bioai.eu/visions (externally reachable).

The software also supports IRC access via port 6667 (KIP-internally).

Examples for IRC Clients:

  • hexchat (GUI)
  • weechat-curses (CLI)
  • Pidgin (GUI) / finch (CLI)

You can access the channels in Pidgin by creating a new account (Accounts -> Manage Accounts) using the Protocol IRC on server "chatviz" port 6667. To authenticate yourself, add a "buddy pounce" on pseudo user "mattermost" and send "LOGIN yourMailaddress yourPassword" (recurring).

Computing

Cluster Access

The F9 cluster is part of the BrainScaleS and HBP hardware systems. In times of idle nodes (i.e. the associated neuromorphic hardware parts are idle too), conventional software simulations can be run on the system. Please note, the cluster's main objective is controlling neuromorphic hardware and not number crunching. Having a KIP-Account gives you a home folder (distributed filesystem, AFS) on all machines running the default installation. However, this is not sufficient for cluster usage. You need a "wang" home and cluster access permissions. Both are managed by ECM and CM. In case of a missing cluster_home you will see an error message when you lock into a compute server.

The frontend/login nodes are named:

  • ice
  • ignatz

and you can access them via (example for ice, but works with any other name too) ssh -X ice

If you are working from outside the institute, you can access the frontend via ssh -p <port> <kipuser>@brainscales-r.kip.uni-heidelberg.de The following ports give access to:

  • 7022: ice
  • 11022: hel
  • 12022: beli (only a selection of users has access, "currently heavy WIP")

Mosh ports are 50000 + X, e.g. 61022 for hel (mosh brainscales-r.kip.uni-heidelberg.de --ssh="ssh -p 11022" -p 61022). If the mosh port (e.g. 61022) is already being used by someone else, try the next one (or something in the range of [50000 + X, 50000 + 1000 + X)).

Server Usage

The machines mentioned above are not the compute nodes themselves, but are only the frontend to access the compute cluster. Large jobs (i.e. CPU/IO hogs or long-running things) on the frontend node will be killed by the administrators. So for heavy work (read everything after the bug/syntax fixing) please dispatch execution to the cluster:

Short overview is given here. A more detailed intro can be found at [2]!

 srun -p [partitionname] [your command]

The default job gets 2 CPUs (1 hyperthreaded core) and 1/4 of nodes RAM. If your code runs in parallel or needs more memory, please specify this (e.g. 2 CPUs, 16GB RAM):

 srun -p compile -c 2 --mem 16G [your command]

To run the job in background, please use:

 sbatch  -p simulation --wrap [your command]

This creates a slurm-[jobid].out log file containing all the console output.

In order to check the status of your jobs the command squeue can be used. For detailed information do:

 scontrol show jobid -dd <jobid>

Jobs can be aborted (cancelled) by using:

 scancel [jobid]

Each Slurm partition has a defined default and max time. You can look it up with

 scontrol show partition [partitionname]

If your job runs longer than the default time it will be killed automatically by Slurm unless you give

 --time hh:mm:ss

so your srun/sbatch command. You can not enforce times longer than the max time of this partition.

Accessing the BrainScaleS hardware is only possible via the experiment queue. Spikey is accessible via spikey queue. To select a specific spikey, the --gres=SpikeyXYZ option is used. DLS is accessible via dls queue. To select a specific dls board, the --gres=[board id] option is used.

More details can be found here [3].

As a side note the compute nodes have localtime set to UTC, so all logging times will be offset to local time. However, this should never be a problem as you should always work with non-local date/time (e.g. UNIX epoch, UTC or something similar).

X on cluster nodes

Although not recommended, some old tools require X support. Follow the instructions at [4] if you encounter such an old tool.

FPGA & ASIC

Servers, software and libraries are managed by MD.

Servers

There are several login nodes for ASIC work, e.g., vmimas, vtitan, vrhea.

B.Sc. / M.Sc.

Thesis

B.Sc. colloquium / Theses hand-in dates

  • Find a suitable date for your colloquium and other things (KM & JS & you). A lot of people have full schedules, so do it well in advance!
  • Set all the dates, inform the examination office (PrĆ¼fungssek.) and make sure that Felicitas Kleveta is up2date, too.

Thesis Publication

Results Guidelines

Administrative Stuff

Travel

  • before travel: fill out travel request form (Dienstreiseantrag) and hand over to FK
  • after travel: fill out reimbursement form (Dienstreiseabrechnungsformular) (provide invoices etc.) and hand over to FK
  • when getting back the result: check if everything is correct, hand over to OA

The forms can be found here: https://www.kip.uni-heidelberg.de/service/verwaltung/form_forms (needs KIP login).

Vacation

  • Ask your supervisor, you might be needed urgently during the desired time.
  • Fill out your personal "Urlaubskarte" and get a signature from JS. If you have no contract, skip this step. Otherwise it is obligatory before you leave!
  • Hand it over to FK. It will arrive in your post box a few days later with another signature. Now is a good time to note these days as vacation in your timesheet.
  • Create an issue with start and due date of your absence for our vacation calendar so your colleagues know that you are on vacation.

Internships

Schein

Windows Software

If you need Windows software, e.g. to fill out forms (Word, Excel), you can log in remotely to a Windows machine:

rdesktop kipwin

Username: KIP\$your_accountname

Orders

  • above 500ā‚¬ => multiple offers (print out from some comparison website) needed
  • up to 2.5kā‚¬ => get three different offers (ask three shops for offers)
    • e.g. write to first three cheapest shops listed on some comparison websites
    • KIP "Kundennummer"s:
      • Mindfactory: 10970071

Using The Hardware

The HBP SP9 Guidebook provides introductions to both, the Spikey system and the BrainScaleS system.

Core Hardware Components

For the BrainScaleS system, the NMPM hardware specification provides detailed information; see Jenkins doc job "HBP Spec". TODO: Write something about hardware stuff.


Data Management

The policy on F9-specific data storage is:


KIP/F9 Data Storage
Mount Point Storage Backend Redundancy Backup Strategy Usable Size User Quota Typical Application
/afs/kip/user/USERNAME HDD RAID yes (1 version) 10G Distributed home directory
/scratch no Scratch/temp data; might be deleted at any time
/wang HDD RAID6 (2R) no 13T 0.3T General purpose
/ley HDD RAID6 (2R) yes (ADSM; 1 version) 7T 0.1T Important stuff (not too large!)
/loh 4x Archive HDD RAID5 (1R) no 16T 1T Archives of machines, homes, etc.
??? SSD no

Software Development

Most (all?) software developers work remotely on server machines. Tools like screen or tmux can keep your session open between reconnects.

Git

As a general rule, everything should be tracked in a version control system, in our case, that is git. Period. If you hear git for the first time I highly recommend spending an hour going through a git tutorial of your choice. Here are some examples:

The F9 gitolite server is hosted on our OpenProject server: https://openproject.bioai.eu

Whether your own work should be tracked in the group gitviz or not, should be decided together with your supervisor. But mostly, you will need to checkout some repo for read access. If your own/private work is not for the trash, you should request a repository (or contribute to an existing one) on gitviz. Have your supervisor ask KHS for a repository.

Accessing external repositories using the git or ssh protocol requires the user to call socksify or tsocks:

 socksify git clone git://external.server/repo.git # on wheezy default installation
 tsocks git clone git://external.server/repo.git # on 'new' jessie default installation

License

Keep your code contributions (L)GPL-clean because we might want to publish it on a public web site. If you copy code from somewhere, verify license compatibility and mention the source as a code comment!

Code Review

For core software components (and other repositories involving multiple developers), we use gerrit as a code review tool. The server F9's Gerrit Server and a small tutorial can be found here [5].

Gerrit uses BrainScaleS or Flagship accounts for authentication. Use

   export MY_BRAINSCALES_OR_FLAGSHIP_ACCOUNT=myBssOrFlagshipUsername
   ldapsearch -h visions-ldap -x -W -D uid=${MY_BRAINSCALES_OR_FLAGSHIP_ACCOUNT},ou=brainscales,ou=people,dc=kip.uni-heidelberg,dc=de -b ou=brainscales,ou=people,dc=kip.uni-heidelberg,dc=de uid=${MY_BRAINSCALES_OR_FLAGSHIP_ACCOUNT}

to register your account (or to verify your credentials).


Continuous Integration

We encourage continuous and automatic testing, see F9's Jenkins Server. Contact KHS for details.

Jenkins uses BrainScaleS or Flagship accounts for authentication, see Gerrit section.


Bug reports and redmine project management

Bugs should be posted immediately in the redmine project associated with the module that produced the error. The title should be descriptive (it may only be changed by 'project managers' after creating the ticket). As a general rule, the traceback is necessary for the developer to find the actual bug, but the more relevant information are given the easier the fix. Ideally, you create a minimal example that reproduces the problem and upload the script, including the module's loaded. F9's Redmine/OpenProject Server


How to: Building Software

  • log onto frontend (exp: hel)
  > ssh hel
  • Create and switch to project directory (choose path according to personal preference):
  > mkdir -p code/project_name
  > cd code/project_name
  • Load the waf build tool module. More information on waf
  > module load waf
  • Normally ssh will ask for the password of your private key every time you connect to another machine (e.g. during git pull). If you want to avoid this you can start ssh-agent, which will load/unlock your private key by asking you once and keep running in the background.
  > eval $(ssh-agent)
  • Add your personal ssh key agent to the agent (link -> create key?)
  > ssh-add
  • Choose the wanted project (exp: sthal)
  > waf setup --project sthal
  # ā€”ā€”ā€” or specify multiple projects: ā€”ā€”ā€”
  > waf setup --project sthal --project cake
  • Configure and compile on the cluster. The default job gets 2 CPUs and 2GB of RAM. If your code runs in parallel or needs more memory, please specify this (e.g. 8 CPUs (-c8) or 20GB RAM (--mem=20G). We use singularity container to manage external dependencies, see Singularity
  > srun -p compile -c8 --pty singularity exec --app visionary-wafer /containers/stable/latest waf install --targets=*
  • Set environment variable e.g. LD_LIBRARY_PATH or PATH to the compiled software
  > module load localdir
  • In order to pull and install the complete software stack such that the BrainScaleS Guidebook examples are executable follow (assuming that we build on the cluster)
  > module load waf
  > waf setup --project=pyhmf --repo-db-url=https://github.com/electronicvisions/projects.git
  > singularity exec --app visionary-wafer /containers/stable/latest waf configure
  > srun -p compile -c8 --pty singularity exec --app visionary-wafer /containers/stable/latest waf install --targets=* 
  > module load localdir # load the compiled software stack
  • After installation changesets can be reviewed and uploaded to the Gerrit server.

Style

We have style guides for C++ and Python. [[6]]

To format your code properly, run git-clang-format and inspect/add the resulting changes before committing. To apply clang format on the current commit

  > singularity exec --app visionary-defaults /containers/stable/latest git-clang-format HEAD^

There is also a convenient vim plugin [[7]]

Core Software Components

This section gives a very brief description of the main software packages developed for the NMPM-1 and Spikey systems. Short introduction on how to get and build repos https://openproject.bioai.eu/projects/waf/wiki/Wiki

PyNN

A python API to specify neural networks, independent of the actual simulator used. Typical use case is to use it as frontend for simulations in nest or neuron. Documentation is available on its webpage (sort of at least) [8], in order to get started it is best to ask someone for a simple working script and trying to reproduce it with minor changes (ideally your supervisor has some propositions for you)

PyHMF

The BrainScaleS-hardware-specific PyNN implementation/backend. Maintainers: ECM, CK

PyNN.hardware/PyHAL

The Spikey-hardware-specific PyNN implementation/backend. Maintainers: TP (backup: ECM)

Cake

Calibration framework for the BrainScaleS hardware. Maintainers: SS and MK

Euter/Ester

The C++-layer providing a representation of neuronal network descriptions (generated by PyHMF) -- used for BrainScaleS hardware. Maintainers: ECM, CK

Marocco

The translation layer which converts abstract neuronal networks into a hardware bit stream (i.e. a valid hardware configuration) -- used for BrainScaleS hardware. Maintainers: ECM, SS

StHALbe, hicann-system

StHAL, HALbe and hicann-system are the hardware access layers -- used for BrainScaleS hardware. Maintainers: ECM, CK

SpikeyHAL

Spikey hardware access layer. Maintainers: TP (backup: AG or ECM)

HostARQ

The communication protocol stack for communication between the BrainScaleS hardware (FCP FPGAs) and host computers. Maintainers: ECM, CM

ESS

The Executable System Specification is a BrainScaleS hardware simulator. Originally developed as a chip verification software by AG, it evolved into a neuronal network simulator (by BV). Maintainer: BV, OJB

Modeling Software Packages

SBS

Allows for simple creation and sampling of and with Boltzmann machines of PyNN neurons. See [Tutorial[9]] (requires access to gitweb) Maintainer: OJB

Documentation

Central starting points for documentation besides this page are