5 setting debugging options, 6 developing serial applications, 1 serial application build environment – HP XC System 3.x Software User Manual

Page 39: 2 building serial applications, 1 compiling and linking serial applications, 7 developing parallel applications, Developing parallel applications, Building serial applications

Advertising
background image

The Ctrl/Z key sequence is ignored.

4.5 Setting Debugging Options

In general, the debugging information for your application that is needed by most debuggers can be
produced by supplying the -g switch to the compiler. For more specific information about debugging
options, see the documentation and manpages associated with your compiler.

4.6 Developing Serial Applications

This section describes how to build and run

serial application

s in the HP XC environment. The following

topics are covered:

“Serial Application Build Environment” (page 39)

describes the serial application programming

model.

“Building Serial Applications” (page 39)

discusses how to build serial applications.

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

“Debugging Serial Applications” (page 57)

describes how to debug serial applications.

“Launching Jobs with the srun Command” (page 79)

describes how to launch applications with the

srun

command.

“Building and Running a Serial Application” (page 113)

provides examples of serial applications.

4.6.1 Serial Application Build Environment

You can build and run serial applications in the HP XC programming environment. 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-core application that has no communication library calls such as
MPI.

4.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.

You launch a serial application either by submitting it to LSF-HPC 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 core 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.

4.6.2.1 Compiling and Linking Serial Applications

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

You can change compilers by using modules. For information about using modules, see

“Overview of

Modules” (page 31)

.

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

For examples of building serial applications with the GNU C, GNU Fortran, and Intel C/C++, and Intel
Fortran compilers, see

“Building and Running a Serial Application” (page 113)

.

4.7 Developing Parallel Applications

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

“Parallel Application Build Environment” (page 40)

“Building Parallel Applications” (page 42)

4.5 Setting Debugging Options

39

Advertising