DASH Tutorial at HiPEAC 2018

Resources

Getting Started with DASH

Download and Install DASH (alternative to using the VM Image)

user@host:~$ cd
user@host:~$ # download DASH from GitHub using git
user@host:~$ git clone https://github.com/dash-project/dash
user@host:~$ cd dash
user@host:~/dash$ ./build.minimal.sh
user@host:~/dash$ cd build
user@host:~/dash/build$ # install DASH to $HOME/opt/dash-0.3.0
user@host:~/dash/build$ make install

Example "hello world" application in DASH

File hello.cc:

#include "libdash.h"
#include <iostream>

using std::cout; using std::cerr; using std::endl;

int main(int argc, char* argv[])
{
  dash::init(&argc, &argv);

  auto myid = dash::myid();
  auto size = dash::size();

  cout << "I'm " << myid << " of " << size << endl;

  dash::finalize();
}

Example Makefile

MPICXX = mpicxx

DASH_ROOT = $(HOME)/opt/dash-0.3.0/

DASH_LIB = -L$(DASH_ROOT)/lib -ldash-mpi -ldart-mpi -ldart-base
DASH_INC = -I$(DASH_ROOT)/include

all : hello

hello : hello.cc
      $(MPICXX) -o hello $(DASH_INC) hello.cc $(DASH_LIB)

clean :
      rm -f *~
      rm -f ./hello

Assignments

01-hello_world

02-astro_load_image

03-astro_histogram

04-astro_marker_color

05-astro_count_objects