Section 3.6.1 describes the serial application programming model.

Section 3.6.2 discusses how to build serial applications.

For further information about developing serial applications, refer to the following sections:

Section 4.1 describes how to debug serial applications.

Section 6.4 describes how to launch applications with the srun command.

Section A.1 provides examples of serial applications.

3.6.1Serial Application Build Environment

The HP XC programming environment supports building and running serial applications. A serial application is a command or application that does not use any form of parallelism.

An example of a serial application is a standard Linux command, such as the ls or hostname command. A serial application is basically a single-processor application that has no communication library calls such as MPI.

3.6.1.1 Using MLIB in Serial Applications

Information about using HP MLIB in serial applications is provided in Chapter 9. The HP MLIB Product Overview and HP MLIB User’s Guide are available on the HP XC Documentation CD.

3.6.2 Building Serial Applications

This section discusses how to build serial applications on an HP XC system. Compiling, linking, and running serial applications are discussed.

To build a serial application, you must be logged in to an HP XC node with the login role. Serial applications are compiled and linked by invoking compilers and linkers directly.

You launch a serial application either by submitting it to LSF with the bsub command, or by invoking the srun command to run it. The process is similar to launching a parallel application, except that only one compute node processor is used. To run on an compute node processor, the serial application and any required dynamic libraries must be accessible from that node. A serial application can also be tested locally by running it on the login node.

3.6.2.1 Compiling and Linking Serial Applications

Serial applications are compiled and linked by invoking compile and link drivers directly.

You can change compilers by using modules. Refer to Section 2.2 for information about using modules.

As an alternative to using dynamic libraries, serial applications can also be linked to static libraries. Often, the -staticoption is used to do this.

Refer to Section A.1 for examples of building serial applications with the GNU C, GNU Fortran, and Intel C/C++, and Intel Fortran compilers.

3.7 Developing Parallel Applications

This section describes how to build and run parallel applications. The following topics are discussed:

The parallel build environment (Section 3.7.1)

Building parallel applications (Section 3.7.2)

For further information about developing parallel applications in the HP XC environment, refer to the following sections:

3-4Developing Applications

Page 44
Image 44
HP XC System 2.x Software manual Developing Parallel Applications, Serial Application Build Environment