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

misc: Rename folders again for imports #93

Merged
merged 2 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
from devito import (Grid, TimeFunction, Eq, solve, Operator,
Constant, norm, configuration)
from examples.cfd import init_hat
from fast.bench_utils import plot_2dfunc
from xdsl_examples.bench_utils import plot_2dfunc


parser = argparse.ArgumentParser(description='Process arguments.')

Expand All @@ -22,10 +23,11 @@
type=int, help="Simulation time in millisecond")
parser.add_argument("-bls", "--blevels", default=2, type=int, nargs="+",
help="Block levels")
parser.add_argument("-plot", "--plot", default=False, type=bool, help="Plot2D")
parser.add_argument("-devito", "--devito", default=False, type=bool, help="Devito run")
parser.add_argument("-xdsl", "--xdsl", default=False, type=bool, help="xDSL run")
args = parser.parse_args()
parser.add_argument("-plot", "--plot", default=False, type=bool, help="Plot2D")


mpiconf = configuration['mpi']

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from devito import (Grid, TimeFunction, Eq, solve, Constant,
norm, Operator, configuration)
from fast.bench_utils import plot_3dfunc
from xdsl_examples.bench_utils import plot_3dfunc

parser = argparse.ArgumentParser(description='Process arguments.')

Expand Down
12 changes: 5 additions & 7 deletions xdsl-examples/elastic2d.py → xdsl_examples/elastic2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@
type=int, help="Space order of the simulation")
parser.add_argument("-nt", "--nt", default=40,
type=int, help="Simulation time in millisecond")
parser.add_argument("-plot", "--plot", default=False, type=bool, help="Plot3D")

parser.add_argument("-devito", "--devito", default=False, type=bool, help="Devito run")
parser.add_argument("-xdsl", "--xdsl", default=False, type=bool, help="xDSL run")
parser.add_argument("-plot", "--plot", default=False, type=bool, help="Plot2D")
Expand Down Expand Up @@ -170,11 +168,11 @@ def wavelet(self, f0, t):

if args.plot:
# Save the plotted images locally
plt.imsave('/home/gb4018/workspace/xdslproject/devito/fast/v0.pdf', v[0].data_with_halo[0], vmin=-.5*1e-2, vmax=.5*1e-2, cmap="seismic")
plt.imsave('/home/gb4018/workspace/xdslproject/devito/fast/v1.pdf', v[1].data_with_halo[0], vmin=-.5*1e-2, vmax=.5*1e-2, cmap="seismic")
plt.imsave('/home/gb4018/workspace/xdslproject/devito/fast/tau00.pdf', tau[0, 0].data_with_halo[0], vmin=-.5*1e-2, vmax=.5*1e-2, cmap="seismic")
plt.imsave('/home/gb4018/workspace/xdslproject/devito/fast/tau11.pdf', tau[1, 1].data_with_halo[0], vmin=-.5*1e-2, vmax=.5*1e-2, cmap="seismic")
plt.imsave('/home/gb4018/workspace/xdslproject/devito/fast/tau01.pdf', tau[0, 1].data_with_halo[0], vmin=-.5*1e-2, vmax=.5*1e-2, cmap="seismic")
plt.imsave('/home/gb4018/workspace/xdslproject/devito/xdsl-examples/v0.pdf', v[0].data_with_halo[0], vmin=-.5*1e-2, vmax=.5*1e-2, cmap="seismic")
plt.imsave('/home/gb4018/workspace/xdslproject/devito/xdsl-examples/v1.pdf', v[1].data_with_halo[0], vmin=-.5*1e-2, vmax=.5*1e-2, cmap="seismic")
plt.imsave('/home/gb4018/workspace/xdslproject/devito/xdsl-examples/tau00.pdf', tau[0, 0].data_with_halo[0], vmin=-.5*1e-2, vmax=.5*1e-2, cmap="seismic")
plt.imsave('/home/gb4018/workspace/xdslproject/devito/xdsl-examples/tau11.pdf', tau[1, 1].data_with_halo[0], vmin=-.5*1e-2, vmax=.5*1e-2, cmap="seismic")
plt.imsave('/home/gb4018/workspace/xdslproject/devito/xdsl-examples/tau01.pdf', tau[0, 1].data_with_halo[0], vmin=-.5*1e-2, vmax=.5*1e-2, cmap="seismic")

assert np.allclose(v_xdsl[0].data, v[0].data, rtol=1e-8)
assert np.allclose(v_xdsl[1].data, v[1].data, rtol=1e-8)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from devito import (TimeFunction, Eq, Operator, solve, configuration)
from examples.seismic import RickerSource
from examples.seismic import Model, TimeAxis
from fast.bench_utils import plot_2dfunc
from xdsl_examples.bench_utils import plot_2dfunc
from devito.tools import as_tuple

import argparse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
configuration)
from examples.seismic import RickerSource
from examples.seismic import Model, TimeAxis
from fast.bench_utils import plot_3dfunc
from xdsl_examples.bench_utils import plot_3dfunc
from devito.tools import as_tuple

import argparse
Expand Down
File renamed without changes.
File renamed without changes.
Binary file added xdsl_examples/tau00.pdf
Binary file not shown.
Binary file added xdsl_examples/tau01.pdf
Binary file not shown.
Binary file added xdsl_examples/tau11.pdf
Binary file not shown.
Binary file added xdsl_examples/v0.pdf
Binary file not shown.
Binary file added xdsl_examples/v1.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion xdsl-examples/wave2d_b.py → xdsl_examples/wave2d_b.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from devito.tools import as_tuple

import argparse
from fast.bench_utils import plot_2dfunc
from xdsl_examples.bench_utils import plot_2dfunc

np.set_printoptions(threshold=np.inf)

Expand Down
3 changes: 2 additions & 1 deletion xdsl-examples/wave3d_b.py → xdsl_examples/wave3d_b.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
from devito.tools import as_tuple

import argparse
from fast.bench_utils import plot_3dfunc
from xdsl_examples.bench_utils import plot_3dfunc


np.set_printoptions(threshold=np.inf)

Expand Down
File renamed without changes.
Loading