| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
Author: Peter Braam
Owner: Peter Braam
Version: 0.1
Date: 2014-11-15
Audience: developers, SDP project leads
The SKA imaging software transforms pre-processed radio telescope antenna data (aka u,v data) into images (aka the science products) suitable for scientific research. The u,v data is segmented in numerous measurement sets, each of considerable size, continuously generated by the telescope (and pre-processing stages). Tens to hundreds of thousands of measurement sets will be processed simultaneously, and each measurement set produces an image file. The output data of this process is much smaller than its input.
The image reconstruction primarily takes place based on the data in a single measurement set.
The project targets exa-scale clusters of nodes with centralized and/or local storage. The nodes may have SMP systems or accelerators or both. Hierarchical structures may exist - for example exposing full bandwidth networks intra-rack and limited bandwidth networks cluster wide.
Experience with radio telescopes has shown that the precise imaging algorithm will only be determined when the telescope comes into operation. The expected age of a radio telescope will be many 10s of years, and computer hardware is likely to go undergo fundamental changes.
The design shall be complete when
Not part of milestone2 are:
We will be delivering:
More specific deliverables are documented in the [Sprint2BL tab of the planning spreadsheet]https://docs.google.com/a/braamresearch.com/spreadsheets/d/19pojIxnIGg8Ew7ib9KWhS6isRAh_De_7ifjbLuIBboc/edit#gid=1418027851
We will first describe 3 use cases:
After this we give a functional specification of many key functions
An analysis is made of various state that is created and possible situations that can lead to errors and must be detected.
The design section is finished with highlighting a few implementation issues
Milestone 2 implements programs as a hybrid of
In future milestones the program will likely by coded in a more widely used language like Python, but not change essentially in terms of the binaries they generate.
We want to start the programs meeting the following requirements
The resources are a set of processes inside which a master process starts actors and channels. The allocated resources together with metadata like the process identifiers, ranks etc give a description cluster architecture descriptor.
An sbatch file is created to request resources for a job. This file may be adapted for different clusters.
\#!/bin/bash \# \#SBATCH --job-name=ddp-ska \#SBATCH --output=ddp.%j.txt \#SBATCH --partition=tesla \#SBATCH --time=5:00 \#SBATCH --mem-per-cpu=MaxMemPerCPU \#SBATCH --nodes=3 # XXX start with 3 \#SBATCH --tasks=3 # XXX same \#SBATCH --qos=gpu0 srun -N <number of nodes> -n <number of tasks> <dna program> [--base_rank=<base rank>] \[--base_port=<port>\] <program args>
For testing single node, Unix processes are supported:
dna-program --nprocs=<number of processes> [--base_rank=<base rank>] [--base_port=<port>] <program args>&
The program will determine if the job is running under Slurm through testing for some environment variables.
This section architecture describes how logging information will be stored and how shell Cloud Haskell processes will be started. Here we describe in more detail what the software does to implement this.
The following key requirements drive the design:
DNA programs will use a directory on the node's file system under which all data is stored. By default this directory is $HOME/.dna but can be set to any directory $DNADIR. It must be writeable by the processes that are started. The data under the directory can be visible through a distributed file system (or after a future milestone queried remotely).
The the following sub directory structure will be used:
.../.dna/configs \#\# containing named configuration files .../.dna/logs/<process id>/<rank> \#\# logs and profiling files generated by .../.dna/names \#\# containing symbolic links with time stamp and full invocation information pointing to the rank
During startup each of the processes will store its data in specific directories inside a directory that is by default
In the Slurm case the environment variable SLURM_JOBID gives a process id.
In the Shell case the Unix process id of the spawning process (parent pid) gives a process id.
we will call this dnaPid
The semantics are that under SLURM a rank number is determined from the SLURM environment variable: SLURM_PROCID.
In the Unix case the slave dna programs started first (without the master flag) will try to create directories dnaPid/n for n=1,2,3, etc. When this succeeds for a value n, that n is the rank of the slave. The -master flag will become rank 0 process for the parents process id.
We will call this the dnaRank
If the dnaRank equals 0, the process becomes a cloud Haskell master process after a few 100ms waiting to allow clients to start. All other processes become cloud Haskell slave processes.
The port numbers either equal a base port (default 40,000) or an explicitly passed baseport argument plus the dnaLocalRank. In the Unix case this is simply the rank, in the Slurm case this is obtained from SLURM through the environment variable SLURM_LOCALID.
The following lead to error conditions:
The architecture specifies that the log and profiling information will be stored under $HOME/.dna/logs. In this directory there are the following subdirectories
<YYYY>:<MM>:<DD>:<HH>:<SS>-{S,U}-<ARG0>+..<ARGN>
and is a symbolic link to a directory s/<SLURM_JOBID>, or u/<PROCESS ID>
This section describes a DNA SLURM backend. It is extremely simple.
The Slurm system will allocate a set of processes that offer the resources for the program. At large scale the program will start hierarchically, and an instance of program is responsible for forking tasks on its children. It may pass a subset of the available processes to each child to continue spawning in a hierarchical manner.
Key requirements:
The Unix program is started first:
Formation of the CAD:
Scheduling and job start:
We note here that the scheduling may involve a substantial computation to get optimal results in the case of a complex data flow.
To be copied from the milestone design.
startUnixProcess
** NOT YET REVIEWED OR FINISHED **
-- jobdir: the directory $HOME/.dna/logs/{U,S}/pname
-- processdir: the directory $HOME/.dna/logs/{U,S}/pname/rank
-- name
makerank
until error == 0
mkdir "$HOME/.dna/u/PARENT_PID/rank"
return rank
baseman = map ('+') ARGS
case
defined SLURM_JOBID:
rank = SLURM_LOCALID
pidname = SLURM_JOBID
insert1 = S
insert2 = show SLURM_JOBID
_ :
pidname = PARENT_PID
insert1 = U
insert2 = show PARENT_PID
name = time +"-" + insert1 + "-" basename
if err = mkdir "$HOME/.dna/logs/insert1/insert2"
exit -EEXISTS
ln -s "$HOME/.dna/logs/insert1/insert2" "$HOME/.dna/names/name"
if (SLURM_JOBID)
rank = findrank pidname
mkdir baseLogDir + "/" + rank
chdir processdir
create backend
##Getting and building Halide on cluster
Halide team periodically builds binary releases of Halide, which may be used locally on desktops provided sufficiently recent gcc (4.9.x) compiler is installed.
Wilkes cluster has no gcc-4.9.x installed yet, and installing it locally (taking into account the sheer number of dependencies) looks problematic. Hence, we choose to rebuild Halide against gcc-4.8.1, which can be used on cluster provided we load the corresponding environment using cluster's module command.
Also clang is required to build Halide. We didn't try to use binary releases from LLVM team because we need clang to be built against the same gcc version we use on cluster.
Thus, building clang on cluster looks as follows:
Execute module load gcc/4.8.1 command. This command is cluster-specific and is necessary to set necessary environment variables to bring gcc-4.8.1 in scope.
Download and build clang/llvm the way stated in official documentation. Take into account the following:
Currently, Halide gridding code assumes Halide distribution is placed on the same directory level as RC repository is and resides in halide directory. For example, to be able to build Halide gridding code with no problems please execute
git clone https://github.com/SKA-ScienceDataProcessor/RC.git
and
git clone https://github.com/halide/Halide.git halide
from the same directory. Note we renamed Halide to halide here. This way it is made compatible with our current build infrastructure and with possible (desktop/future cluster) usage of Halide binary releases which unpacks to halide directory.
Now go to halide directory and make it with the following:
make -j8 CLANG="clang --gcc-toolchain=/usr/local/Cluster-Apps/gcc/4.8.1"
This is required when Halide is built on cluster because clang has bug/feature (for ages) preventing it from picking correct gcc environment.
| Back | FazBrowse Home | New Git URL |