File tree Expand file tree Collapse file tree 5 files changed +5
-21
lines changed Expand file tree Collapse file tree 5 files changed +5
-21
lines changed Original file line number Diff line number Diff line change 1
1
# function to run a Julia script outside of the current environment
2
2
function script (code; wrapper= ` ` , args= ` ` )
3
- if Base. JLOptions (). project != C_NULL
4
- args = ` $args --project=$(unsafe_string (Base. JLOptions (). project)) `
5
- end
6
3
mktemp () do path, io
7
4
write (io, code)
8
5
flush (io)
9
- cmd = ` $wrapper $(Base. julia_cmd ()) $args $path `
6
+ cmd = ` $wrapper $(Base. julia_cmd ()) --project= $(Base . active_project ()) $args $path `
10
7
# redirect stderr to stdout to have it picked up by Weave.jl
11
8
run (pipeline (ignorestatus (cmd), stderr = stdout ))
12
9
end
Original file line number Diff line number Diff line change @@ -6,10 +6,7 @@ using BenchmarkTools
6
6
function main ()
7
7
results = BenchmarkGroup ()
8
8
9
- base_cmd = Base. julia_cmd ()
10
- if Base. JLOptions (). project != C_NULL
11
- base_cmd = ` $base_cmd --project=$(unsafe_string (Base. JLOptions (). project)) `
12
- end
9
+ base_cmd = ` $(Base. julia_cmd ()) --project=$(Base. active_project ()) `
13
10
14
11
# make sure all artifacts are downloaded
15
12
CUDA. version ()
Original file line number Diff line number Diff line change @@ -108,12 +108,7 @@ Run a new Julia session under the CUDA compute-sanitizer tool `tool`. This is us
108
108
detect various GPU-related issues, like memory errors or race conditions.
109
109
"""
110
110
function run_compute_sanitizer (julia_args= ` ` ; tool:: String = " memcheck" , sanitizer_args= ` ` )
111
- cmd = Base. julia_cmd ()
112
-
113
- # propagate --project
114
- if Base. JLOptions (). project != C_NULL
115
- push! (cmd. exec, " --project=$(unsafe_string (Base. JLOptions (). project)) " )
116
- end
111
+ cmd = ` $(Base. julia_cmd ()) --project=$(Base. active_project ()) `
117
112
118
113
println (" Re-starting your active Julia session..." )
119
114
run (` $(CUDA. compute_sanitizer_cmd (tool)) $sanitizer_args $cmd $julia_args ` )
Original file line number Diff line number Diff line change 226
226
push! (test_exeflags. exec, " --check-bounds=yes" )
227
227
push! (test_exeflags. exec, " --startup-file=no" )
228
228
push! (test_exeflags. exec, " --depwarn=yes" )
229
- if Base. JLOptions (). project != C_NULL
230
- push! (test_exeflags. exec, " --project=$(unsafe_string (Base. JLOptions (). project)) " )
231
- end
229
+ push! (test_exeflags. exec, " --project=$(Base. active_project ()) " )
232
230
const test_exename = popfirst! (test_exeflags. exec)
233
231
function addworker (X; kwargs... )
234
232
exename = if do_sanitize
Original file line number Diff line number Diff line change 232
232
function julia_exec (args:: Cmd , env... )
233
233
# FIXME : this doesn't work when the compute mode is set to exclusive
234
234
cmd = Base. julia_cmd ()
235
- if Base. JLOptions (). project != C_NULL
236
- cmd = ` $cmd --project=$(unsafe_string (Base. JLOptions (). project)) `
237
- end
238
- cmd = ` $cmd --color=no $args `
235
+ cmd = ` $cmd --project=$(Base. active_project ()) --color=no $args `
239
236
240
237
out = Pipe ()
241
238
err = Pipe ()
You can’t perform that action at this time.
0 commit comments