Compilers & Parallel Programming
Linux Machines
Workstations, Mckenzie, Lobsters
There are 3 architectures that run GNU/Linux at CITA, x86 (ia32,athlon), x86_64 (amd64/opteron,em64t), and Itanium (1+2).
The workstations are a mix of x86 and x86_64, Mckenzie is x86, and the lobsters are Itaniums. Both the Intel compilers and the GNU compiler collection are available on all of these architectures. They are respectively called icc/gcc for the C compiler, icpc/g++ for the C++ compiler, and ifort/gfortran for the Fortran compiler. Both compilers support OpenMP (as of Fedora Core 5).
- The best compilers to use in terms of code execution speed, although gcc is closing the gap
- On the old Itaniums (all except lobster6) these are called with
efc/ecc
- Documentation sources in order of increasing complexity:
[ifort/icc/icpc] -help" will show notes about using the compiler.
man [ifort/icc/icpc] will display informative manual pages on compiler flags/usage
- Fortran v8.1 and C/C++ v8.1 documentation
- If you are returned with "command not found" when you try to use the compilers and they are not in your
$PATH, make sure you are sourcing the cita optional user-template:
source /cita/adm/conf/utemplate/useroptional.csh in your shell initialization file ~/.cshrc
- Quick optimization flags:
- full code optimization is -O3
- optimizations for a given cpu architecture:
- -tpp1 for the lobsters (itanium1)
- -tpp2 for lobster6 (itanium2)
-
- -tpp7 for porcupine, kodiak (pentium4)
- -tpp5 for standard pentiums
- -tpp6 for pentium pro, 2 and 3
- optimizations for a given instruction set dictated by processor type:
- -xM for processor with MMX
- -xi for pentium pro and pentium 2
- -xK for pentium 3
- -xN for pentium 4 / Xeon
- -fast enables -O3,-static, -ipo. May decrease code performance.
GCC
(GNU Compiler Collection)
- Currently contains front ends for C, C++, Objective-C, Fortran, Java, and Ada, as well as
libraries for these languages (libstdc++,
libgcj,...).
- In addition, G95 is installed on porcupine and the cluster at
/usr/bin/g95. It has a resume from dump feature that can be signal initiated, as well as an extensive environment configuration.
Debuggers
The Intel debugger (idb) and the Gnu debugger (gdb) are both available on all of the Linux machines.
Documentation on the debugger can be found in:
Intel Debugger V7.1 Documentation
Intel Debugger V7.3 Documentation
Vendor Libraries
In addition to the compilers and debugger, the Intel Integrated Performance Primitives and Math
Kernel Library have been installed on porcupine and lobster6.
These libraries have been optimized for the intel architecture
and as such can provide optimal performance for operations that are
commonly performed in simulations/analysis such as fourier transforms
and linear algebra operations. These libraries can be found in /opt/intel,
and documentation for them can be accessed at:
Intel
Integrated Performance Primitives V2 beta
Intel
Integrated Performance Primitives V3
Intel
Integrated Performance Primitives V4
Intel
Math Kernel Library 5.1
Intel
Math Kernel Library 6.0
Intel
Math Kernel Library 6.1
It is possible to re-distribute the run-time libraries. As such
one may compile on porcupine, linking dynamically, and then copy the binary
and the run-time libraries to another machine for execution.
Please see the documentation for further details.
Note: if you use the shared library versions, remember to edit the LD_LIBRARY_PATH
environment variable to include the path to the shared-libraries.
Also, to use parallel MKL routines, make sure to setenv
OMP_NUM_THREADS 4 before you execute your code.
From www.intel.com:
Intel®Integrated Performance Primitives (IPP) is a
cross-platform software library which provides a range of library
functions for multimedia, audio codecs, video codecs (for example
H.263, MPEG-4), image processing (JPEG), signal processing, speech
compression (i.e. G.723, GSM ARM*) plus computer vision as
well as math support routines for such processing capabilities.
The Intel® Math Kernel Library (Intel MKL) is composed of highly
optimized mathematical functions for math, engineering, scientific and
financial applications requiring high performance on Intel®
platforms. Intel MKL contains LAPACK, the basic linear algebra
subprograms (BLAS), and the extended BLAS (sparse). In addition,
there is a set of fast Fourier transforms in single- and
double-precision, real and complex data types with both Fortran and
C interfaces. MKL also includes a set of vectorized transcendental
functions in the Vector Math Library (VML), offering both high
performance and excellent accuracy compared to the libm functions for
most of the processors."
CFI Cluster: Dolphins; Orca; Octopus
f90 and f77
both point at the same Compaq Fortran compiler (T5.5 beta
test). Previous versions of the compilers (e.g. V5.41)
still exist; ``ls /usr/bin/f90*' ' to see the
various possibilities (these are actually scripts which set the
appropriate environment variables for the desired compiler
version). To use the Compaq Fortran 77 compiler, you
must use the -old_f77 option with the f77 command.
Latest release notes are
in /usr/lib/cmplrs/fort (for Fortran 77)
and /usr/lib/cmplrs/fort90 for Fortran 90). See the
man pages for f90 (or f77 ) to get more
details.
NOTE that f95
should be pointing at the NAGWare Fortran 95 compiler ("which
f95" will show "/cita/local/bin/f95"). "man
f95" for more details.
The C compiler on the
dolphins is cc and the C++ compiler is cxx -
Please read their man pages for detailed descriptions of their usage.
In addition to these
compilers, there are also the KAP preprocessors installed on the CFI
cluster. These can be accessed as kapf90, kapf
and kapc for the Fortran 90, Fortran 77 and C versions
respectively. The KAP preprocessors can be used to generate
source code which is optimized as well as including OpenMP compiler
directives for use on SMP machines. Please look at the man
pages for the above for further details.
Parallel Programming
The following links are provided as starting points for parallel code development. In addition to these please contact the CITA parallel programmer for further information / assistance or to discuss programming issues.
CITA Parallel Programming Overview
Wikipedia Parallel Programming Entry
Information on using Mckenzie and the McKenzie Wiki