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
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();
}
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