Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
abstract:caviness:app_dev:prog_env [2018-07-09 16:43] – external edit 127.0.0.1 | abstract:caviness:app_dev:prog_env [2022-08-30 10:16] (current) – [Introduction] anita | ||
---|---|---|---|
Line 20: | Line 20: | ||
===== Compiling code ===== | ===== Compiling code ===== | ||
<note important> | <note important> | ||
- | Fortran, C and C++ programs can only be compiled on the login node. Java and Matlab | + | Fortran, C, C++, Java and Matlab programs |
</ | </ | ||
Line 128: | Line 128: | ||
<code bash> | <code bash> | ||
- | vpkg_reguire | + | vpkg_require |
mpif90 -fpic fdriver.f90 -o driver | mpif90 -fpic fdriver.f90 -o driver | ||
</ | </ | ||
Line 134: | 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 167: | Line 167: | ||
== Commercial libraries == | == Commercial libraries == | ||
- | * [[http:// | + | * [[https:// |
* [[http:// | * [[http:// | ||
* [[http:// | * [[http:// | ||
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 '' | ||
+ | |||
+ | <code bash> | ||
+ | ifort -o program -mkl=sequential [...] | ||
+ | |||
+ | ifort -o program -qopenmp -mkl=parallel [...] | ||
+ | </ | ||
+ | |||
+ | 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:// | ||
+ | |||
+ | Please use " | ||
+ | |||
+ | You'll need to load a version of Intel into the environment before compiling/ | ||
+ | |||
+ | <code bash> | ||
+ | vpkg_require intel/2019 | ||
+ | </ | ||
+ | |||
+ | Among other things, this will set '' | ||
+ | |||
+ | To determine the available versions of Intel installed use | ||
+ | |||
+ | < | ||
+ | $ vpkg_versions intel | ||
+ | </ | ||
+ | |||
+ | ==== PGI compiler suite ==== | ||
=== Fortran examples illustrated with the PGI compiler suite === | === Fortran examples illustrated with the PGI compiler suite === |