
3
Developing Applications
This chapter discusses topics associated with developing ap plicatio ns in the HP XC environment.
Before reading this ch apter, you should you read and understand Chapter 1 and Chapter 2.
This chapter discusses the following topics:
• HP XC application development environment overview (Section 3.1)
• Using compilers (Section 3.2)
• Getting system information (Section 3.3 )
• Getting system information (Section 3.4 )
• Setting debugging options (Section 3.5)
• Developing serial applications (Section 3.6)
• Developing parallel applications (Section 3.7)
• Developing libraries (Section 3.8)
• Advanced topics (Section 3.9)
3.1 Overview
The HP XC cluster provides an application development environmen t that enables developing,
building, and run ning ap p li cations u s ing m ult ipl e nodes with multi ple processors. These
applications can be parallel applications using many processors, or serial applications using a
single processor.
The HP XC cluster is made up o f nodes that are assigned one or more various roles. Of
importance to the application developer are the nodes that h ave the compute role and the login
role (compute nodes and login nodes). Com pu te nodes run user ap plicatio ns. Login nodes are
where you log in and interact with the system to perform various tasks, such as executing
commands, compiling and linking applications, and launching app lication s. A login node
can also execute single-processor applications and com mands, just as on any other standard
Linux system. Applications are launched from log in nodes, and then distributed and run on
one or more compute nodes.
The HP XC environment uses the LSF batch job scheduler to launch and manage parallel and
serial applications. When a job is submitted, LSF places the job in a queue and allows it to run
when the necessary resources become available. When a job is completed, LSF returns job
output, job information, and any errors. In addition to batch jobs, LSF can also run interactive
batch jobs and interactive jobs. An LSF interactive batch job is a batch job that allows you to
interact with the application, yet still take advantage of LSF scheduling policies and features.
An LSF interactive job is run without using LSF’s batch processing features, b ut is dispatched
immediately by LSF on the LSF execution host node. LSF is described in detail in Chapter 7.
Regardless of whether an application is parallel or serial, or whether it is run interactively or as
a batch job, the general steps to d eveloping an HP XC application are as follows:
1. Build the code by compiling a n d linking with the correct compiler. Note that compiler
selection, and set up of appropriate parameters for specific compilers, is made easier
by the use of modules.
2. Launch the application with the bsub, srun,ormpirun command.
The build and launch commands are executed from the node to which you are logged in.
Developing Applications 3-1
Commentaires sur ces manuels