IBM XL UPC Compilers
A compiler with implementation for Unified Parallel C (UPC) High-Performance Computing (HPC) applications on large-scale, parallel processing machines.
Date Posted: November 14, 2005
|
|
 |
 |
|
 |  UPC is an extension to the C programming language that allows users to express parallelism in their code. | | |
 | 
#include <stdio.h>
#include <upc.h>
int main()
{
printf ("thread %d: Hello World!\n", MYTHREAD);
return 0;
}
|
| | |
 |  In order to use the IBM XL UPC for AIX®, you must first install the IBM XL C/C++ Enterprise Edition 9.0 for AIX compiler.
In order to use the IBM XL UPC for Linux®, you must first install the IBM XL C/C++ Advanced Edition 9.0 for Linux compiler.
In order to use the IBM XL UPC for Blue Gene®/L, you must first install the IBM XL C/C++ Advanced Edition 9.0 for Blue Gene/L compiler. | | |
 |  After installation, you must generate a configuration file for UPC using the new_install utility. Ensure that this step has been done (refer to Step 3c in the "Installation instructions" found in the README file).
Note: The IBM XL UPC compiler uses a different configuration file than the IBM XL C/C++ compiler. The UPC configuration file contains additional information required for compiling UPC programs. | | |
 |  The new_install utility gathers the required system information, constructs the appropriate configuration command, and invokes it. If the utility cannot gather all of the information automatically, you may have to perform this step manually using the vac_configure utility provided with the IBM XL C/C++ Advanced Edition 9.0 for Linux compilers.
Before proceeding to try and configure the compiler manually, you should first go through the following checklist:
- Ensure you are using the XL UPC new_install utility and not the XL C/C++ new_install utility.
- See if you can determine the cause of the errors reported by the new_install utility (such as missing GCC, insufficient permissions, etc.).
If the new_install utility is still not able to automatically configure the XL UPC compiler, please use the vac_configure utility.
The vac_configure command required for configuring the XL UPC compiler is almost identical to the command used to configure the XL C/C++ compiler, with the exception of two options:
- Use /opt/ibmcmp/upc/1.0/etc/upc.base.cfg as the <template_config_file>.
- Use /opt/ibmcmp/upc/9.0/etc/upc.cfg as the argument to the -o option.
For example, the following command should work for most typical installations:
% /opt/ibmcmp/vac/9.0/bin/vac_configure
-ibmcmp /opt/ibmcmp
-gcc /usr
-gcc64 /usr
-o /opt/ibmcmp/upc/1.0/etc/upc.cfg
/opt/ibmcmp/upc/1.0/etc/upc.base.cfg
|
For further information regarding the vac_configure utility, please refer to the "IBM XL C/C++ Advanced Edition 9.0 for Linux Installation Guide." | | |
 |  Invoke the IBM XL UPC for AIX compiler by using the following command:
Invoke the IBM XL UPC for Linux compiler by using the following command:
/opt/ibmcmp/upc/1.0/bin/xlupc
|
Invoke the IBM XL UPC for Blue Gene/L compiler by using the following command:
/opt/ibmcmp/upc/bg/1.0/bin/bgxlupc
|
| | |
 |  At compilation time, the number of threads can be specified using the -qupcthreads=<n> compiler option. At run time, the number of threads can be specified by setting the environment variable UPC_NTHREADS=n. The default number of threads is 1. | | |
 |  In order to instruct the compiler to treat files with a .c extension as UPC source files, please specify the compiler option -qsourcetype=upc before the source file on the compilation command. | | |
 |  Yes, UPC and C source files can be compiled and linked together using the xlupc compiler invocation. For example:
xlupc foo.upc bar.c -o foobar
|
| | |
 |  You cannot mix XL UPC object files with the GCC object files if the latter contains UPC language features. The framework for allocating and accessing shared objects is different in different UPC implementations. UPC code in a XL UPC object file will not operate correctly if the program is initialized to run under the GCC run time, and vice versa. | | |
 |  The code generated by the compiler allows a value range of up to 2**31 for UPC_NTHREADS. Since the IBM XL UPC Alpha Edition for AIX is a Pthread implementation, the actual number of threads that a program can create is also limited by the run-time environment. The largest blocking factor that you can specify in a shared variable declaration is 2**31.
| | |
 |  The IBM XL UPC Alpha Edition Compilers are available for a 365-day trial period. If you wish to continue using the package after the trial period has expired, you must download it again and reinstall it on your system.
Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both.
IBM, AIX, and Blue Gene are trademarks of IBM Corporation in the United States, other countries, or both.
Other company, product, or service names may be trademarks or service marks of others.
| |
|
|
 |
|
| |