OMPI support for Epiphany

OMPI support for Epiphany

Postby Farzaneh » Tue Jan 10, 2017 8:57 am

Dear forum members,

I would like to run omp4-epiphany example using ompicc on epiphany. I have already installed ompi 2.0.0, but I have faced the below error during running parallella-examples on epiphany:

[ORT warning]: Failed to open module "epiphany"

My second question is regarding variable allocation on each kernel's SPM. How can I handle allocation and data access remotely from different kernels?

Any help appreciated.
Thanks in advance
Posts: 13
Joined: Thu Dec 22, 2016 5:44 am

Re: OMPI support for Epiphany

Postby jar » Tue Jan 10, 2017 2:20 pm

You might have better luck contacting the OMP developer(s) directly.

You will probably have a hard time managing memory between multiple kernel invocations via the OpenMP interface. I don't know of any standard mechanism to perform what you're asking about with the scratchpad memory.

Within the COPRTHR-2 interface, you might wrap your kernels with a launcher kernel and make each subsequent kernel dynamically load at runtime so that you're not exactly paying for the program space. It should also be lower latency than having the host be involved to launch subsequent kernels. Pseudo-code follows.

Code: Select all
// Compile with: coprcc -fdynamic-calls
__dynamic_call kernel0(...) { ... } // mark routines with '__dynamic_call'
__dynamic_call kernel1(...) { ... }
__dynamic_call kernel2(...) { ... }

launcher_kernel() {
   // allocate shared memory between kernels
   kernel0(...); // kernels are loaded at runtime and resources freed after used
   kernel1(...); // pass shared SPM resources from launcher to each kernel
User avatar
Posts: 179
Joined: Mon Dec 17, 2012 3:27 am

Re: OMPI support for Epiphany

Postby mgrecki » Wed Jan 25, 2017 2:48 pm

I have exactly the same problem trying simple example to work.

Code: Select all
#include <omp.h>
#include <stdio.h>

void subdomain(float *x, int istart, int ipoints)
int i;

for (i = 0; i < ipoints; i++)
  x[istart+i] = 123.456;

void sub(float *x, int npoints)
int iam, nt, ipoints, istart;

#pragma omp parallel default(shared) private(iam, nt, ipoints, istart)
  iam = omp_get_thread_num();
  nt = omp_get_num_threads();
  printf("%d/%d\n", iam, nt);
  ipoints = npoints/nt; /* size of partition */
  istart = iam*ipoints; /* starting array index */
  if (iam == nt-1) /* last thread may do more */
    ipoints = npoints-istart;
  subdomain(x, istart, ipoints);

int main()
float array[10000];

sub(array, 10000);

//for(int i=0;i<sizeof(array)/sizeof(float);++i)
//  printf("%f ", array[i]);

return 0;

It forks into 2 threads running on CPU cores but cannot initialize epiphany.
Posts: 3
Joined: Sat Mar 28, 2015 1:22 am

Re: OMPI support for Epiphany

Postby mgrecki » Wed Jan 25, 2017 6:28 pm

some debugging has lead to:

/usr/local/lib/ompi/devices/epiphany/ undefined symbol: ee_set_core_config
while the device module is to be loaded.

I will continue debugging, but honestly speaking I have expected less problems.
Posts: 3
Joined: Sat Mar 28, 2015 1:22 am

Re: OMPI support for Epiphany

Postby olajep » Tue Feb 14, 2017 5:33 pm


OMPi 2.0.0 (+patches) is included in Parabuntu 2016.11, which can be downloaded from here: ... -2016.11.1

If you must build OMPi from source, use this tree for Parabuntu / esdk 2016.3+

// Ola
_start = 266470723;
Posts: 44
Joined: Mon Dec 17, 2012 3:24 am
Location: Sweden

Return to OpenMP

Who is online

Users browsing this forum: No registered users and 1 guest