Skip to content
Open
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
5 changes: 4 additions & 1 deletion examples/ablation-workshop.py
Original file line number Diff line number Diff line change
Expand Up @@ -1212,13 +1212,16 @@ def my_post_step(step, t, dt, state):
dest="restart_file", nargs="?", action="store",
help="simulation restart file")
parser.add_argument("--casename", help="casename to use for i/o")
parser.add_argument("--cupy", action="store_true",
help="use cupy-based eager actx.")
args = parser.parse_args()
from warnings import warn
warn("Automatically turning off DV logging. MIRGE-Com Issue(578)")

from mirgecom.array_context import get_reasonable_array_context_class
actx_class = get_reasonable_array_context_class(
lazy=args.lazy, distributed=True, profiling=args.profiling, numpy=args.numpy)
lazy=args.lazy, distributed=True, profiling=args.profiling,
numpy=args.numpy, cupy=args.cupy)

logging.basicConfig(format="%(message)s", level=logging.INFO)
if args.casename:
Expand Down
5 changes: 4 additions & 1 deletion examples/advection_diffusion_reaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,13 +331,16 @@ def my_rhs(t, u):
help="use numpy-based eager actx.")
parser.add_argument("--restart_file", help="root name of restart file")
parser.add_argument("--casename", help="casename to use for i/o")
parser.add_argument("--cupy", action="store_true",
help="use cupy-based eager actx.")
args = parser.parse_args()
lazy = args.lazy

from mirgecom.array_context import get_reasonable_array_context_class
actx_class = get_reasonable_array_context_class(lazy=args.lazy, distributed=True,
profiling=args.profiling,
numpy=args.numpy)
numpy=args.numpy,
cupy=args.cupy)

logging.basicConfig(format="%(message)s", level=logging.INFO)
if args.casename:
Expand Down
5 changes: 4 additions & 1 deletion examples/autoignition.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,8 @@ def my_rhs(t, state):
help="use numpy-based eager actx.")
parser.add_argument("--restart_file", help="root name of restart file")
parser.add_argument("--casename", help="casename to use for i/o")
parser.add_argument("--cupy", action="store_true",
help="use cupy-based eager actx.")
args = parser.parse_args()
from warnings import warn
warn("Automatically turning off DV logging. MIRGE-Com Issue(578)")
Expand All @@ -672,7 +674,8 @@ def my_rhs(t, state):

from mirgecom.array_context import get_reasonable_array_context_class
actx_class = get_reasonable_array_context_class(
lazy=args.lazy, distributed=True, profiling=args.profiling, numpy=args.numpy)
lazy=args.lazy, distributed=True, profiling=args.profiling,
numpy=args.numpy, cupy=args.cupy)

logging.basicConfig(format="%(message)s", level=logging.INFO)
if args.casename:
Expand Down
5 changes: 4 additions & 1 deletion examples/blasius.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,8 @@ def my_post_step(step, t, dt, state):
help="enable lazy evaluation [OFF]")
parser.add_argument("--numpy", action="store_true",
help="use numpy-based eager actx.")
parser.add_argument("--cupy", action="store_true",
help="use cupy-based eager actx.")

args = parser.parse_args()

Expand All @@ -538,7 +540,8 @@ def my_post_step(step, t, dt, state):

from mirgecom.array_context import get_reasonable_array_context_class
actx_class = get_reasonable_array_context_class(
lazy=args.lazy, distributed=True, profiling=args.profiling, numpy=args.numpy)
lazy=args.lazy, distributed=True, profiling=args.profiling,
numpy=args.numpy, cupy=args.cupy)

logging.basicConfig(format="%(message)s", level=logging.INFO)
if args.casename:
Expand Down
5 changes: 4 additions & 1 deletion examples/combozzle.py
Original file line number Diff line number Diff line change
Expand Up @@ -1255,6 +1255,8 @@ def dummy_rhs(t, state):
parser.add_argument("--casename", help="casename to use for i/o")
parser.add_argument("--tpe", action="store_true",
help="Use tensor product elements (quads/hexes).")
parser.add_argument("--cupy", action="store_true",
help="use cupy-based eager actx.")
args = parser.parse_args()

from warnings import warn
Expand All @@ -1271,7 +1273,8 @@ def dummy_rhs(t, state):

from mirgecom.array_context import get_reasonable_array_context_class
actx_class = get_reasonable_array_context_class(
lazy=args.lazy, distributed=True, profiling=args.profiling, numpy=args.numpy)
lazy=args.lazy, distributed=True, profiling=args.profiling,
numpy=args.numpy, cupy=args.cupy)

logging.basicConfig(format="%(message)s", level=logging.INFO)
if args.casename:
Expand Down
4 changes: 3 additions & 1 deletion examples/doublemach.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,8 @@ def my_rhs(t, state):
help="use numpy-based eager actx.")
parser.add_argument("--restart_file", help="root name of restart file")
parser.add_argument("--casename", help="casename to use for i/o")
parser.add_argument("--cupy", action="store_true",
help="use cupy-based eager actx.")
args = parser.parse_args()

from warnings import warn
Expand All @@ -455,7 +457,7 @@ def my_rhs(t, state):
from mirgecom.array_context import get_reasonable_array_context_class
actx_class = get_reasonable_array_context_class(lazy=args.lazy, distributed=True,
profiling=args.profiling,
numpy=args.numpy)
numpy=args.numpy, cupy=args.cupy)

logging.basicConfig(format="%(message)s", level=logging.INFO)
if args.casename:
Expand Down
4 changes: 3 additions & 1 deletion examples/doublemach_physical_av.py
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,8 @@ def _my_rhs_phys_visc_div_av(t, state):
help="use numpy-based eager actx.")
parser.add_argument("--restart_file", help="root name of restart file")
parser.add_argument("--casename", help="casename to use for i/o")
parser.add_argument("--cupy", action="store_true",
help="use cupy-based eager actx.")
args = parser.parse_args()

from warnings import warn
Expand All @@ -730,7 +732,7 @@ def _my_rhs_phys_visc_div_av(t, state):
actx_class = get_reasonable_array_context_class(lazy=args.lazy,
distributed=True,
profiling=args.profiling,
numpy=args.numpy)
numpy=args.numpy, cupy=args.cupy)

logging.basicConfig(format="%(message)s", level=logging.INFO)
if args.casename:
Expand Down
5 changes: 4 additions & 1 deletion examples/heat-source.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,14 @@ def my_post_step(step, t, dt, state):
help="use numpy-based eager actx.")
parser.add_argument("--restart_file", help="root name of restart file")
parser.add_argument("--casename", help="casename to use for i/o")
parser.add_argument("--cupy", action="store_true",
help="use cupy-based eager actx.")
args = parser.parse_args()

from mirgecom.array_context import get_reasonable_array_context_class
actx_class = get_reasonable_array_context_class(
lazy=args.lazy, distributed=True, profiling=args.profiling, numpy=args.numpy)
lazy=args.lazy, distributed=True, profiling=args.profiling,
numpy=args.numpy, cupy=args.cupy)

logging.basicConfig(format="%(message)s", level=logging.INFO)
if args.casename:
Expand Down
5 changes: 4 additions & 1 deletion examples/hotplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,8 @@ def my_rhs(t, state):
help="use numpy-based eager actx.")
parser.add_argument("--restart_file", help="root name of restart file")
parser.add_argument("--casename", help="casename to use for i/o")
parser.add_argument("--cupy", action="store_true",
help="use cupy-based eager actx.")
args = parser.parse_args()

from warnings import warn
Expand All @@ -460,7 +462,8 @@ def my_rhs(t, state):

from mirgecom.array_context import get_reasonable_array_context_class
actx_class = get_reasonable_array_context_class(
lazy=args.lazy, distributed=True, profiling=args.profiling, numpy=args.numpy)
lazy=args.lazy, distributed=True, profiling=args.profiling,
numpy=args.numpy, cupy=args.cupy)

logging.basicConfig(format="%(message)s", level=logging.INFO)
if args.casename:
Expand Down
5 changes: 4 additions & 1 deletion examples/lump.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,8 @@ def my_rhs(t, state):
help="use numpy-based eager actx.")
parser.add_argument("--restart_file", help="root name of restart file")
parser.add_argument("--casename", help="casename to use for i/o")
parser.add_argument("--cupy", action="store_true",
help="use cupy-based eager actx.")
args = parser.parse_args()

from warnings import warn
Expand All @@ -395,7 +397,8 @@ def my_rhs(t, state):

from mirgecom.array_context import get_reasonable_array_context_class
actx_class = get_reasonable_array_context_class(
lazy=args.lazy, distributed=True, profiling=args.profiling, numpy=args.numpy)
lazy=args.lazy, distributed=True, profiling=args.profiling,
numpy=args.numpy, cupy=args.cupy)

logging.basicConfig(format="%(message)s", level=logging.INFO)
if args.casename:
Expand Down
5 changes: 4 additions & 1 deletion examples/mixture.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,8 @@ def my_rhs(t, state):
help="use numpy-based eager actx.")
parser.add_argument("--restart_file", help="root name of restart file")
parser.add_argument("--casename", help="casename to use for i/o")
parser.add_argument("--cupy", action="store_true",
help="use cupy-based eager actx.")
args = parser.parse_args()
from warnings import warn
warn("Automatically turning off DV logging. MIRGE-Com Issue(578)")
Expand All @@ -461,7 +463,8 @@ def my_rhs(t, state):

from mirgecom.array_context import get_reasonable_array_context_class
actx_class = get_reasonable_array_context_class(
lazy=args.lazy, distributed=True, profiling=args.profiling, numpy=args.numpy)
lazy=args.lazy, distributed=True, profiling=args.profiling,
numpy=args.numpy, cupy=args.cupy)

logging.basicConfig(format="%(message)s", level=logging.INFO)
if args.casename:
Expand Down
5 changes: 4 additions & 1 deletion examples/multiple-volumes.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,8 @@ def my_rhs(t, state):
help="use numpy-based eager actx.")
parser.add_argument("--restart_file", help="root name of restart file")
parser.add_argument("--casename", help="casename to use for i/o")
parser.add_argument("--cupy", action="store_true",
help="use cupy-based eager actx.")
args = parser.parse_args()

from warnings import warn
Expand All @@ -404,7 +406,8 @@ def my_rhs(t, state):

from mirgecom.array_context import get_reasonable_array_context_class
actx_class = get_reasonable_array_context_class(
lazy=args.lazy, distributed=True, profiling=args.profiling, numpy=args.numpy)
lazy=args.lazy, distributed=True, profiling=args.profiling,
numpy=args.numpy, cupy=args.cupy)

logging.basicConfig(format="%(message)s", level=logging.INFO)
if args.casename:
Expand Down
5 changes: 4 additions & 1 deletion examples/orthotropic-diffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,14 @@ def my_post_step(step, t, dt, state):
help="use numpy-based eager actx.")
parser.add_argument("--restart_file", help="root name of restart file")
parser.add_argument("--casename", help="casename to use for i/o")
parser.add_argument("--cupy", action="store_true",
help="use cupy-based eager actx.")
args = parser.parse_args()

from mirgecom.array_context import get_reasonable_array_context_class
actx_class = get_reasonable_array_context_class(
lazy=args.lazy, distributed=True, profiling=args.profiling, numpy=args.numpy)
lazy=args.lazy, distributed=True, profiling=args.profiling,
numpy=args.numpy, cupy=args.cupy)

logging.basicConfig(format="%(message)s", level=logging.INFO)
if args.casename:
Expand Down
5 changes: 4 additions & 1 deletion examples/poiseuille-multispecies.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,8 @@ def my_rhs(t, state):
help="use numpy-based eager actx.")
parser.add_argument("--restart_file", help="root name of restart file")
parser.add_argument("--casename", help="casename to use for i/o")
parser.add_argument("--cupy", action="store_true",
help="use cupy-based eager actx.")
args = parser.parse_args()

from warnings import warn
Expand All @@ -498,7 +500,8 @@ def my_rhs(t, state):

from mirgecom.array_context import get_reasonable_array_context_class
actx_class = get_reasonable_array_context_class(
lazy=args.lazy, distributed=True, profiling=args.profiling, numpy=args.numpy)
lazy=args.lazy, distributed=True, profiling=args.profiling,
numpy=args.numpy, cupy=args.cupy)

logging.basicConfig(format="%(message)s", level=logging.INFO)
if args.casename:
Expand Down
5 changes: 4 additions & 1 deletion examples/poiseuille.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,8 @@ def my_rhs(t, state):
help="use numpy-based eager actx.")
parser.add_argument("--restart_file", help="root name of restart file")
parser.add_argument("--casename", help="casename to use for i/o")
parser.add_argument("--cupy", action="store_true",
help="use cupy-based eager actx.")
args = parser.parse_args()

from warnings import warn
Expand All @@ -487,7 +489,8 @@ def my_rhs(t, state):

from mirgecom.array_context import get_reasonable_array_context_class
actx_class = get_reasonable_array_context_class(
lazy=args.lazy, distributed=True, profiling=args.profiling, numpy=args.numpy)
lazy=args.lazy, distributed=True, profiling=args.profiling,
numpy=args.numpy, cupy=args.cupy)

logging.basicConfig(format="%(message)s", level=logging.INFO)
if args.casename:
Expand Down
5 changes: 4 additions & 1 deletion examples/pulse-mixture.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,8 @@ def my_rhs(t, state):
help="use numpy-based eager actx.")
parser.add_argument("--restart_file", help="root name of restart file")
parser.add_argument("--casename", help="casename to use for i/o")
parser.add_argument("--cupy", action="store_true",
help="use cupy-based eager actx.")
args = parser.parse_args()

from warnings import warn
Expand All @@ -433,7 +435,8 @@ def my_rhs(t, state):

from mirgecom.array_context import get_reasonable_array_context_class
actx_class = get_reasonable_array_context_class(
lazy=args.lazy, distributed=True, profiling=args.profiling, numpy=args.numpy)
lazy=args.lazy, distributed=True, profiling=args.profiling,
numpy=args.numpy, cupy=args.cupy)

logging.basicConfig(format="%(message)s", level=logging.INFO)
if args.casename:
Expand Down
6 changes: 5 additions & 1 deletion examples/pulse-tpe.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,9 @@ def my_rhs(t, state):
help="use numpy-based eager actx.")
parser.add_argument("--restart_file", help="root name of restart file")
parser.add_argument("--casename", help="casename to use for i/o")
parser.add_argument("--cupy", action="store_true",
help="use cupy-based eager actx.")

args = parser.parse_args()

from warnings import warn
Expand All @@ -362,7 +365,8 @@ def my_rhs(t, state):

from mirgecom.array_context import get_reasonable_array_context_class
actx_class = get_reasonable_array_context_class(
lazy=args.lazy, distributed=True, profiling=args.profiling, numpy=args.numpy)
lazy=args.lazy, distributed=True, profiling=args.profiling,
numpy=args.numpy, cupy=args.cupy)

logging.basicConfig(format="%(message)s", level=logging.INFO)
if args.casename:
Expand Down
5 changes: 4 additions & 1 deletion examples/pulse.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,8 @@ def my_rhs(t, state):
help="use numpy-based eager actx.")
parser.add_argument("--restart_file", help="root name of restart file")
parser.add_argument("--casename", help="casename to use for i/o")
parser.add_argument("--cupy", action="store_true",
help="use cupy-based eager actx.")
args = parser.parse_args()

from warnings import warn
Expand All @@ -354,7 +356,8 @@ def my_rhs(t, state):

from mirgecom.array_context import get_reasonable_array_context_class
actx_class = get_reasonable_array_context_class(
lazy=args.lazy, distributed=True, profiling=args.profiling, numpy=args.numpy)
lazy=args.lazy, distributed=True, profiling=args.profiling,
numpy=args.numpy, cupy=args.cupy)

logging.basicConfig(format="%(message)s", level=logging.INFO)
if args.casename:
Expand Down
4 changes: 3 additions & 1 deletion examples/scalar-advdiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,8 @@ def my_rhs(t, state):
help="use numpy-based eager actx.")
parser.add_argument("--restart_file", help="root name of restart file")
parser.add_argument("--casename", help="casename to use for i/o")
parser.add_argument("--cupy", action="store_true",
help="use cupy-based eager actx.")
args = parser.parse_args()

from warnings import warn
Expand All @@ -480,7 +482,7 @@ def my_rhs(t, state):
from mirgecom.array_context import get_reasonable_array_context_class
actx_class = get_reasonable_array_context_class(lazy=args.lazy, distributed=True,
profiling=args.profiling,
numpy=args.numpy)
numpy=args.numpy, cupy=args.cupy)

logging.basicConfig(format="%(message)s", level=logging.INFO)
if args.casename:
Expand Down
5 changes: 4 additions & 1 deletion examples/scalar-lump.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,8 @@ def my_rhs(t, state):
help="use numpy-based eager actx.")
parser.add_argument("--restart_file", help="root name of restart file")
parser.add_argument("--casename", help="casename to use for i/o")
parser.add_argument("--cupy", action="store_true",
help="use cupy-based eager actx.")
args = parser.parse_args()

from warnings import warn
Expand All @@ -405,7 +407,8 @@ def my_rhs(t, state):

from mirgecom.array_context import get_reasonable_array_context_class
actx_class = get_reasonable_array_context_class(
lazy=args.lazy, distributed=True, profiling=args.profiling, numpy=args.numpy)
lazy=args.lazy, distributed=True, profiling=args.profiling,
numpy=args.numpy, cupy=args.cupy)

logging.basicConfig(format="%(message)s", level=logging.INFO)
if args.casename:
Expand Down
5 changes: 4 additions & 1 deletion examples/sod.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,8 @@ def my_rhs(t, state):
help="use numpy-based eager actx.")
parser.add_argument("--restart_file", help="root name of restart file")
parser.add_argument("--casename", help="casename to use for i/o")
parser.add_argument("--cupy", action="store_true",
help="use cupy-based eager actx.")
args = parser.parse_args()

from warnings import warn
Expand All @@ -403,7 +405,8 @@ def my_rhs(t, state):

from mirgecom.array_context import get_reasonable_array_context_class
actx_class = get_reasonable_array_context_class(
lazy=args.lazy, distributed=True, profiling=args.profiling, numpy=args.numpy)
lazy=args.lazy, distributed=True, profiling=args.profiling,
numpy=args.numpy, cupy=args.cupy)

logging.basicConfig(format="%(message)s", level=logging.INFO)
if args.casename:
Expand Down
Loading