Unified Parallel C (UPC) Options
Describes the UPC enhancements to standard Clang
These options have been added to CCE Clang to support UPC.
-hupc, -hdefault-hupcconfigures the compiler driver to expect UPC source code. Source files with a .upc extension are automatically treated as UPC code, but this option permits a file with any other extension (typically .c) to be understood as UPC code.-hdefaultcancels this behavior; if both -hupc and-hdefaultappear in a command line, whichever appears last takes precedence and applies to all source files in the command line.-fupc-auto-amo, -fno-upc-auto-amo- Automatically use network atomics for remote updates to reduce latency. For example,
x += 1can be performed as a remote atomic add. If an update is recognized as local to the current thread, then no atomic is used. These atomics are intended as a performance optimization only and shall not be relied upon to prevent race conditions. Enabled at-O1and above. -fupc-buffered-async, -fno-upc-buffered-async- Set aside memory in the UPC runtime library for aggregating random remote accesses designated with
#pragma pgas buffered_async. Disabled by default. -fupc-pattern, -fno-upc-pattern- Identify simple communication loops and aggregate the remote accesses into a single function call which replaces the loop. Enabled at
-O1and above. -fupc-threads=N- Set the number of threads for a static
THREADStranslation. This option causes__UPC_STATIC_THREADS__to be defined instead of__UPC_DYNAMIC_THREADS__and replaces all uses of the UPC keywordTHREADSwith the value N.