diff --git a/xdsl-examples/.gitignore b/xdsl_examples/.gitignore similarity index 100% rename from xdsl-examples/.gitignore rename to xdsl_examples/.gitignore diff --git a/xdsl-examples/README.md b/xdsl_examples/README.md similarity index 100% rename from xdsl-examples/README.md rename to xdsl_examples/README.md diff --git a/xdsl-examples/__init__.py b/xdsl_examples/__init__.py similarity index 100% rename from xdsl-examples/__init__.py rename to xdsl_examples/__init__.py diff --git a/xdsl-examples/bench_utils.py b/xdsl_examples/bench_utils.py similarity index 100% rename from xdsl-examples/bench_utils.py rename to xdsl_examples/bench_utils.py diff --git a/xdsl-examples/diffusion_2D_wBCs.py b/xdsl_examples/diffusion_2D_wBCs.py similarity index 98% rename from xdsl-examples/diffusion_2D_wBCs.py rename to xdsl_examples/diffusion_2D_wBCs.py index fcdcc19d96..b42495a706 100644 --- a/xdsl-examples/diffusion_2D_wBCs.py +++ b/xdsl_examples/diffusion_2D_wBCs.py @@ -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.') @@ -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'] diff --git a/xdsl-examples/diffusion_3D_wBCs.py b/xdsl_examples/diffusion_3D_wBCs.py similarity index 98% rename from xdsl-examples/diffusion_3D_wBCs.py rename to xdsl_examples/diffusion_3D_wBCs.py index d04b2d2d55..a37738eb6f 100644 --- a/xdsl-examples/diffusion_3D_wBCs.py +++ b/xdsl_examples/diffusion_3D_wBCs.py @@ -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.') diff --git a/xdsl-examples/elastic2d.py b/xdsl_examples/elastic2d.py similarity index 87% rename from xdsl-examples/elastic2d.py rename to xdsl_examples/elastic2d.py index e9903cc7e4..e1d33ceed1 100644 --- a/xdsl-examples/elastic2d.py +++ b/xdsl_examples/elastic2d.py @@ -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") @@ -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) diff --git a/xdsl-examples/gpu.sh b/xdsl_examples/gpu.sh similarity index 100% rename from xdsl-examples/gpu.sh rename to xdsl_examples/gpu.sh diff --git a/xdsl-examples/job-devito-xdsl-wave.slurm b/xdsl_examples/job-devito-xdsl-wave.slurm similarity index 100% rename from xdsl-examples/job-devito-xdsl-wave.slurm rename to xdsl_examples/job-devito-xdsl-wave.slurm diff --git a/xdsl-examples/job-devito-xdsl.slurm b/xdsl_examples/job-devito-xdsl.slurm similarity index 100% rename from xdsl-examples/job-devito-xdsl.slurm rename to xdsl_examples/job-devito-xdsl.slurm diff --git a/xdsl-examples/mpi.sh b/xdsl_examples/mpi.sh similarity index 100% rename from xdsl-examples/mpi.sh rename to xdsl_examples/mpi.sh diff --git a/xdsl-examples/openmp.sh b/xdsl_examples/openmp.sh similarity index 100% rename from xdsl-examples/openmp.sh rename to xdsl_examples/openmp.sh diff --git a/xdsl-examples/run_benchmark.py b/xdsl_examples/run_benchmark.py similarity index 100% rename from xdsl-examples/run_benchmark.py rename to xdsl_examples/run_benchmark.py diff --git a/xdsl-examples/setup.sh b/xdsl_examples/setup.sh similarity index 100% rename from xdsl-examples/setup.sh rename to xdsl_examples/setup.sh diff --git a/xdsl-examples/setup_wave2d.py b/xdsl_examples/setup_wave2d.py similarity index 98% rename from xdsl-examples/setup_wave2d.py rename to xdsl_examples/setup_wave2d.py index 622b7be72c..b0caf2212e 100644 --- a/xdsl-examples/setup_wave2d.py +++ b/xdsl_examples/setup_wave2d.py @@ -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 diff --git a/xdsl-examples/setup_wave3d.py b/xdsl_examples/setup_wave3d.py similarity index 98% rename from xdsl-examples/setup_wave3d.py rename to xdsl_examples/setup_wave3d.py index 27a266069c..4b1912e997 100644 --- a/xdsl-examples/setup_wave3d.py +++ b/xdsl_examples/setup_wave3d.py @@ -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 diff --git a/xdsl-examples/single_thread.sh b/xdsl_examples/single_thread.sh similarity index 100% rename from xdsl-examples/single_thread.sh rename to xdsl_examples/single_thread.sh diff --git a/xdsl-examples/slurm-jobs/diffusion-1.slurm b/xdsl_examples/slurm-jobs/diffusion-1.slurm similarity index 100% rename from xdsl-examples/slurm-jobs/diffusion-1.slurm rename to xdsl_examples/slurm-jobs/diffusion-1.slurm diff --git a/xdsl-examples/slurm-jobs/diffusion-128.slurm b/xdsl_examples/slurm-jobs/diffusion-128.slurm similarity index 100% rename from xdsl-examples/slurm-jobs/diffusion-128.slurm rename to xdsl_examples/slurm-jobs/diffusion-128.slurm diff --git a/xdsl-examples/slurm-jobs/diffusion-16.slurm b/xdsl_examples/slurm-jobs/diffusion-16.slurm similarity index 100% rename from xdsl-examples/slurm-jobs/diffusion-16.slurm rename to xdsl_examples/slurm-jobs/diffusion-16.slurm diff --git a/xdsl-examples/slurm-jobs/diffusion-2.slurm b/xdsl_examples/slurm-jobs/diffusion-2.slurm similarity index 100% rename from xdsl-examples/slurm-jobs/diffusion-2.slurm rename to xdsl_examples/slurm-jobs/diffusion-2.slurm diff --git a/xdsl-examples/slurm-jobs/diffusion-32.slurm b/xdsl_examples/slurm-jobs/diffusion-32.slurm similarity index 100% rename from xdsl-examples/slurm-jobs/diffusion-32.slurm rename to xdsl_examples/slurm-jobs/diffusion-32.slurm diff --git a/xdsl-examples/slurm-jobs/diffusion-4.slurm b/xdsl_examples/slurm-jobs/diffusion-4.slurm similarity index 100% rename from xdsl-examples/slurm-jobs/diffusion-4.slurm rename to xdsl_examples/slurm-jobs/diffusion-4.slurm diff --git a/xdsl-examples/slurm-jobs/diffusion-64.slurm b/xdsl_examples/slurm-jobs/diffusion-64.slurm similarity index 100% rename from xdsl-examples/slurm-jobs/diffusion-64.slurm rename to xdsl_examples/slurm-jobs/diffusion-64.slurm diff --git a/xdsl-examples/slurm-jobs/diffusion-8.slurm b/xdsl_examples/slurm-jobs/diffusion-8.slurm similarity index 100% rename from xdsl-examples/slurm-jobs/diffusion-8.slurm rename to xdsl_examples/slurm-jobs/diffusion-8.slurm diff --git a/xdsl-examples/slurm-jobs/gpu.slurm b/xdsl_examples/slurm-jobs/gpu.slurm similarity index 100% rename from xdsl-examples/slurm-jobs/gpu.slurm rename to xdsl_examples/slurm-jobs/gpu.slurm diff --git a/xdsl-examples/slurm-jobs/job-devito-xdsl-wave.slurm b/xdsl_examples/slurm-jobs/job-devito-xdsl-wave.slurm similarity index 100% rename from xdsl-examples/slurm-jobs/job-devito-xdsl-wave.slurm rename to xdsl_examples/slurm-jobs/job-devito-xdsl-wave.slurm diff --git a/xdsl-examples/slurm-jobs/job-devito-xdsl.slurm b/xdsl_examples/slurm-jobs/job-devito-xdsl.slurm similarity index 100% rename from xdsl-examples/slurm-jobs/job-devito-xdsl.slurm rename to xdsl_examples/slurm-jobs/job-devito-xdsl.slurm diff --git a/xdsl-examples/slurm-jobs/openmp-1.slurm b/xdsl_examples/slurm-jobs/openmp-1.slurm similarity index 100% rename from xdsl-examples/slurm-jobs/openmp-1.slurm rename to xdsl_examples/slurm-jobs/openmp-1.slurm diff --git a/xdsl-examples/slurm-jobs/openmp-128.slurm b/xdsl_examples/slurm-jobs/openmp-128.slurm similarity index 100% rename from xdsl-examples/slurm-jobs/openmp-128.slurm rename to xdsl_examples/slurm-jobs/openmp-128.slurm diff --git a/xdsl-examples/slurm-jobs/openmp-16.slurm b/xdsl_examples/slurm-jobs/openmp-16.slurm similarity index 100% rename from xdsl-examples/slurm-jobs/openmp-16.slurm rename to xdsl_examples/slurm-jobs/openmp-16.slurm diff --git a/xdsl-examples/slurm-jobs/openmp-2.slurm b/xdsl_examples/slurm-jobs/openmp-2.slurm similarity index 100% rename from xdsl-examples/slurm-jobs/openmp-2.slurm rename to xdsl_examples/slurm-jobs/openmp-2.slurm diff --git a/xdsl-examples/slurm-jobs/openmp-32.slurm b/xdsl_examples/slurm-jobs/openmp-32.slurm similarity index 100% rename from xdsl-examples/slurm-jobs/openmp-32.slurm rename to xdsl_examples/slurm-jobs/openmp-32.slurm diff --git a/xdsl-examples/slurm-jobs/openmp-4.slurm b/xdsl_examples/slurm-jobs/openmp-4.slurm similarity index 100% rename from xdsl-examples/slurm-jobs/openmp-4.slurm rename to xdsl_examples/slurm-jobs/openmp-4.slurm diff --git a/xdsl-examples/slurm-jobs/openmp-64.slurm b/xdsl_examples/slurm-jobs/openmp-64.slurm similarity index 100% rename from xdsl-examples/slurm-jobs/openmp-64.slurm rename to xdsl_examples/slurm-jobs/openmp-64.slurm diff --git a/xdsl-examples/slurm-jobs/openmp-8.slurm b/xdsl_examples/slurm-jobs/openmp-8.slurm similarity index 100% rename from xdsl-examples/slurm-jobs/openmp-8.slurm rename to xdsl_examples/slurm-jobs/openmp-8.slurm diff --git a/xdsl-examples/slurm-jobs/single-node.slurm b/xdsl_examples/slurm-jobs/single-node.slurm similarity index 100% rename from xdsl-examples/slurm-jobs/single-node.slurm rename to xdsl_examples/slurm-jobs/single-node.slurm diff --git a/xdsl-examples/slurm-jobs/wave-1.slurm b/xdsl_examples/slurm-jobs/wave-1.slurm similarity index 100% rename from xdsl-examples/slurm-jobs/wave-1.slurm rename to xdsl_examples/slurm-jobs/wave-1.slurm diff --git a/xdsl-examples/slurm-jobs/wave-128.slurm b/xdsl_examples/slurm-jobs/wave-128.slurm similarity index 100% rename from xdsl-examples/slurm-jobs/wave-128.slurm rename to xdsl_examples/slurm-jobs/wave-128.slurm diff --git a/xdsl-examples/slurm-jobs/wave-16.slurm b/xdsl_examples/slurm-jobs/wave-16.slurm similarity index 100% rename from xdsl-examples/slurm-jobs/wave-16.slurm rename to xdsl_examples/slurm-jobs/wave-16.slurm diff --git a/xdsl-examples/slurm-jobs/wave-2.slurm b/xdsl_examples/slurm-jobs/wave-2.slurm similarity index 100% rename from xdsl-examples/slurm-jobs/wave-2.slurm rename to xdsl_examples/slurm-jobs/wave-2.slurm diff --git a/xdsl-examples/slurm-jobs/wave-32.slurm b/xdsl_examples/slurm-jobs/wave-32.slurm similarity index 100% rename from xdsl-examples/slurm-jobs/wave-32.slurm rename to xdsl_examples/slurm-jobs/wave-32.slurm diff --git a/xdsl-examples/slurm-jobs/wave-4.slurm b/xdsl_examples/slurm-jobs/wave-4.slurm similarity index 100% rename from xdsl-examples/slurm-jobs/wave-4.slurm rename to xdsl_examples/slurm-jobs/wave-4.slurm diff --git a/xdsl-examples/slurm-jobs/wave-64.slurm b/xdsl_examples/slurm-jobs/wave-64.slurm similarity index 100% rename from xdsl-examples/slurm-jobs/wave-64.slurm rename to xdsl_examples/slurm-jobs/wave-64.slurm diff --git a/xdsl-examples/slurm-jobs/wave-8.slurm b/xdsl_examples/slurm-jobs/wave-8.slurm similarity index 100% rename from xdsl-examples/slurm-jobs/wave-8.slurm rename to xdsl_examples/slurm-jobs/wave-8.slurm diff --git a/xdsl_examples/tau00.pdf b/xdsl_examples/tau00.pdf new file mode 100644 index 0000000000..f69365f98a Binary files /dev/null and b/xdsl_examples/tau00.pdf differ diff --git a/xdsl_examples/tau01.pdf b/xdsl_examples/tau01.pdf new file mode 100644 index 0000000000..c7d30b613b Binary files /dev/null and b/xdsl_examples/tau01.pdf differ diff --git a/xdsl_examples/tau11.pdf b/xdsl_examples/tau11.pdf new file mode 100644 index 0000000000..ccd786d0db Binary files /dev/null and b/xdsl_examples/tau11.pdf differ diff --git a/xdsl_examples/v0.pdf b/xdsl_examples/v0.pdf new file mode 100644 index 0000000000..41154f556a Binary files /dev/null and b/xdsl_examples/v0.pdf differ diff --git a/xdsl_examples/v1.pdf b/xdsl_examples/v1.pdf new file mode 100644 index 0000000000..34938ee46a Binary files /dev/null and b/xdsl_examples/v1.pdf differ diff --git a/xdsl-examples/wave2d_b.py b/xdsl_examples/wave2d_b.py similarity index 99% rename from xdsl-examples/wave2d_b.py rename to xdsl_examples/wave2d_b.py index 7e0857f6c1..24a96fbf51 100644 --- a/xdsl-examples/wave2d_b.py +++ b/xdsl_examples/wave2d_b.py @@ -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) diff --git a/xdsl-examples/wave3d_b.py b/xdsl_examples/wave3d_b.py similarity index 99% rename from xdsl-examples/wave3d_b.py rename to xdsl_examples/wave3d_b.py index c7631b7e0d..99eb770467 100644 --- a/xdsl-examples/wave3d_b.py +++ b/xdsl_examples/wave3d_b.py @@ -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) diff --git a/xdsl-examples/wave_eq_3d.py b/xdsl_examples/wave_eq_3d.py similarity index 100% rename from xdsl-examples/wave_eq_3d.py rename to xdsl_examples/wave_eq_3d.py