Documentation errata for IBM XL C/C++ Advanced Edition for Blue Gene 9.0

Preventive Service Planning


Abstract

This page contains corrections and additions to the product documentation and README shipped with IBM XL C/C++ Advanced Edition for Blue Gene/P, 9.0 and IBM XL C/C++ Advanced Edition for Blue Gene/L, 9.0.

Content

Using the XL Compilers for Blue Gene

The following correction applies to the IBM XL C/C++ Advanced Edition for Blue Gene, 9.0 Using the XL Compilers for Blue Gene.

Chapter: Using XL builtin floating-point functions for Blue Gene

Section: Load and store functions

After Parallel load (single-precision): __lfps, the following function should be added:

Function Parallel load (single-precision complex): __lfpcs
Purpose Loads parallel single-precision complex value from the address of a , and converts the result to double-precision complex. The first word in address(a) (the real part) is loaded into the primary element of the return value. The next word (the imaginary part), at location address(a) +4, is loaded into the secondary element of the return value.
Formula primary(result) = (double) __crealf(*a)
secondary(result) = (double) __cimagf(*a)
C/C++ prototype double _Complex __lfpcs (float _Complex * a);
Fortran description Fortran uses generic type names. Please refer to __lfps for the interface information.

After Parallel load: __lfpd, the following function should be added:

Function Parallel load (double-precision complex): __lfpcd
Purpose Loads parallel double-precision complex value from the address of a. The first doubleword in address(a) (the real part) is loaded into the primary element of the return value. The next doubleword (the imaginary part), at location address(a) +8, is loaded into the secondary element of the return value.
Formula primary(result) = __creal(*a)
secondary(result) = __cimag(*a)
C/C++ prototype double _Complex __lfpcd (double _Complex * a);
Fortran description Fortran uses generic type names. Please refer to __lfpd for the interface information.

After Parallel store (single-precision): __stfps, the following function should be added:

Function Parallel store (single-precision complex): __stfpcs
Purpose Stores in parallel a double-precision complex value that has been converted to single-precision complex, into address(b). The primary element of a is converted to single-precision and stored as the first word (the real part) in address(b). The secondary element of a is converted to single-precision and stored as the next word (the imaginary part) at location address(b) +4.
Formula *b = __cmplxf ((float) primary(a), (float) secondary(a))
C/C++ prototype void __stfpcs (float _Complex * b, double _Complex a);
Fortran description Fortran uses generic type names. Please refer to __stfps for the interface information.

After Parallel store: __stfpd, the following function should be added:

Function Parallel store (double-precision complex): __stfpcd
Purpose Stores in parallel a double-precision complex value a into address(b). The primary element of a is stored as the first doubleword (the real part) in address(b). The secondary element of a is stored as the next doubleword (the imaginary part) at location address(b) +8.
Formula *b = __cmplx (primary(a), secondary(a))
C/C++ prototype void __stfpcd (double _Complex * b, double _Complex a);
Fortran description Fortran uses generic type names. Please refer to __stfpd for the interface information.

Section: Arithmetic functions

Topic: Select functions

Function Parallel select: __fpsel
Formula primary(result) = if primary(a) ≥ 0 then primary(c); else primary(b)
secondary(result) = if secondary(a) ≥ 0 then primary(c); else secondary(b)

should read:

Function Parallel select: __fpsel
Formula primary(result) = if primary(a) ≥ 0 then primary(c); else primary(b)
secondary(result) = if secondary(a) ≥ 0 then secondary(c); else secondary(b)


Installation Guide
The following correction applies to the IBM XL C/C++ Advanced Edition for Blue Gene, 9.0 Installation Guide.

Chapter: Advanced installation

Section: Installing IBM XL C/C++ Advanced Edition for Blue Gene, 9.0 to co-reside with earlier versions (for advanced users)

Topic: Installing IBM XL C/C++ Advanced Edition for Blue Gene, 9.0 to co-reside with earlier versions in the same location

Step 1: To avoid future dependency errors, remove the existing runtime packages by issuing the following commands:

    rpm -e vacpp.bg.rte-8.0.1-0  --nodeps
    rpm -e xlsmp.bg.lib-1.6.1-0  --nodeps
    rpm -e xlsmp.bg.rte-1.6.1-0  --nodeps
    rpm -e xlsmp.bg.msg.rte-1.6.1-0  --nodeps

Should read:

    rpm -e vacpp.bg.rte-8.0.0-0  --nodeps
    rpm -e xlsmp.bg.lib-1.6.0-0  --nodeps
    rpm -e xlsmp.bg.rte-1.6.0-0  --nodeps
    rpm -e xlsmp.bg.msg.rte-1.6.0-0  --nodeps

Step 5: Generate the default IBM XL C/C++ Advanced Edition for Blue Gene, 9.0 configuration file:

    /installation_path/vac/bg/9.0/bin/vac_configure -gcc /usr -gcc64 /usr
      -ibmcmp /installation_path/ /opt/ibmcmp/vac/bg/9.0/etc
    /vac.base.cfg
      -o  /etc/installation_path/vac/bg/9.0/vac.cfg

where installation_path is the location in which all IBM XL C/C++ packages are installed (by default, /opt/ibmcmp/).

should read:

    /installation_path/vac/bg/9.0/bin/vac_configure
    -gcc /usr
    -gcc64 /usr
    -targetgcc /bgl/BlueLight/ppcfloor/blrts-gnu/powerpc-bgl-blrts-gnu
    -ibmcmp /installation_path/
    -o  /etc/installation_path/vac/bg/9.0/vac.cfg
    /installation_path/vac/bg/9.0/etc/vac.base.cfg

where installation_path is the location in which all IBM XL C/C++ packages are installed (by default, /opt/ibmcmp/).

Chapter: After installing IBM XL C/C++ Advanced Edition for Blue Gene, 9.0

Section: Querying for installed packages

To confirm installation of all compiler packages, issue the following command:

    rpm -qa | grep -e vac.bg -e xlsmp.bg -e xlmass.bg

should read:

    rpm -qa | grep -e vac.bg -e xlsmp.bg -e xlmass.bg -e vacpp.bg


Section: Testing the installation

Topic: Basic example: Creating and running “Hello World”

3. Run the program by entering the following command:

    ./hello

The result should be "Hello World!".

should read:

3. Use the mpirun tool to run the hello program on the compute node. The result should be "Hello World!".

4. Check the exit code of the program by entering the following command:

    echo $?

The result should be 0.

should read:

4. Check if exit code is 0 in the output of mpirun.

The BG/L output should be like the following:

    BG/L job exit status = (0)

The BG/P output should be like the following:

    BG/P job exit status = (0)

7. Run the program:

      ./hello

The result should be "Hello World!".

should read:

7. Use the mpirun tool to run the hello program on the compute node. The result should be "Hello World!"

8. Check the exit code of the program:

    echo $?

The result should be “0”.

should read:

8. Check if exit code is 0 in the output of mpirun.

The BG/L output should be like the following:

    BG/L job exit status = (0)

The BG/P output should be like the following:

    BG/P job exit status = (0)

The following note should be added:

For information about running programs on the compute node, see the following IBM Redbooks® publications:
Section: Accessing the local documentation

Topic: Viewing the PDF documentation

The following text:

After default installation, the PDF documentation can be found in the /opt/ibmcmp/vacpp/9.0/doc/$LANG/pdf/ directory. For non-default installations, the PDF documentation is located in the $target_dir/vacpp/9.0/doc/$LANG/pdf/ directory, where target_dir is the target directory for installation specified by the -b option of the non-default installation script.

should read:

After default installation, the PDF documentation can be found in the /opt/ibmcmp/vacpp/9.0/doc/$LANG/pdf/ directory. For non-default installations, the PDF documentation is located in the installation_path /vacpp/9.0/doc/$LANG/pdf/ directory.

Compiler reference
The following correction applies to the IBM XL C/C++ Advanced Edition for Blue Gene, 9.0 Compiler reference.

Chapter: Configuring compiler defaults

Section: Setting environment variables

Topic: Environment variables for parallel processing

In "XLSMPOPTS", the description of stack= num should read:

stack= num
    Specifies the largest amount of space in bytes ( num) that a thread's stack needs. The default value for num is 4194304.

    Set num so it is within the acceptable upper limit. num can be up to the limit imposed by system resources or the stack size ulimit, whichever is smaller. An application that exceeds the upper limit may cause a segmentation fault.

-qinfo=private suboption
In the syntax diagram the suboption -qinfo=private has no affect when specified and should be removed. Instead, use the -qreport option to report compiler-driven automatic parallelization cases; user parallelization cases are not reported.

-qlanglvl

-qlanglvl=[no]FileScopeConstExternLinkage option
The following -qlanglvl option is added:

[no]FileScopeConstExternLinkage
Controls whether the file scope of constant variables have internal or external linkage when the static or extern keyword is not specified.

When -qlanglvl=fileScopeConstExternLinkage is in effect, all file scope constant variables are marked as externally visible. Otherwise, all file scope constant variables are marked as static.

Default: nofileScopeConstExternLinkage

#pragma stream_unroll

Examples

Should read:

The following example shows how #pragma stream_unroll can increase performance.

int i, m, n;
int a[1000];
int b[1000];
int c[1000];

....

#pragma stream_unroll(4)
for (i=0; i<n; i++) {
 a[i] = b[i] * c[i];
}


The unroll factor of 4 reduces the number of iterations from n to n/4, as follows:

m = n/4;

for (i=0; i<n/4; i++){
 a[i] = b[i] + c[i];
 a[i+m] = b[i+m] + c[i+m];
 a[i+2*m] = b[i+2*m] + c[i+2*m];
 a[i+3*m] = b[i+3*m] + c[i+3*m];
}


The increased number of read and store operations are distributed among a number of streams determined by the compiler, which reduces computation time and increase performance.

Programming Guide
The following correction applies to the IBM XL C/C++ Advanced Edition for Blue Gene, 9.0 Programming Guide.

Chapter: Constructing a library

Topic: Compiling and linking a library

The following short description is added:

This information describes how to compile your source files into object files for inclusion in a library, how to link a library into the main program, and how to link one library into another.


Chapter: Parallelizing your programs

Topic: Shared and private variables in a parallel environment

The following text:

The compiler can privatize some shared variables if it is possible to do so without changing the semantics of the program. For example, if each loop iteration uses a unique value of a shared variable, that variable can be privatized. Privatized shared variables are reported by the -qinfo=private option. Use critical sections to synchronize access to all shared variables not listed in this report.

Should read:

The compiler can privatize some shared variables if it is possible to do so without changing the semantics of the program. For example, if each loop iteration uses a unique value of a shared variable, that variable can be privatized. Privatized shared variables are reported by the -qreport option. Use critical sections to synchronize access to all shared variables not listed in this report.

For information on how to list which shared variables are privatized by the compiler, see:
How to list privatized shared variables in an automatic parallel loop

Related information

README updates for XL C/C++ for Blue Gene/P V9.0
README updates for XL C/C++ for Blue Gene/L V9.0

Cross reference information
Segment Product Component Platform Version Edition
Software Development XL C/C++ Advanced Edition for Blue Gene Documentation Blue Gene 9.0

Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

XL C/C++ Advanced Edition for Blue Gene
Documentation

Software version:

9.0

Operating system(s):

Blue Gene

Reference #:

1270580

Modified date:

2013-10-22

Translate my page

Machine Translation

Content navigation