You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not familiar with Julia and CUDA languages, so I'd like to ask for your help.
How can I set the initial values for a function in ExaModels as shown below?
function my_function(;data_at_t0 = 0, dt=0, backend = CUDABackend())
m = ExaCore(backend = backend)
xend, dx = 1, 0.1
xrange = 0:Int.(xend/dx)
C_next = variable(m, xrange, start = 1)
C = variable(m, xrange, start = 1) # <- previous data
constraint(m, C[x] - data_at_t0[x] for x in xrange)
# constraint(m, f(C_next, C) for x in xrange)
return m
end
data_at_t0 = CuArray([0 for i in 0:11])
m = my_function(;data_at_t0 = data_at_t0, dt = 0.5)
Then, i got this error.
ArgumentError: invalid index: ExaModels.ParSource() of type ExaModels.ParSource
How can I input indexed information into the function with backend = CUDABackend?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm not familiar with Julia and CUDA languages, so I'd like to ask for your help.
How can I set the initial values for a function in ExaModels as shown below?
Then, i got this error.
ArgumentError: invalid index: ExaModels.ParSource() of type ExaModels.ParSource
How can I input indexed information into the function with backend = CUDABackend?
Beta Was this translation helpful? Give feedback.
All reactions