-
Notifications
You must be signed in to change notification settings - Fork 83
/
runtests.jl
29 lines (26 loc) · 880 Bytes
/
runtests.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#
# This test suite supports test arguments. For example:
# Pkg.test("DFTK"; test_args = ["fast"])
# only runs the "fast" tests (i.e. not the expensive ones)
# Pkg.test("DFTK"; test_args = ["gpu"])
# runs only the tests tagged as "gpu" and
# Pkg.test("DFTK"; test_args = ["example", "all"])
# runs all tests plus the "example" tests.
#
using MPI
include("runtests_parser.jl")
(; base_tag) = parse_test_args()
runfile = joinpath(@__DIR__, "runtests_runner.jl")
# Trigger some precompilation and build steps
using ASEconvert
using CUDA
using DFTK
using Interpolations
if base_tag == :mpi
nprocs = parse(Int, get(ENV, "DFTK_TEST_NPROCS", "$(clamp(Sys.CPU_THREADS, 2, 4))"))
run(`$(mpiexec()) -n $nprocs $(Base.julia_cmd())
--check-bounds=yes --depwarn=yes --project --color=yes --startup-file=no
$runfile $ARGS`)
else
include(runfile)
end