abstract:caviness:app_dev:prog_env

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revisionBoth sides next revision
abstract:caviness:app_dev:prog_env [2019-09-09 22:35] – [Compiling parallel programs that use MPI] anitaabstract:caviness:app_dev:prog_env [2020-03-04 12:20] – [Using libraries] anita
Line 181: Line 181:
  
 Joint use of VALET and these environment variables will also prepare your UNIX environment to support your use of **make** for program development. VALET will accommodate using one or several libraries, and you can extend its functionality for software you develop or install. Joint use of VALET and these environment variables will also prepare your UNIX environment to support your use of **make** for program development. VALET will accommodate using one or several libraries, and you can extend its functionality for software you develop or install.
 +
 +==== Intel compiler suite ====
 +
 +You should use Intel MKL — it's a highly-optimized BLAS/LAPACK library.
 +
 +If you use the Intel compilers, you can add ''-mkl'' to your link command, e.g.
 +
 +<code bash>
 +    ifort -o program -mkl=sequential [...]
 +
 +    ifort -o program -qopenmp -mkl=parallel [...]
 +</code>
 +
 +The former uses the serial library, the latter uses the threaded library that respects the OpenMP runtime environment of the job for multithreaded BLAS/LAPACK execution.
 +
 +If you're not using the Intel compilers, you'll need to generate the appropriate compiler directives using [[https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor|Intel's online tool]].
 +
 +Please use "dynamic linking" since that allows MKL to adjust the underlying kernel functions at runtime according to the hardware on which you're running.  If you use static linking, you're tied to the lowest common hardware model available and you will usually not see as good performance.
 +
 +You'll need to load a version of Intel into the environment before compiling/building and also at runtime using VALET such as
 +
 +<code bash>
 +    vpkg_require intel/2019
 +</code>
 +
 +Among other things, this will set ''MKLROOT'' in the environment to the appropriate path, which the link advisor references.  The MKL version (year) matches that of the compiler version (year).
 +
 +To determine the available versions of Intel installed use
 +
 +<code>
 +$ vpkg_versions intel
 +</code>
 +
 +==== PGI compiler suite ====
  
 === Fortran examples illustrated with the PGI compiler suite === === Fortran examples illustrated with the PGI compiler suite ===
  • abstract/caviness/app_dev/prog_env.txt
  • Last modified: 2022-08-30 10:16
  • by anita