7.4. Compilers and ESSL libraries

As of today, in addition to open source compilers, the following compilers have recently been added to the family of pSeries running Linux.

- IBM XL Fortran V8.1 for Linux on pSeries, see:

http://www.ibm.com/software/awdtools/fortran/xlfortran/features/xlf-linux.html

- IBM VisualAge® C++ V6.0 for Linux on pSeries, see:

http://www.ibm.com/software/awdtools/vacpp/features/vacpp-linux.html

- Absoft Pro Fortran 8.2 for PPC/Linux , see:

http://www.absoft.com/newppcproductpage.html

Some features of the compilers are listed in Table 7-3.

Table 7-3. Linux on pSeries - available compilers and their features
 IBM XLF/VACPPGNU gcc/g++/g77Cross Compilers gcc/g++/g77Absoft Pro Fortran
C/C++yesyesyesno
FortranF77/F90/F95F77F77F77/F90/F95
App Space32- and 64-bit32-bit64-bit32-bit
OpenMPyesnonono[*]
Auto Parallelizationyesnonono[*]

[*] You need a third-party pre-processor to support these features.

7.4.1. Installing GNU and cross-compilers

XLF, VACPP and Pro Fortran compilers all require gcc to be installed. In addition, many HPC applications in the Linux world also need gcc for compiling either whole program suites or some of the utility programs. 64-bit applications need a 64-bit environment, which is provided by cross-compilers.

GNU g77 compilers are also often needed even with the existence of other, more advanced compilers such as the XLF compiler. Therefore, it is highly recommended that the whole set of GNU and cross compilers gcc, g++, and g77, be installed.

The best time to do this is during operating system installation so that dependencies and so forth are taken care of by installation software. Nevertheless, we list here a script to do rpm installation.

The command lines to install the whole set of GNU compilers (gcc, g++, and g77, all 32-bit) are listed in Example 7-4.

Example 7-4. Installation of complete set of GCC (32-bit) and libelf.
# gcc
rpm -ivh binutils-2.12.90.0.15-67.ppc.rpm
rpm -ivh cpp-3.2.2-35.ppc.rpm
rpm -ivh libgcc-3.2.2-35.ppc.rpm
rpm -ivh glibc-devel-2.2.5-139.ppc.rpm
rpm -ivh gcc-3.2.2-35.ppc.rpm
# g++
rpm -ivh libstdc++-3.2.2-35.ppc.rpm
rpm -ivh libstdc++-devel-3.2.2-35.ppc.rpm
rpm -ivh gcc-c++-3.2.2-35.ppc.rpm
# g77
rpm -ivh gcc-g77-3.2.2-35.ppc.rpm
# libelf
rpm -ivh libelf-0.8.2-35.ppc.rpm

In Example 7-5, we list command lines to install 64-bit cross compilers that include c/c++/f77 components. We chose a lower version of the compiler (3.2-49, instead of 3.2.2-44, which was also available at the time of installation) since the higher version does not work well; the c++ compiler does not even compile a “Hello World” code.

Example 7-5. Installation of 64-bit cross compilers
# Install packages
rpm -ivh cross-ppc64-binutils-2.13.90.0.4-81.ppc.rpm
rpm -ivh cross-ppc64-glibc-2.2.5-129.ppc.rpm
rpm -ivh cross-ppc64-gcc-3.2-49.ppc.rpm
# Add to the $PATH, assuming sh or bash.
cat > /etc/profile.d/cross_compilers.sh << EOF
PATH=/opt/cross/bin:$PATH
export PATH
EOF

7.4.2. Installing XL Fortran and VisualAge C++ compilers

Installing XL Fortran V8.1 (XLF) for Linux on pSeries and VisualAge C++ (VACPP) V6.0 for Linux on pSeries is straightforward as long as GCC and libelf have been properly installed. The 64-bit cross compilers are necessary only for 64-bit support of XLF and VACPP.

Example 7-6 on page 315 lists command lines to install the packages and to configure the environment. The “new_install” script is an interactive script which asks two simple questions about language choice and license acceptance and then does the post-installation configuration.

Example 7-6. Installation of IBM XL Fortran 8.1 VisualAge C++ 6.0
# XLF installation
rpm -ivh xlsmp.msg.rte-1.3.7-0.ppc64.rpm
rpm -ivh xlsmp.rte-1.3.7-0.ppc64.rpm
rpm -ivh xlsmp.lib-1.3.7-0.ppc64.rpm
rpm -ivh xlf.msg.rte-8.1.0-0.ppc64.rpm
rpm -ivh xlf.rte-8.1.0-0.ppc64.rpm
rpm -ivh xlf.cmp-8.1.0-0.ppc64.rpm
rpm -ivh xlf.help-8.1.0-0.ppc64.rpm
rpm -ivh xlf.samples-8.1.0-0.ppc64.rpm
/opt/ibmcmp/xlf/8.1/bin/new_install

# For VACPP - xlsmp.rte and xlsmp.lib are needed
rpm -i  vacpp.rte-6.0.0-0.ppc64.rpm
rpm -i  vacpp.help-6.0.0-0.ppc64.rpm
rpm -i vacpp.samples-6.0.0-0.ppc64.rpm
rpm -i vac.cmp-6.0.0-0.ppc64.rpm
rpm -i vacpp.cmp-6.0.0-0.ppc64.rpm
/opt/ibmcmp/vac/6.0/bin/new_install

# Set up PATH
cat > /etc/profile.d/ibmcmp.sh << EOF
PATH=/opt/ibmcmp/xlf/8.1/bin:/opt/ibmcmp/vacpp/6.0/bin
:/opt/ibmcmp/vac/6.0/bin:$PATH
export PATH
EOF

In most cases, the order of the command lines matters because of dependencies. After the installation, adding the path is the only thing needed to use the compilers. 32-bit and 64-bit support are done through compiler options (-q32, -q64) or through the use of an environment variable: OBJECT_MODE.

7.4.3. Installing Absoft Pro Fortran 8.2 compiler

Installing Absoft Pro Fortran 8.2 for LinuxPPC involves three steps, as shown in Example 7-7.

Example 7-7. Installation of Absoft Pro Fortran for LinuxPPC
rpm -ivh absoft_profortran-8.2-1.ppc.rpm
cp license.dat /opt/absoft
ABSOFT=/opt/absoft
PATH=/opt/absoft/bin:$PATH
export ABSOFT PATH

Important

In our example listings, we always put the PATH of the current software first to make sure the current software will be used if there are name conflicts.

However, in a production environment, you must be careful about the order of the PATH. For example, there are f77 in /usr/bin, /opt/ibmcmp/xlf/8.1/bin, /opt/absoft/bin. We recommend the following settings be in the system-wide startup script:

/opt/ibmcmp/xlf/8.1/bin:/opt/ibmcmp/vacpp/6.0/bin:/opt/ibmcmp/vac/6.0/bin:/o
pt/cross/bin:$PATH

Absoft PATH and environment (ABSOFT) can be added on the fly by users when there is a need.


7.4.4. Installing ESSL 4.1 and PESSL 3.1

For more detailed information on ESSL installation, see “Engineering and Scientific Subroutine Library for Linux on pSeries, Version 4 Release 1 Installation Guide (September 2003)”. In Example 7-8, we list the installation steps, followed by a brief explanation.

Example 7-8. Installation of ESSL and PESSL
# ESSL
rpm -ivh essl.license-4.1.0-0.ppc64.rpm
cd /opt/ibmmath/essl/4.1/bin
./install_essl -y -d /mnt/install/essl/
# PESSL
rpm -ivh pessl.license-3.1.0-0.ppc64.rpm
cd /opt/ibmmath/pessl/3.1/bin
./install_pessl -y -d /mnt/install/essl/

In Example 7-8, -y is an optional flag indicating that you are accepting the license agreement without being prompted. -d rpmpath is an optional flag specifying the directory that contains the ESSL packages. To use the default directory (/media/cdrom), do not specify this flag.

Header files and libraries (or soft links of them) are placed at the system default places /usr/include and /usr/lib after successful installation. However, the use of the libraries for compiling, linking, running, and so on depends on the availability of the XLF compiler, XLF runtime, GCC; refer to the documentation for further details.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.39.252