weilib waveequation imaging Paul Sava paulsep stanford edu
weilib: wave-equation imaging Paul Sava paul@sep. stanford. edu
My goal • Quick introduction to the library • Not much about the imaging science • Ask the right questions paul@sep. stanford. edu
Library goals • Flexible research – Code recycling – Efficiency vs. flexibility • Cluster access – Parallelization with MPI, OMP • Large problems – 3 -D data paul@sep. stanford. edu
Characteristics • Programming – Fortran 90 – OO • Problem types – Shot-receiver migration – Shot-profile migration • Versions paul@sep. stanford. edu
Linear operators m L d call operator_init(…) stat=operator(adj, add, m, d) paul@sep. stanford. edu
WE imaging • Large datasets (m, d) – Data partition • Complicated operators (L) – Operator partition paul@sep. stanford. edu
The problem IMAGE (m) w DATA (d) z paul@sep. stanford. edu
Cluster distribution w MPI z paul@sep. stanford. edu
Outline • Overview • Objects – Partitioning – I/O • Operators – WE migration – WE MVA • Examples paul@sep. stanford. edu
WEI initialization … call call … sep_init() weipar_report() weitag_init() weipro_bcast() paul@sep. stanford. edu
WEI objects & procedures • Objects – – Data Image Slowness Wavefield • Procedures – – file tag dimensions I/O MPI communication paul@sep. stanford. edu
WEI data object type wedata character(len=128) integer type(axis) complex, pointer end type wedata : : : : : tag from bites, esize amx, amy, ahx, ahy, aw bin(: , : , : ) paul@sep. stanford. edu
WEI data object DD%tag=wtag%D call wei. D_init(DD) call wei. D_report(DD) call wei. D_allocate(DD) call wei. D_read(DD) call wei. D_write(DD) call wei. D_mpisprd(DD) call wei. D_mpigthr(DD) … paul@sep. stanford. edu
WEI migration workflow data image slowness data Node 1 image slowness MPI Node 2 MPI data slowness image slowness data slowness image Node 3 image Node 4 paul@sep. stanford. edu
WEI workflow example … call … call … wei. S_mpicopy(SS) wei. R_mpizero(RR) wei. D_mpisprd(DD) weimigof(…) wei. R_mpisumm(RR) paul@sep. stanford. edu
I/O blocking w z paul@sep. stanford. edu
I/O blocking example … do iwb=1, nwb call wei. D_read(b. W, iwb) do izb=1, nzb call wei. R_read(RR, izb) call wei. S_read(SS, izb) … call wei. R_write(RR, izb) end do … paul@sep. stanford. edu
Shared memory parallelization w z OMP paul@sep. stanford. edu
Shared memory parallelization !$OMP PARALLEL !$OMP DO & !$OMP$ PRIVATE(iws, izs, ith) do iws=1, nws ith=omp_get_thread_num()+1 do izs=1, nzs … end do !$OMP END DO !$OMP END PARALLEL paul@sep. stanford. edu
Outline • Overview • Objects – Partitioning – I/O • Operators – WE migration – WE MVA • Examples paul@sep. stanford. edu
WE migration imaging frequency extrapolation IMAGE (m) DATA (d) depth paul@sep. stanford. edu
Extrapolation frequency Wz Wz+Dz depth paul@sep. stanford. edu
Imaging frequency Wz+Dz Rz+Dz depth paul@sep. stanford. edu
WE migration paul@sep. stanford. edu
WCop: wavefield continuation operator • Single reference slowness • Multi reference slowness – Wavefield interpolation paul@sep. stanford. edu
SLop: slowness selection operator • Min/Mean/Median • Lloyd paul@sep. stanford. edu
FKop: phase-shift operator • Common-azimuth • Narrow-azimuth • Full prestack paul@sep. stanford. edu
FXop: finite-difference operator • Phase-shift • Split-step Fourier • Generalized Screen Propagator paul@sep. stanford. edu
IGop: imaging operator • Offset • Ray parameter paul@sep. stanford. edu
Outline • Overview • Objects – Partitioning – I/O • Operators – WE migration – WE MVA • Examples paul@sep. stanford. edu
WE MVA paul@sep. stanford. edu
SCop: scattering operator paul@sep. stanford. edu
Outline • Overview • Objects – Partitioning – I/O • Operators – WE migration – WE MVA • Examples paul@sep. stanford. edu
WEI datuming (survey sinking) call weidtm_init( SLin=weiop_slo 1_init, WCin=weiop_mwc 1_init, FKin=weiop_wem 3_init, FXin=weiop_ssf 3_init) Slowness operator stat = weidtm(adj, add, D, U, SLop=weiop_slo 1, WCop=weiop_mwc 1, FKop=weiop_wem 3, FXop=weiop_ssf 3) Continuation operator f-k operator f-x operator paul@sep. stanford. edu
WEI migration: example 1 call weimig_init( SLin=weiop_slo 1_init, WCin=weiop_mwc 1_init, FKin=weiop_wem 3_init, FXin=weiop_ssf 3_init, IGin=weiop_pcig_init) stat = weimig(adj, add, R, D, SLop=weiop_slo 1, WCop=weiop_mwc 1, FKop=weiop_wem 3, FXop=weiop_ssf 3, IGop=weiop_pcig) Imaging operator paul@sep. stanford. edu
WEI migration: example 2 call weimig_init( SLin=weiop_sll. N_init, WCin=weiop_mwc. N_init, FKin=weiop_cam 3_init, FXin=weiop_ssf 3_init, IGin=weiop_hcig_init) stat = weimig(adj, add, R, D, SLop=weiop_sll. N, WCop=weiop_mwc. N, FKop=weiop_cam 3, FXop=weiop_ssf 3, IGop=weiop_hcig) paul@sep. stanford. edu
WEI MVA call weimva_init( SLin=weiop_sll. N_init, SCin=weiop_bor 1_init, WCin=weiop_mwc. N_init, FKin=weiop_wem 3_init, FXin=weiop_ssf 3_init, IGin=weiop_hcig_init) stat = weimva(adj, add, d. S, d. R, SLop=weiop_sll. N, SCop=weiop_bor 1, WCop=weiop_mwc. N, FKop=weiop_wem 3, FXop=weiop_ssf 3, IGop=weiop_hcig) Scattering operator paul@sep. stanford. edu
Summary • • Flexible, reusable f 90 code Cluster ready (MPI, OMP) Standard operator interface Applications – WE datuming – WE migration – WE MVA paul@sep. stanford. edu
Resources (name@sep. stanford. edu) • Developers – Paul, Bob • Manual – Marie • Users – Biondo, Antoine, Morgan, Brad, Nick, Alejandro paul@sep. stanford. edu
- Slides: 39