Skip to content
Snippets Groups Projects
Commit ee7a1ca7 authored by Carsten Bauer's avatar Carsten Bauer
Browse files

multiple srcs for original STREAM download

parent 896b8a24
No related branches found
No related tags found
No related merge requests found
const ORIGINAL_SOURCES = ["https://www.cs.virginia.edu/stream/FTP/Code/", "https://raw.githubusercontent.com/jeffhammond/STREAM/master/"]
"""
Download the C STREAM benchmark source code from https://www.cs.virginia.edu/stream into a new folder "stream".
"""
function download_original_STREAM()
function download_original_STREAM(; debug=false)
println("- Creating folder \"stream\"")
mkdir("stream")
!isdir("stream") && mkdir("stream")
println("- Downloading C STREAM benchmark")
Downloads.download(
"https://www.cs.virginia.edu/stream/FTP/Code/stream.c", "stream/stream.c"
)
Downloads.download(
"https://www.cs.virginia.edu/stream/FTP/Code/mysecond.c", "stream/mysecond.c"
)
println("- Done.")
done = false
for src in ORIGINAL_SOURCES
if !done
try
Downloads.download(
joinpath(src, "stream.c"), "stream/stream.c"
)
Downloads.download(
joinpath(src, "mysecond.c"), "stream/mysecond.c"
)
done = true
catch err
if debug
@warn err
end
end
else
break
end
end
if done
println("- Done.")
else
println("- Couldn't download original STREAM :(")
end
return nothing
end
......
......@@ -116,7 +116,7 @@ end
@testset "Original C STREAM Benchmark" begin
mktempdir() do tmpdir
cd(tmpdir) do
STREAMBenchmark.download_original_STREAM()
STREAMBenchmark.download_original_STREAM(; debug=true)
@test isdir("stream")
isdir("stream") && cd("stream") do
@test isfile("stream.c")
......@@ -141,4 +141,4 @@ end
end
end
end
end
end
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment