Both sides previous revision Previous revision Next revision | Previous revision |
abstract:farber:app_dev:prog_env [2018-03-21 17:00] – [Compiling serial programs] sraskar | abstract:farber:app_dev:prog_env [2022-08-30 10:15] (current) – [Introduction] anita |
---|
===== 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 Open64 collection. Open64 is based on the GNU compilers, but its performance is much enhanced and may be comparable to the PGI suite. However, the extent of published Open64 documentation is very small compared to that of the other compiler suites. | The PGI compilers exploit special features of AMD processors. If you use open-source compilers, we recommend the GNU collection. |
| |
You can use a [[/software/valet/valet|VALET]] **vpkg_require** command to set the UNIX environment for the compiler suite you want to use. After you issue the corresponding **vpkg_require** command, the compiler path and supporting environment variables will be defined. | You can use a [[/software/valet/valet|VALET]] **vpkg_require** command to set the UNIX environment for the compiler suite you want to use. After you issue the corresponding **vpkg_require** command, the compiler path and supporting environment variables will be defined. |
| ::: | 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://developer.amd.com/tools/open64/onlinehelp/pages/x86_open64_help.htm#Using-x86-Open64|C]] , [[http://developer.amd.com/tools/open64/onlinehelp/pages/x86_open64_help.htm#Using-Fortran-Compiler|Fortran]] | [[http://developer.amd.com/tools/open64/Pages/default.aspx|C, Fortran]] | | |
| ^ Compiler ^ Language ^ Common filename extensions ^ | |
| ::: | openf95 | F95 | .f, .f95 | | |
| ::: | openf90 | F90 | .f, .f90 | | |
| ::: | openCC | C++ | .C, .cc | | |
| ::: | opencc | C | .c | | |
^ Intel ^ VALET command ^ Reference manuals ^ User guides ^ | ^ Intel ^ VALET command ^ Reference manuals ^ User guides ^ |
^ ::: | **vpkg_require intel** | [[http://software.intel.com/sites/products/documentation/hpc/compilerpro/en-us/cpp/lin/main_cls_lin.pdf|C]], [[http://software.intel.com/sites/products/documentation/hpc/compilerpro/en-us/fortran/lin/main_for_lin.pdf|Fortran]] | [[http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&ved=0CDAQFjAB&url=http%3A%2F%2Fsoftware.intel.com%2Ffile%2F6320&ei=lPfUTuutOKTX0QHZsJmKAg&usg=AFQjCNEk20j03jlsNspzRyYvAEXOeT7aTA|C]], [[http://software.intel.com/sites/products/documentation/hpc/compilerpro/en-us/fortran/lin/main_for_lin.pdf|Fortran]] | | ^ ::: | **vpkg_require intel** | [[http://software.intel.com/sites/products/documentation/hpc/compilerpro/en-us/cpp/lin/main_cls_lin.pdf|C]], [[http://software.intel.com/sites/products/documentation/hpc/compilerpro/en-us/fortran/lin/main_for_lin.pdf|Fortran]] | [[http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&ved=0CDAQFjAB&url=http%3A%2F%2Fsoftware.intel.com%2Ffile%2F6320&ei=lPfUTuutOKTX0QHZsJmKAg&usg=AFQjCNEk20j03jlsNspzRyYvAEXOeT7aTA|C]], [[http://software.intel.com/sites/products/documentation/hpc/compilerpro/en-us/fortran/lin/main_for_lin.pdf|Fortran]] | |
==== 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://openmp.org/wp/openmp-compilers/|OpenMP]] compiler flag to the serial compiler flags. | 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/openmp-compilers-tools/|OpenMP]] compiler flag to the serial compiler flags. |
| |
^ Compiler suite ^ OpenMP compiler flag ^ | ^ Compiler suite ^ OpenMP compiler flag ^ |
| |
<code bash> | <code bash> |
vpkg_reguire openmpi/1.4.4-pgi | vpkg_require openmpi/1.4.4-pgi |
mpif90 -fpic fdriver.f90 -o driver | mpif90 -fpic fdriver.f90 -o driver |
</code> | </code> |
== C example: == | == C example: == |
<code bash> | <code bash> |
vpkg_reguire openmpi/1.4.4-pgi | vpkg_require openmpi/1.4.4-pgi |
mpicc -fpic cdriver.c -o driver | mpicc -fpic cdriver.c -o driver |
</code> | </code> |
== Commercial libraries == | == Commercial libraries == |
| |
* [[http://developer.amd.com/libraries/acml/pages/default.aspx|ACML]]: AMD's Core Math Library (See [[http://developer.amd.com/libraries/acml/onlinehelp/Documents/BestLibrary.html#BestLibrary|AMD's guide on library selection]].) | * [[https://developer.amd.com/amd-aocl/|AOCL]]: AMD Optimizing CPU Libraries (See [[https://developer.amd.com/wp-content/resources/57404_User_Guide_AMD_AOCL_v3.2_GA.pdf|AMD's AOCL User Guide]].) AOCL is the successor to ACML. |
* [[http://www.roguewave.com/products/imsl|IMSL]]: RogueWave's mathematical and statistical libraries | * [[http://www.roguewave.com/products/imsl|IMSL]]: RogueWave's mathematical and statistical libraries |
* [[http://software.intel.com/en-us/articles/intel-mkl/?utm_source=google&utm_medium=cpc&utm_term=intel_mkl&utm_content=dpd_us_hpc_mkl& utm_campaign=DIV_US_DPD_%28S%29|MKL]]: Intel's Math Kernel Library | * [[http://software.intel.com/en-us/articles/intel-mkl/?utm_source=google&utm_medium=cpc&utm_term=intel_mkl&utm_content=dpd_us_hpc_mkl& utm_campaign=DIV_US_DPD_%28S%29|MKL]]: Intel's Math Kernel Library |