To be able to use the upc keywords shared, you have to use the command line option : "-fthreads" upc_free does not exist in the current implemantation of the upc librairy. The upc linker is not able to link correctly the function upc_barrier. To use this function, you need to compile and link in one function without generating intermediate object files. Troubles with memory allocation using upc_local_alloc.