Hprc banner tamu.png

Difference between revisions of "Curie:Compile:Intro"

From TAMU HPRC
Jump to: navigation, search
(Created page with "== Getting Started == Before you can use any of the installed software packages (e.g. compilers, libraries) you will need to setup the correct environment (e.g. set PATH, L...")
 
Line 14: Line 14:
 
For more information about modules, please visit,
 
For more information about modules, please visit,
 
https://sc.tamu.edu/wiki/index.php/Ada:Computing_Environment#Modules
 
https://sc.tamu.edu/wiki/index.php/Ada:Computing_Environment#Modules
 +
 +
 +
== Compiling ==
 +
 +
The preferred compilers on curie are the IBM XL Compilers. The table below shows
 +
the various compilers:
 +
 +
{| class="wikitable" style="text-align: center;"
 +
! Compilers
 +
! Commands
 +
|-
 +
|Fortran compilers
 +
|xlf/xlf_r
 +
|-
 +
|C compilers
 +
|xlc/xlc_r
 +
|-
 +
|C++ compilers
 +
|xlc++/xlc++_r
 +
|}
 +
 +
The compilers with the "_r" extension will generate threadsafe code and are
 +
used to compile threaded programs (e.g., programs containing OpenMP
 +
directives/constructs)
 +
 +
By default, the XL compilers generate 32-bit code. To generate 64-bit code you
 +
can use the -q64 compiler flag or set the environmental variable OBJECT_MODE
 +
to 64 (NOTE, when you load any of the XL compiler modules OBJECT_MODE is set
 +
to 64 automatically).

Revision as of 14:44, 8 September 2015

Getting Started

Before you can use any of the installed software packages (e.g. compilers, libraries) you will need to setup the correct environment (e.g. set PATH, LD_LIBRARY_PATH, etc). On curie this is done using the "module" system.

To load a module use: module load PACKAGE, where PACKAGE is the name of the software you want to setup. For example, to use the xlf compiler type, module load xlf. To see all available packages type the module spider command. To see all installed versions for a specific package type, module spider PACKAGE.

To see a list of all installed packages type: module list For more information about modules, please visit, https://sc.tamu.edu/wiki/index.php/Ada:Computing_Environment#Modules


Compiling

The preferred compilers on curie are the IBM XL Compilers. The table below shows the various compilers:

Compilers Commands
Fortran compilers xlf/xlf_r
C compilers xlc/xlc_r
C++ compilers xlc++/xlc++_r

The compilers with the "_r" extension will generate threadsafe code and are used to compile threaded programs (e.g., programs containing OpenMP directives/constructs)

By default, the XL compilers generate 32-bit code. To generate 64-bit code you can use the -q64 compiler flag or set the environmental variable OBJECT_MODE to 64 (NOTE, when you load any of the XL compiler modules OBJECT_MODE is set to 64 automatically).