Compile
Compile
[] ■ The compiling commands are the same regardless the compiler used.
■ When the environment changes (Cray, Intel, GNU),the commands actually called by the links are changed.
(The actually called) Command | Intel | GNU | Cray |
---|---|---|---|
ftn | ifort | gfortran | crayftn |
cc | icc | gcc | craycc |
CC | icpc | g++ | crayCC |
■Only the above compilers are available on the system..
■When compiling MPI programs, please use: ftn, cc, CC commands.(mpicc, mpif90 are not available)
■Ruby and Perl scripts can't be used.
Compiling example (Cray compiler):
% cc -O3 -homp -hautothread -o test-hybrid.exe test-hybrid.c
Compiler options example
[]
Cray Compiler:
Option | Meaning |
---|---|
-O[1or2or3] | Optimization level |
-hautothread | Auto parallelization |
-h[no]omp | OpenMP enabled/disabled |
-hvector[1or2or3] | SIMD vectorization level |
-hthread[1or2or3] | Thread optimization level |
-hscalar[1or2or3] | Scalar optimization level |
-hfp[1or2or3] | FP optimization level |
Parallelization
OpenMP, MPI and hybrid programming are all supported.
OpenMP
Include the following compile time options.
OpenMP library will be automatically linked.
- Cray environment: -h[no]omp
- Intel environment: -openmp
- GNU environment: -fopenmp
Runtime settings.
- Environment variable OMP_NUM_THREADS
- aprun command option -d thread_num
Auto Parallelization
Both Cray compiler and Intel compiler support automatic parallelization.
Please use the following compiler options.
- Cray environment: -Oautothread
- Intel environment: -parallel
Parallelization
[] OpenMP, MPI and the hybrid code are all supported.
OpenMP
Compile time options.
OpenMP library will be automatically linked during compiling.
- Cray environment: -h[no]omp
- Intel environment: -openmp
- GNU environment: -fopenmp
Runtime options.
- Environment variable OMP_NUM_THREADS
- aprun command option -d thread_num
Auto parallelization
Bot Cray compiler and Intel compiler support auto parallelization.
Compile time options.
- Cray environment: -Oautothread
- Intel environment: -parallel