.upc UPC source; preprocess, compile, assemble .upci Preprocessed UPC; compile, assemble .h Preprocessor file; not usually named on command line .c,.i,.s C, preprocessed C, and assembler source files, and are processed by the C compiler and assembler. The resulting object files can be linked with UPC source code.Files with other suffixes are passed to the linker. Common cases include:
.o Object file .a Archive file
Linking is always the last stage unless you use one of the -c, -S, or -E options to avoid linking (or unless compilation errors stop the whole process). For the link stage, all .o files corresponding to source files, -l libraries, unrecognized filenames (including named .o object files and .a archives) are passed to the linker in command-line order.
The number of THREADS in an UPC application can be specified statically at compile-time, or dynamically at execution time. In the static compilation environment THREADS is a constant, and can be used freely in contexts where a constant is required by the C language specification (for example in an array declaration). In a dynamic compilation environment, the value of THREADS is given at runtime, and THREADS can be used in array declarations only if the array is qualified as shared and in contexts where one and only one of the shared array's dimensions is specified as an integral multiple of THREADS.
If the UPC program was not compiled with the -fupc-threads-n option, then the number of THREADS must be specified explicitly on the command line when the program is executed. The UPC runtime recognizes the -fupc-threads-n command line switch, and establishes the number of parallel execution threads given by the value `n'. Generally, `n' should not exceed the number of physical central processing units. The implementation-imposed maximum value of `n' is 256.
The size of the heap used by the UPC program is established with the specificaion of the -fupc-heap-n command line switch. The value of `n' is the size of the heap available to each thread, specified in bytes. A suffix of `K', indicates that the value `n' is expressed in kilobytes (2^10 bytes); a suffix of `M' indicates that `n' is expressed in megabytes (2^20 bytes); and `G' indicates the value is given in gigabytes (2^30 bytes). If the -fupc-heap-n switch is not supplied, then the runtime system will choose a default heap size of 1 megabyte per thread.
The UPC runtime will remove all switches that begin with the prefix -fupc- and that immediately follow the UPC program name on the command line, before calling the UPC program's `main()' routine.
file.upc UPC source file file.upci preprocessed UPC source file file.c C source file file.h C header (preprocessor) file file.i preprocessed C source file file.s assembly language file file.o object file a.out link edited output TMPDIR/cc* temporary files LIBDIR/cpp preprocessor LIBDIR/cc1upc compiler for UPC LIBDIR/cc1 compiler for C LIBDIR/collect2 linker front end needed on some machines LIBDIR/libupc.a UPC runtime library LIBDIR/libgcc.a GCC subroutine library /lib/crt[01n].o start-up routine /lib/libc.a standard C library, see intro(3) /usr/include standard directory for #include files LIBDIR/include standard gcc directory for #include filesLIBDIR should be found by using upc -v
Introduction to UPC and Language Specification, William W. Carlson et al., LLNL, CCS-TR-99-157, May 13, 1999
UPC Language Specifications Tarek A. El-Ghazawi et al, February 25, 2001
The GNU UPC Mailing List is an electronic forum for discussing news announcements, bug reports, planned developments, and other topics of interest to GNU UPC developers and users.