Skip to content

Commit

Permalink
Set benchmarks from 'test' to 'example' in fpm.
Browse files Browse the repository at this point in the history
- Rename matmul benchmarks.
- Update fpm.toml and fpm.rsp.
  • Loading branch information
gha3mi committed Jan 18, 2024
1 parent 255d04e commit 276e80b
Show file tree
Hide file tree
Showing 6 changed files with 122 additions and 32 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
program benchmark_matmul_matmat
program benchmark_matmul_mm

use kinds
use formatmul
Expand All @@ -11,7 +11,7 @@ program benchmark_matmul_matmat
integer(ik) :: m, n, o, p
integer :: nl

call bench%init(12,'Benchmark matmul','benchmarks/matmul/results/matmul_matmat', 10)
call bench%init(12,'Benchmark matmul','benchmarks/matmul/results/matmul_mm', 10)

do p = 250_ik,1500_ik,250_ik

Expand Down Expand Up @@ -180,4 +180,4 @@ function cmp_gflops(argi,argr) result(gflops)
end function cmp_gflops
!===============================================================================

end program benchmark_matmul_matmat
end program benchmark_matmul_mm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
program benchmark_matmul_matmat_coarray
program benchmark_matmul_mm_coarray

use kinds
use formatmul
Expand All @@ -11,7 +11,7 @@ program benchmark_matmul_matmat_coarray
integer(ik) :: m, n, o, p
integer :: nl

call bench%init(11,'Benchmark matmul','benchmarks/matmul/results/matmul_matmat', 10)
call bench%init(11,'Benchmark matmul','benchmarks/matmul/results/matmul_mm', 10)

do p = 250_ik,1500_ik,250_ik

Expand Down Expand Up @@ -180,4 +180,4 @@ function cmp_gflops(argi,argr) result(gflops)
end function cmp_gflops
!===============================================================================

end program benchmark_matmul_matmat_coarray
end program benchmark_matmul_mm_coarray
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
program benchmark_matmul_matvec
program benchmark_matmul_mv

use kinds
use formatmul
Expand All @@ -12,7 +12,7 @@ program benchmark_matmul_matvec
integer(ik) :: m, n, p
integer :: nl

call bench%init(7,'Benchmark matmul','benchmarks/matmul/results/matmul_matvec', 10)
call bench%init(7,'Benchmark matmul','benchmarks/matmul/results/matmul_mv', 10)

do p = 250_ik,1500_ik,250_ik

Expand Down Expand Up @@ -135,4 +135,4 @@ function cmp_gflops(argi,argr) result(gflops)
end function cmp_gflops
!===============================================================================

end program benchmark_matmul_matvec
end program benchmark_matmul_mv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
program benchmark_matmul_matvec_coarray
program benchmark_matmul_mv_coarray

use kinds
use formatmul
Expand All @@ -12,7 +12,7 @@ program benchmark_matmul_matvec_coarray
integer(ik) :: m, n, p
integer :: nl

call bench%init(6,'Benchmark matmul','benchmarks/matmul/results/matmul_matvec', 10)
call bench%init(6,'Benchmark matmul','benchmarks/matmul/results/matmul_mv', 10)

do p = 250_ik,1500_ik,250_ik

Expand Down Expand Up @@ -126,4 +126,4 @@ function cmp_gflops(argi,argr) result(gflops)
end function cmp_gflops
!===============================================================================

end program benchmark_matmul_matvec_coarray
end program benchmark_matmul_mv_coarray
102 changes: 96 additions & 6 deletions fpm.rsp
Original file line number Diff line number Diff line change
@@ -1,41 +1,131 @@
@benchmark-dot-ifx
options test
options run --example
options --target dot
options --profile release
options --compiler ifx
options --flag "-Ofast -mtune=native -xHost -qmkl -qopenmp -DINT64"

@benchmark-dot-ifort
options test
options run --example
options --target dot
options --profile release
options --compiler ifort
options --flag --flag "-Ofast -mtune=native -xHost -qmkl -qopenmp -ipo -DINT64"

@benchmark-dot-gfortran
options test
options run --example
options --target dot
options --profile release
options --compiler gfortran
options --flag "-Ofast -march=native -llapack -lblas -fopenmp -flto -DINT64"

@benchmark-dot-nvfortran
options test
options run --example
options --target dot
options --profile release
options --compiler nvfortran
options --flag "-Ofast -fast -march=native -mtune=native -stdpar=gpu,multicore -llapack -lblas -openmp -DINT64"

@benchmark-dot-ifx-coarray
options test
options run --example
options --target dot_co
options --profile release
options --compiler ifx
options --flag "-Ofast -mtune=native -xHost -qmkl -qopenmp -DINT64 -coarray -coarray-num-images=4 -DUSE_COARRAY"

@benchmark-dot-ifort-coarray
options test
options run --example
options --target dot_co
options --profile release
options --compiler ifort
options --flag "-Ofast -mtune=native -xHost -qmkl -qopenmp -DINT64 -ipo -coarray -coarray-num-images=4 -DUSE_COARRAY"




@benchmark-matmul-mm-ifx
options run --example
options --target matmul_mm
options --profile release
options --compiler ifx
options --flag "-Ofast -mtune=native -xHost -qmkl -qopenmp -DINT64"

@benchmark-matmul-mm-ifort
options run --example
options --target matmul_mm
options --profile release
options --compiler ifort
options --flag --flag "-Ofast -mtune=native -xHost -qmkl -qopenmp -ipo -DINT64"

@benchmark-matmul-mm-gfortran
options run --example
options --target matmul_mm
options --profile release
options --compiler gfortran
options --flag "-Ofast -march=native -llapack -lblas -fopenmp -flto -DINT64"

@benchmark-matmul-mm-nvfortran
options run --example
options --target matmul_mm
options --profile release
options --compiler nvfortran
options --flag "-Ofast -fast -march=native -mtune=native -stdpar=gpu,multicore -llapack -lblas -openmp -DINT64"

@benchmark-matmul-mm-ifx-coarray
options run --example
options --target matmul_mm_co
options --profile release
options --compiler ifx
options --flag "-Ofast -mtune=native -xHost -qmkl -qopenmp -DINT64 -coarray -coarray-num-images=4 -DUSE_COARRAY"

@benchmark-matmul-mm-ifort-coarray
options run --example
options --target matmul_mm_co
options --profile release
options --compiler ifort
options --flag "-Ofast -mtune=native -xHost -qmkl -qopenmp -DINT64 -ipo -coarray -coarray-num-images=4 -DUSE_COARRAY"




@benchmark-matmul-mv-ifx
options run --example
options --target matmul_mv
options --profile release
options --compiler ifx
options --flag "-Ofast -mtune=native -xHost -qmkl -qopenmp -DINT64"

@benchmark-matmul-mv-ifort
options run --example
options --target matmul_mv
options --profile release
options --compiler ifort
options --flag --flag "-Ofast -mtune=native -xHost -qmkl -qopenmp -ipo -DINT64"

@benchmark-matmul-mv-gfortran
options run --example
options --target matmul_mv
options --profile release
options --compiler gfortran
options --flag "-Ofast -march=native -llapack -lblas -fopenmp -flto -DINT64"

@benchmark-matmul-mv-nvfortran
options run --example
options --target matmul_mv
options --profile release
options --compiler nvfortran
options --flag "-Ofast -fast -march=native -mtune=native -stdpar=gpu,multicore -llapack -lblas -openmp -DINT64"

@benchmark-matmul-mv-ifx-coarray
options run --example
options --target matmul_mv_co
options --profile release
options --compiler ifx
options --flag "-Ofast -mtune=native -xHost -qmkl -qopenmp -DINT64 -coarray -coarray-num-images=4 -DUSE_COARRAY"

@benchmark-matmul-mv-ifort-coarray
options run --example
options --target matmul_mv_co
options --profile release
options --compiler ifort
options --flag "-Ofast -mtune=native -xHost -qmkl -qopenmp -DINT64 -ipo -coarray -coarray-num-images=4 -DUSE_COARRAY"
28 changes: 14 additions & 14 deletions fpm.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,32 +35,32 @@ source-dir = "example"
main = "demo.f90"


[[test]]
[[example]]
name = "dot"
source-dir = "benchmarks/dot"
main = "dot.f90"

[[test]]
[[example]]
name = "dot_co"
source-dir = "benchmarks/dot"
main = "dot_co.f90"

[[test]]
name = "matmul_matmat"
[[example]]
name = "matmul_mm"
source-dir = "benchmarks/matmul"
main = "matmul_matmat.f90"
main = "matmul_mm.f90"

[[test]]
name = "matmul_matmat_co"
[[example]]
name = "matmul_mm_co"
source-dir = "benchmarks/matmul"
main = "matmul_matmat_co.f90"
main = "matmul_mm_co.f90"

[[test]]
name = "matmul_matvec"
[[example]]
name = "matmul_mv"
source-dir = "benchmarks/matmul"
main = "matmul_matvec.f90"
main = "matmul_mv.f90"

[[test]]
name = "matmul_matvec_co"
[[example]]
name = "matmul_mv_co"
source-dir = "benchmarks/matmul"
main = "matmul_matvec_co.f90"
main = "matmul_mv_co.f90"

0 comments on commit 276e80b

Please sign in to comment.