GPU selection

parent 286d9a77
......@@ -36,6 +36,10 @@ function parse_commandline()
help = "Config written with the export_cnfg_cern() convention"
action = :store_true
"-G"
help = "GPU for the job. Default 0"
arg_type = Int
default = 0
end
return parse_args(s)
......@@ -50,6 +54,7 @@ Stores in global variables the needed structures, i.e. lp, gp, dpar, dws, ymws
"""
function load_structs()
CUDA.device!(parsed_args["G"])
global lp = SpaceParm{4}(tuple(params["Space"]["size"]...), tuple(params["Space"]["blocks"]...),0, (0,0,0,0,0,0))
global gp = GaugeParm{Float64}(SU3{Float64},params["Fermion"]["beta"],1.0,(0.0,0.0),(0.0,0.0),lp.iL);
global dpar = DiracParam{Float64}(SU3fund,(1/(2*params["Fermion"]["kappa"])) - 4,params["Fermion"]["csw"],ntuple(i -> exp(((i!=4)*im*params["Fermion"]["theta"]/lp.iL[i]) + ((i==4)*im*params["Fermion"]["theta_t"]/lp.iL[i])),4),1.0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment