Skip to content
Snippets Groups Projects
Commit d79e40b3 authored by Jan Siwiec's avatar Jan Siwiec
Browse files

Update power10.md

parent 51ad1f58
No related branches found
No related tags found
No related merge requests found
Pipeline #36162 passed with warnings
......@@ -25,6 +25,7 @@ The platform offers both `GNU` based and proprietary IBM toolchains for building
## Building Applications
Our sample application depends on `BLAS`, therefore we start by loading following modules (regardless of which toolchain we want to use):
```
ml GCC OpenBLAS
```
......@@ -32,10 +33,13 @@ ml GCC OpenBLAS
### GCC Toolchain
In the case of GCC toolchain we can go ahead and compile the application as usual using either `g++`
```
g++ -lopenblas hello.cpp -o hello
```
or `gfortran`
```
gfortran -lopenblas hello.f90 -o hello
```
......@@ -44,6 +48,7 @@ as usual.
### IBM Toolchain
The IBM toolchain requires additional environment setup as it is installed in `/opt/ibm` and is not exposed as a module
```
IBM_ROOT=/opt/ibm
OPENXLC_ROOT=$IBM_ROOT/openxlC/17.1.1
......@@ -57,10 +62,12 @@ export LD_LIBRARY_PATH=$OPENXLF_ROOT/lib:$LD_LIBRARY_PATH
```
from there we can use either `ibm-clang++`
```
ibm-clang++ -lopenblas hello.cpp -o hello
```
or `xlf`
```
xlf -lopenblas hello.f90 -o hello
```
......@@ -81,10 +88,12 @@ export LD_LIBRARY_PATH=$ESSL_ROOT/lib64:$LD_LIBRARY_PATH
The simplest way to utilize `ESSL` in application, which already uses `BLAS` or `CBLAS` routines is to link with the provided `libessl.so`. This can be done by replacing `-lopenblas` with `-lessl` or `-lessl -lopenblas` (in case `ESSL` does not provide all required `BLAS` routines).
In practice this can look like
```
g++ -L${ESSL_ROOT}/lib64 -lessl -lopenblas hello.cpp -o hello
```
or
```
gfortran -L${ESSL_ROOT}/lib64 -lessl -lopenblas hello.f90 -o hello
```
......@@ -95,6 +104,7 @@ and similarly for IBM compilers (`ibm-clang++` and `xlf`).
The `hello world` example application (written in `C++` and `Fortran`) uses simple stationary probability vector estimation to illustrate use of GEMM (BLAS 3 routine).
Stationary probability vector estimation in `C++`:
```c++
#include <iostream>
#include <vector>
......@@ -153,6 +163,7 @@ int main(int argc, char *argv[])
```
Stationary probability vector estimation in `Fortran`:
```fortran
program main
implicit none
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment