Compile OmpSs-2 programs ======================== For OmpSs-2 programs that run in SMP or NUMA systems, you do not have to do anything. Just pick one of the drivers above. .. highlight:: c Following is a very simple OmpSs-2 program in C:: /* test.c */ #include int main(int argc, char *argv[]) { int x = argc; #pragma oss task inout(x) { x++; } #pragma oss task in(x) { printf("argc + 1 == %d\n", x); } #pragma oss taskwait return 0; } .. highlight:: none Compile it using `mcc`:: $ mcc -o test --ompss-2 test.c .. important:: Do not forget the flag ``--ompss-2`` otherwise your program will be compiled without parallel support. .. highlight:: none And run it:: $ ./test argc + 1 == 2 Compile OpenMP programs with OmpSs-2 support -------------------------------------------- By passing the ``--openmp-compatibility`` flag, Mercurium will support some constructs of OpenMP (e.g. taskloop, parallel for, etc.). .. warning:: Experimental flag. There are no guarantees the generated code behaves as the OpenMP program.