Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot increase dimensionality of MPI-distributed Data #2157

Open
bening-gawitsa opened this issue Jul 3, 2023 · 2 comments
Open

cannot increase dimensionality of MPI-distributed Data #2157

bening-gawitsa opened this issue Jul 3, 2023 · 2 comments

Comments

@bening-gawitsa
Copy link

I try to apply FWI for marmousi 2D model and run it using MPI. This is the setting of my acquisition geometry

nshots = 60  
nreceivers = 80  
fwi_iterations = 3
shape = (1601, 401)  # Number of grid point (nx, nz)
spacing = (5, 5)  # Grid spacing in m. The domain size is now 1km by 1km
origin = (0., 0.)  # Need origin to define relative source and receiver locations
filter_sigma = (25,25)
model = demo_model('marmousi2D-isotropic', data_path= '/home/bening2019/data/', 
                   origin=origin, shape=shape, spacing=spacing, nbl=20, space_order=2)

model0 = demo_model('marmousi2D-isotropic', data_path= '/home/bening2019/data/',
                    origin=origin, shape=shape, spacing=spacing, nbl=20, grid = model.grid, space_order=2)
gaussian_smooth(model0.vp, sigma=filter_sigma)

Then when executing this code below, I got the error message that said "cannot increase dimensionality of MPI-distributed Data"

from examples.seismic import AcquisitionGeometry

t0 = 0.
tn = 5000. 
f0 = 0.015
# First, position source centrally in all dimensions, then set depth
src_coordinates = np.empty((nshots, 2), dtype=np.float32)
src_coordinates[:,0] = np.linspace(0, model.domain_size[0], num=nshots) * 1
src_coordinates[:, 1] = 1.  # Depth is 

rec_coordinates = np.empty((nreceivers, 2))
rec_coordinates[:,0] = np.linspace(0, model.domain_size[0], num=nreceivers) 
rec_coordinates[:,1] = 200.

# Geometry
geometry = AcquisitionGeometry(model, rec_coordinates, src_coordinates, t0, tn, f0=f0, src_type='Ricker')
# We can plot the time signature to see the wavelet
geometry.src.show()

and I haven't found the solution yet
Screenshot 2023-07-02 102512

@FabioLuporini
Copy link
Contributor

Hi, could you turn this into an MFE?

See here for instructions: https://github.com/devitocodes/devito/blob/master/FAQ.md#how-do-i-find-the-source-of-my-bug-quickly-and-get-support

@mloubout
Copy link
Contributor

mloubout commented Aug 3, 2023

geometry.src.show() will error with MPI because only one rank will have a non-empty source. Display/data debug should only be done in serial or gathered then displayed on a single rank.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants