Skip to content

Commit

Permalink
Try a new way to initialize the CUDA runtime (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
glwagner authored Aug 20, 2024
1 parent 520d724 commit 290951d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,20 @@ steps:
key: "init"
concurrency: 1
concurrency_group: 'depot/climaocean-ci'
env:
TEST_GROUP: "init"
command:
- "echo '--- Instantiate project'"
- "julia --project -e 'using Pkg; Pkg.instantiate(verbose=true)'"

- "echo '--- Precompile project'"
- "julia --project -e 'using Pkg; Pkg.precompile(strict=true)'"
- "julia --project -e 'using Pkg; Pkg.status()'"

# Force the initialization of the CUDA runtime as it is lazily loaded by default:
- "echo '--- Force initialization of the CUDA runtime'"
- "julia --project -e 'using CUDA; CUDA.precompile_runtime()'"
- "echo '--- Initialize the CUDA runtime'"
- "julia --project -e 'using Pkg; Pkg.test()'"
agents:
slurm_mem: 120G
slurm_gpus: 1
slurm_cpus_per_task: 8

Expand Down
5 changes: 5 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ include("runtests_setup.jl")
test_group = get(ENV, "TEST_GROUP", :all)
test_group = Symbol(test_group)

if test_group == :init || test_group == :all
using CUDA
CUDA.precompile_runtime()
end

# Tests JRA55 utilities, plus some DataWrangling utilities
if test_group == :jra55 || test_group == :all
include("test_jra55.jl")
Expand Down

0 comments on commit 290951d

Please sign in to comment.