User`s guide

Cray XMT Programming Environment Users Guide
When you use the -pl and -c options to compile a source file, the compiler
performs the following tasks during the compilation phase:
Checks the source for syntax errors
Creates an internal representation of each function in the program library
Produces a skinny .o file
During the linking phase, the compiler performs the following tasks to create an
executable:
Performs optimizations using information about the complete program
Builds objects for each module
Links the modules together to produce an executable
Stores objects in the program library to support incremental recompilation
As in traditional UNIX compilation, the -o flag specifies the executable name
explicitly. To do this, use the following command:
c++ -pl test.pl -o test svd.o ddot.o
The previous command links the svd and ddot modules that reside in test.pl
and creates the executable in a file called test.
You can also specify multistep command sequences that use a mix of source and
object files when using whole-program mode. To do this, use the following sequence
of commands:
c++ -pl a.out.pl -c ddot.cc
c++ -pl a.out.pl arnoldi.cc ddot.o
The first command partially compiles ddot.cc. The second command partially
compiles arnoldi.cc; completes compilation and optimization of the modules
ddot and arnoldi; links arnoldi, ddot, and any required libraries; and places
the resulting executable in a.out. The compiler optimizes each function using
information about the ddot and arnoldi modules.
7.3.2 Separate-module Mode
-pl flag to compilation and link lines. Separate-module mode also prevents the
propagation of changes made in one module to other modules. This greatly reduces
the level of optimization that occurs when using separate-module mode compared to
that of whole-program mode.
To compile a single source file into its corresponding object file, use the following
command.
c++ -c ddot.cc
82 S247920