File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- module RunHEPExample
2-
31using HEPExampleProject
42using Random
53
@@ -22,7 +20,7 @@ function print_values(output::IO, evt::Event)::Nothing
2220 return print (output, weight)
2321end
2422
25- Base . @ccallable function main () :: Cint
23+ @main function main (args)
2624 n_events = 20
2725
2826 rng = Xoshiro (137 )
@@ -34,10 +32,8 @@ Base.@ccallable function main()::Cint
3432 println (Core. stdout )
3533 end
3634
37- return zero (Cint)
35+ return 0
3836end
3937
40- end # module RunHEPExample
41-
4238# # In Julia, test with
43- # RunHEPExample. main()
39+ # julia> include("hepexample.jl"); main()
Original file line number Diff line number Diff line change 55
66set -e
77
8+ julia -e ' exit(VERSION >= v"1.12" ? 0 : 1)' || (
9+ echo " ERROR: Need julia >= v1.12 for juliac support." >&2
10+ exit 1
11+ )
12+
813# Binaries generated by juliac may segfault if JULIA_CPU_TARGET is set:
914unset JULIA_CPU_TARGET
1015
11- jlbindir=` julia-1.12 -e ' println(dirname(Sys.BINDIR))' `
16+ jlbindir=` julia -e ' println(dirname(Sys.BINDIR))' `
1217
13- julia-1.12 --project=. -e ' import Pkg; Pkg.instantiate()'
18+ julia --project=. -e ' import Pkg; Pkg.instantiate()'
1419
15- julia-1.12 --project=. " $jlbindir /share/julia/juliac.jl" --experimental --trim=unsafe-warn --output-exe hepexample hepexample.jl
20+ julia --project=. " $jlbindir /share/julia/juliac /juliac.jl" --experimental --trim=unsafe-warn --output-exe hepexample hepexample.jl
You can’t perform that action at this time.
0 commit comments