Hello World example

The basic functionality of the library is best shown by the bj-hello-world.c program:


#include "cell.hh"

void mc_cores_main() {
	kernel::init_sys();

	bjk_slog2("HELLO_WORLD\n");	

	kernel::finish_sys();
}

This program just uses the debug function that writes to the log to see that it has runned.

Three functions are minimally needed to use the library:

  1. kernel::init_sys
  2. kernel::finish_sys
But any "normal" program will call also kernel::run_sys (see other examples).

Compiling Hello World

The files:

are the ones needed to generate the files:

that get called by messaging-cells/hello_world.sh

Running Hello World

Just call messaging-cells/hello_world.sh

The output will be written to the logs in:

files.

One per core.