Closed kerim371 closed 8 months ago
And the script is:
# Load data and create data vector
container = segy_scan(prestk_dir, prestk_file, ["SourceX", "SourceY", "GroupX", "GroupY", "RecGroupElevation", "SourceSurfaceElevation", "dt"])
d_obs = judiVector(container; segy_depth_key = segy_depth_key_rec)
# Load starting model (mlog - slowness built with Vs from logs; mvsp - built from VSP)
fid = h5open(model_file, "r")
n, d, o = read(fid, "n", "d", "o")
m0 = read(fid, "m")
close(fid)
n = Tuple(Int64(i) for i in n)
d = Tuple(Float32(i) for i in d)
o = Tuple(Float32(i) for i in o)
rho0 = rho_from_slowness(m0)
model0 = Model(n, d, o, m0, rho=rho0, nb=100)
x = (o[1]:d[1]:o[1]+(n[1]-1)*d[1])./1000f0
z = (o[2]:d[2]:o[2]+(n[2]-1)*d[2])./1000f0
global seabed_ind = Int.(round.(seabed./d[2]))
model0.m[:,1:seabed_ind] .= (1/vwater)^2
# Set up wavelet and source vector
src_geometry = Geometry(container; key = "source", segy_depth_key = segy_depth_key_src)
timeD = src_geometry.t[1]
dtD = src_geometry.dt[1]
# setup wavelet
f0 = 0.01f0 # kHz
wavelet = ricker_wavelet(timeD, dtD, f0)
q = judiVector(src_geometry, wavelet)
############################################## RTM #################################################
# JUDI options
jopt = JUDI.Options(
space_order=16,
limit_m = true,
buffer_size = buffer_size,
optimal_checkpointing=false,
free_surface=false,
IC = "isic")
# Right-hand preconditioners (model topmute)
idx_wb = find_water_bottom(reshape(model0.m, model0.n))
Tm = judiTopmute(model0.n, idx_wb, 10) # Mute water column
S = judiDepthScaling(model0)
Mr = S*Tm
# Left-hand side preconditioners
Ml = judiDataMute(q.geometry, d_obs.geometry, vp=1300f0, t0=0.1f0, mode=:reflection) # keep reflections
# Setup operators
Pr = judiProjection(d_obs.geometry)
F = judiModeling(model0; options=jopt)
Ps = judiProjection(q.geometry)
J = judiJacobian(Pr*F*adjoint(Ps), q)
shot_from = 1
shot_to = length(d_obs)
shot_step = 1 # only compute each nth shot (that is enough)
indsrc = rand(shot_from:shot_from+shot_step-1):shot_step:shot_to
# Topmute
d_obs = Ml[indsrc]*d_obs[indsrc]
Oh I'm sorry I just figured out that the problem was insufficient RAM on the cloud machine. Once I increased the memory the problem was solved.
Hi,
I have a strange behaviour. When performing RTM with with OOC geometry on my local PC Ubuntu 20.04 there is no any problems. But when running it on the cloud CentOS 7 I get error:
But I can override this problem by determining the number of sources with
nsrc = get_nsrc(geometry)
. That leads to the next error:As I said when I run the same code on my local Ubuntu 20.04 with the same JUDI and Devito versions I don't have any troubles and moreover it seems that
process_input_data
isn't invoked at all.JUDI 3.3.8 Devito 4.8.2