Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
abstract:farber:app_dev:prog_env [2018-03-21 16:59] – [The compiler suites] sraskar | abstract:farber:app_dev:prog_env [2022-08-30 10:15] (current) – [Introduction] anita | ||
---|---|---|---|
Line 26: | Line 26: | ||
===== The compiler suites ===== | ===== The compiler suites ===== | ||
- | There are four 64-bit compiler suites that IT generally installs and supports: PGI CDK (Portland Group Inc.'s Cluster Development Kit), Open64, Intel Composer XE 2011, and GNU. In addition, IT has installed OpenJDK (Open Java Development Kit), which must only be used on the compute nodes. (Type **vpkg_info openjdk** for more information on OpenJDK.) | + | There are three 64-bit compiler suites that IT generally installs and supports: PGI CDK (Portland Group Inc.'s Cluster Development Kit), Intel Composer XE 2011, and GNU. In addition, IT has installed OpenJDK (Open Java Development Kit), which must only be used on the compute nodes. (Type **vpkg_info openjdk** for more information on OpenJDK.) |
- | The PGI compilers exploit special features of AMD processors. If you use open-source compilers, we recommend | + | The PGI compilers exploit special features of AMD processors. If you use open-source compilers, we recommend the GNU collection. |
You can use a [[/ | You can use a [[/ | ||
Line 47: | Line 47: | ||
| ::: | pgCC | C++ | .C, .cc | | | ::: | pgCC | C++ | .C, .cc | | ||
| ::: | pgcc | C | .c | | | ::: | pgcc | C | .c | | ||
- | ^ Open64 ^ VALET command ^ Reference manuals ^ User guides ^ | ||
- | ^ ::: | **vpkg_require open64** | [[http:// | ||
- | | ^ Compiler | ||
- | | ::: | openf95 | F95 | .f, .f95 | | ||
- | | ::: | openf90 | F90 | .f, .f90 | | ||
- | | ::: | openCC | ||
- | | ::: | opencc | ||
^ Intel ^ VALET command ^ Reference manuals ^ User guides ^ | ^ Intel ^ VALET command ^ Reference manuals ^ User guides ^ | ||
^ ::: | **vpkg_require intel** | [[http:// | ^ ::: | **vpkg_require intel** | [[http:// | ||
Line 70: | Line 63: | ||
==== Compiling serial programs ==== | ==== Compiling serial programs ==== | ||
- | This section uses the PGI compiler suite to illustrate simple Fortran and C compiler commands that create an executable. For each compiler suite, you must first set the UNIX environment so the compilers and libraries are available to you. [[abstract:farber: | + | This section uses the PGI compiler suite to illustrate simple Fortran and C compiler commands that create an executable. For each compiler suite, you must first set the UNIX environment so the compilers and libraries are available to you. [[abstract/farber/ |
The examples below show the compile and link steps in a single command. These illustrations use source code files named fdriver.f90 (Fortran 90) or cdriver.c (C). They all use the **-o** option to produce an executable named ' | The examples below show the compile and link steps in a single command. These illustrations use source code files named fdriver.f90 (Fortran 90) or cdriver.c (C). They all use the **-o** option to produce an executable named ' | ||
Line 96: | Line 89: | ||
==== Compiling parallel programs that use OpenMP ==== | ==== Compiling parallel programs that use OpenMP ==== | ||
- | If your program only uses OpenMP directives, has __no__ message passing, and your target is a single SMP node, you should add the [[http:// | + | If your program only uses OpenMP directives, has __no__ message passing, and your target is a single SMP node, you should add the [[https://www.openmp.org/resources/ |
^ Compiler suite ^ OpenMP compiler flag ^ | ^ Compiler suite ^ OpenMP compiler flag ^ | ||
Line 135: | Line 128: | ||
<code bash> | <code bash> | ||
- | vpkg_reguire | + | vpkg_require |
mpif90 -fpic fdriver.f90 -o driver | mpif90 -fpic fdriver.f90 -o driver | ||
</ | </ | ||
Line 141: | Line 134: | ||
== C example: == | == C example: == | ||
<code bash> | <code bash> | ||
- | vpkg_reguire | + | vpkg_require |
mpicc -fpic cdriver.c -o driver | mpicc -fpic cdriver.c -o driver | ||
</ | </ | ||
Line 174: | Line 167: | ||
== Commercial libraries == | == Commercial libraries == | ||
- | * [[http:// | + | * [[https:// |
* [[http:// | * [[http:// | ||
* [[http:// | * [[http:// |