# StarPU --- Runtime system for heterogeneous multicore architectures.
#
# Copyright (C) 2019-2022  Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
#
# StarPU is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or (at
# your option) any later version.
#
# StarPU is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# See the GNU Lesser General Public License in COPYING.LGPL for more details.
#

To compile and execute this application outside StarPU :

$ clang -fopenmp ./hello-task.c
$ ldd ./a.out
...
	libomp.so.5 => /usr/lib/x86_64-linux-gnu/libomp.so.5 (0x00007fbf3d42d000)
...
$ ./a.out
Hello from 0
Hey 0
Hey 1
Hey 2
Hey 3
Hey there
array: 1, 1, 1, 1,

To execute the application using the StarPU OpenMP LLVM support, one just needs it to create a symbolic link named libomp.so.5 to the StarPU OpenMP LLVM library, e.g

$ mkdir libs
$ ln -s $STARPU_ROOT/lib/libstarpu_openmp_llvm-1.3.so libs/libomp.so.5
$ LD_LIBRARY_PATH=./libs:$LD_LIBRARY_PATH ./a.out
[starpu][__kmp_constructor] Initialising the StarPU OpenMP LLVM Support
Hello from 0
[starpu][__kmpc_omp_task_with_deps] Using the StarPU OpenMP LLVM Support
Hey 0
Hey 1
Hey 2
Hey 3
Hey there
array: 1, 1, 1, 1,
