Skip to content

Commit 1da30e9

Browse files
committed
new testproblems
1 parent f96622e commit 1da30e9

File tree

5 files changed

+13
-215
lines changed

5 files changed

+13
-215
lines changed

benchmark/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[deps]
2+
AtomsIOPython = "9e4c859b-2281-48ef-8059-f50fe53c37b0"
23
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
3-
Conda = "8f4d0f93-b110-5947-807f-2305c1781a2d"
44
DFTK = "acf6eb54-70d9-11e9-0013-234b7a5f5337"
55
LibGit2 = "76f85450-5226-5b5a-8eaa-529ad045b433"
66
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"

benchmark/ase.jl

Lines changed: 0 additions & 58 deletions
This file was deleted.

benchmark/benchmarks.jl

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
11
# https://opensourc.es/blog/constraint-solver-bugs-and-benchmarks/
22
# https://github.com/JuliaSymbolics/Symbolics.jl/blob/master/benchmark/benchmarks.jl
33
using BenchmarkTools
4-
import LibGit2
5-
6-
#import Pkg; Pkg.add("Conda")
7-
#using Conda
8-
#pkgs = ["ase", "pymatgen"]
9-
#!Sys.iswindows() && (pkgs = append!(["libblas=*=*netlib", "nomkl"], pkgs))
10-
#Conda.add(pkgs; channel="conda-forge")
11-
12-
include("load_from_file.jl")
13-
repo = mktempdir()
14-
LibGit2.clone("https://github.com/mfherbst/DFTK-testproblems", repo)
4+
using TestItemRunner
155

166
const SUITE = BenchmarkGroup()
177

188
SUITE["AlSiO2H"] = BenchmarkGroup()
19-
SUITE["AlSiO2H"] = @benchmarkable include(joinpath(repo, "AlSiO2H.jl"))
9+
SUITE["AlSiO2H"] = @benchmarkable @run_package_tests filter=(i->occursin("AlSiO2H.jl", i.filename) &&
10+
:debug i.tags)

benchmark/load_from_file.jl

Lines changed: 0 additions & 140 deletions
This file was deleted.

benchmark/runbenchmarks.jl

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,18 @@ end
88

99
using PkgBenchmark
1010

11-
tempdir = mktempdir()
12-
script = tempname(tempdir) * ".jl"
11+
import LibGit2
12+
repo = mktempdir(mktempdir()) # TestItemRunner needs access to parent directory as well.
13+
LibGit2.clone("https://github.com/epolack/DFTK-testproblems", repo)
14+
15+
#script = tempname() * ".jl"
16+
script = tempname(repo) * ".jl"
1317
benchpath = joinpath(ROOTPATH, "benchmark", "benchmarks.jl")
1418
cp(benchpath, script)
15-
cp(joinpath(ROOTPATH, "benchmark", "load_from_file.jl"), joinpath(tempdir, "load_from_file.jl"))
1619

17-
juliacmd=`$(joinpath(Sys.BINDIR, Base.julia_exename())) -O3 -e"import Pkg; Pkg.activate(\"$ROOTPATH\"); Pkg.instantiate();"`
20+
# Reconfigures the packages in case of version changes.
21+
juliacmd=`$(joinpath(Sys.BINDIR, Base.julia_exename())) \
22+
-O3 -e"import Pkg; Pkg.activate(\"$ROOTPATH\"); Pkg.instantiate();"`
1823
current = BenchmarkConfig(; id="HEAD", juliacmd)
1924
baseline = BenchmarkConfig(; id="master", juliacmd)
2025
judged = judge(ROOTPATH, current, baseline; retune=true, script)

0 commit comments

Comments
 (0)