Skip to content

Commit

Permalink
Update benchmark3 results.
Browse files Browse the repository at this point in the history
  • Loading branch information
gha3mi committed Dec 14, 2023
1 parent 132720a commit 428ee68
Show file tree
Hide file tree
Showing 22 changed files with 13 additions and 17 deletions.
28 changes: 12 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<img alt="ForMatmul" src="https://github.com/gha3mi/formatmul/raw/main/media/logo.png" width="750">

**ForMatmul**: A Fortran library that overloads the `matmul` function to enable efficient matrix multiplication with coarray.
**ForMatmul**: A Fortran library that overloads the `matmul` function to enable efficient matrix multiplication with/without coarray.

## Usage

Expand Down Expand Up @@ -118,13 +118,13 @@ To set the stack size to unlimited, use the following command: `ulimit -s unlimi
**Intel Fortran Compiler (ifort)**

```shell
fpm run --example benchmark3 --compiler ifort --flag "-Ofast -xHost -qopenmp -qmkl -coarray -coarray-num-images=4 -DUSE_COARRAY"
fpm run --example benchmark3 --compiler ifort --flag "-Ofast -mtune=native -xHost -qmkl -qopenmp -ipo -coarray -coarray-num-images=4 -DUSE_COARRAY"
```

**Intel Fortran Compiler (ifx)**

```shell
fpm run --example benchmark3 --compiler ifx --flag "-Ofast -xHost -qopenmp -qmkl -coarray -coarray-num-images=4 -DUSE_COARRAY"
fpm run --example --all --compiler ifx --flag "-Ofast -mtune=native -xHost -qmkl -qopenmp -coarray -coarray-num-images=4 -DUSE_COARRAY"
```

You can then use the provided Python script to generate visual plots for the benchmark3 data:
Expand All @@ -133,31 +133,27 @@ You can then use the provided Python script to generate visual plots for the ben
python benchmark/benchmark3_co.py
```

Results obtained on an `Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz` using `ifort (IFORT) 2021.10.0 20230609` are as follows:
Results obtained on an `Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz` using `ifort (IFORT) 2021.11.0 20231010` are as follows:

- with `-coarray-num-images=4`, `MKL_NUM_THREADS=1` and `OMP_NUM_THREADS=1`:

<img alt="ForMatmul" src="https://github.com/gha3mi/formatmul/raw/main/benchmark/singlethread/benchmark3a_nim4.png" width="750">
<img alt="ForMatmul" src="https://github.com/gha3mi/formatmul/raw/main/benchmark/singlethread/benchmark3t_nim4.png" width="350">
<img alt="ForMatmul" src="https://github.com/gha3mi/formatmul/raw/main/benchmark/singlethread/benchmark3p_nim4.png" width="350">

- with `-coarray-num-images=4` and Multithread:

<img alt="ForMatmul" src="https://github.com/gha3mi/formatmul/raw/main/benchmark/multithread/benchmark3a_nim4.png" width="750">
<img alt="ForMatmul" src="https://github.com/gha3mi/formatmul/raw/main/benchmark/multithread/benchmark3t_nim4.png" width="350">
<img alt="ForMatmul" src="https://github.com/gha3mi/formatmul/raw/main/benchmark/multithread/benchmark3p_nim4.png" width="350">

- with `-coarray-num-images=5`, `MKL_NUM_THREADS=1` and `OMP_NUM_THREADS=1`:

<img alt="ForMatmul" src="https://github.com/gha3mi/formatmul/raw/main/benchmark/singlethread/benchmark3a_nim5.png" width="750">
<img alt="ForMatmul" src="https://github.com/gha3mi/formatmul/raw/main/benchmark/singlethread/benchmark3t_nim5.png" width="350">
<img alt="ForMatmul" src="https://github.com/gha3mi/formatmul/raw/main/benchmark/singlethread/benchmark3p_nim5.png" width="350">

- with `-coarray-num-images=5` and Multithread:

<img alt="ForMatmul" src="https://github.com/gha3mi/formatmul/raw/main/benchmark/multithread/benchmark3a_nim5.png" width="750">

- with `-coarray-num-images=6`, `MKL_NUM_THREADS=1` and `OMP_NUM_THREADS=1`:

<img alt="ForMatmul" src="https://github.com/gha3mi/formatmul/raw/main/benchmark/singlethread/benchmark3a_nim6.png" width="750">

- with `-coarray-num-images=6` and Multithread:

<img alt="ForMatmul" src="https://github.com/gha3mi/formatmul/raw/main/benchmark/multithread/benchmark3a_nim6.png" width="750">
<img alt="ForMatmul" src="https://github.com/gha3mi/formatmul/raw/main/benchmark/multithread/benchmark3t_nim5.png" width="350">
<img alt="ForMatmul" src="https://github.com/gha3mi/formatmul/raw/main/benchmark/multithread/benchmark3p_nim5.png" width="350">

## API documentation

Expand Down
Binary file removed benchmark/multithread/benchmark3a_nim4.png
Binary file not shown.
Binary file removed benchmark/multithread/benchmark3a_nim5.png
Binary file not shown.
Binary file removed benchmark/multithread/benchmark3a_nim6.png
Binary file not shown.
Binary file removed benchmark/multithread/benchmark3b_nim4.png
Binary file not shown.
Binary file removed benchmark/multithread/benchmark3b_nim5.png
Binary file not shown.
Binary file removed benchmark/multithread/benchmark3b_nim6.png
Binary file not shown.
Binary file added benchmark/multithread/benchmark3p_nim4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added benchmark/multithread/benchmark3p_nim5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added benchmark/multithread/benchmark3t_nim4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added benchmark/multithread/benchmark3t_nim5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed benchmark/singlethread/benchmark3a_nim4.png
Binary file not shown.
Binary file removed benchmark/singlethread/benchmark3a_nim5.png
Binary file not shown.
Binary file removed benchmark/singlethread/benchmark3a_nim6.png
Binary file not shown.
Binary file removed benchmark/singlethread/benchmark3b_nim4.png
Binary file not shown.
Binary file removed benchmark/singlethread/benchmark3b_nim5.png
Binary file not shown.
Binary file removed benchmark/singlethread/benchmark3b_nim6.png
Binary file not shown.
Binary file added benchmark/singlethread/benchmark3p_nim4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added benchmark/singlethread/benchmark3p_nim5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added benchmark/singlethread/benchmark3t_nim4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added benchmark/singlethread/benchmark3t_nim5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion example/benchmark3.f90
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ program benchmark3
#endif
close(unit_num)

do p = 250,4000,250
do p = 250,1500,250

! C(m,o) = A(m,n).B(n,o)
m = p
Expand Down

0 comments on commit 428ee68

Please sign in to comment.