IBM®
Skip to main content
    United States change      Terms of use
 
 
Select a scope:    
     Home      Products      Services & industry solutions      Support & downloads      My account     
alphaWorks  >  Systems management  >  

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
Overview Requirements DownloadFAQsForum Reviews

1. What is Unified Parallel C (UPC)?
2. What does "Hello World" look like in UPC?
3. I've downloaded the IBM® XL UPC Alpha Edition packages, but I cannot install them. What could be missing?
4. I get a configuration file not found error message when I tried using the XL UPC for Linux compiler. What could be wrong?
5. I get an error when I try to generate the configuration file using the new_install tool for XL UPC Alpha Edition for Linux. What should I do now?
6. How do I invoke the IBM XL UPC compilers?
7. How do I specify the number of threads?
8. How do I compile UPC source files with a .c file extension?
9. Can I compile and link UPC and C source files together?
10. Can I link XL UPC object files with those generated by GCC?
11. What is the largest number of threads that XL UPC supports? What is the largest blocking factor?
12. Why does the compiler tell me my license has expired?


1. What is Unified Parallel C (UPC)?

UPC is an extension to the C programming language that allows users to express parallelism in their code.
Back to top Back to top

2. What does "Hello World" look like in UPC?


#include <stdio.h>
#include <upc.h>

int main()
{
printf ("thread %d: Hello World!\n", MYTHREAD);
return 0;
}

Back to top Back to top

3. I've downloaded the IBM® XL UPC Alpha Edition packages, but I cannot install them. What could be missing?

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.

Back to top Back to top

4. I get a configuration file not found error message when I tried using the XL UPC for Linux compiler. What could be wrong?

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.

Back to top Back to top

5. I get an error when I try to generate the configuration file using the new_install tool for XL UPC Alpha Edition for Linux. What should I do now?

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:

  1. Ensure you are using the XL UPC new_install utility and not the XL C/C++ new_install utility.
  2. 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:

  1. Use /opt/ibmcmp/upc/1.0/etc/upc.base.cfg as the <template_config_file>.
  2. 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."

Back to top Back to top

6. How do I invoke the IBM XL UPC compilers?

Invoke the IBM XL UPC for AIX compiler by using the following command:
/usr/upc/bin/xlupc

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

Back to top Back to top

7. How do I specify the number of threads?

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.
Back to top Back to top

8. How do I compile UPC source files with a .c file extension?

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.
Back to top Back to top

9. Can I compile and link UPC and C source files together?

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

Back to top Back to top

10. Can I link XL UPC object files with those generated by GCC?

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.
Back to top Back to top

11. What is the largest number of threads that XL UPC supports? What is the largest blocking factor?

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.
Back to top Back to top

12. Why does the compiler tell me my license has expired?

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.

Back to top Back to top
Download now Download now

Related technologies

For platform(s):
Linux, AIX V5.x

For topics:
APIs, Compilers, high-performance computing (HPC), IBM Blue Gene/L architecture, IBM eServer pSeries, Unified Parallel C (UPC)


 

    About IBM Privacy Contact