Hello Word in GraphLab

GraphLab is downloaded and compiled

cd graphlab/apps/ and make a new dir my_first_app/

cd my_first_app

create a new file my_first_app.cpp and put following code in it

int main(int argc, char** argv) {
graphlab::mpi_tools::init(argc, argv);
graphlab::distributed_control dc;

dc.cout() << “Hello World!\n”;

Now make another file called  CMakeLists.txt with a content

add_graphlab_executable(my_first_app my_first_app.cpp)

Go some levels up to graphlab main dir and execute ./configure

If configure script ended without errors you have to go graphlab/release/apps/my_first_app/ and there execute make -j4 and after it you will get your executable called my_first_app.

Exec it ./my_first_app and you probably get

margusja@IRack:~/graphlab/release/apps/my_first_app$ ./my_first_app
INFO: mpi_tools.hpp(init:63): MPI Support was not compiled.
INFO: dc.cpp(init:573): Cluster of 1 instances created.
Hello World!