Skip to content

Commit

Permalink
Update for pardist
Browse files Browse the repository at this point in the history
  • Loading branch information
MTCam committed Jan 28, 2022
1 parent ab03066 commit 4040bec
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions bozzle.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,16 @@
from grudge.eager import EagerDGDiscretization
from grudge.shortcuts import make_visualizer

from meshmode.array_context import (
PyOpenCLArrayContext,
SingleGridWorkBalancingPytatoArrayContext as PytatoPyOpenCLArrayContext
from grudge.array_context import (
MPIPytatoPyOpenCLArrayContext as PytatoPyOpenCLArrayContext,
PyOpenCLArrayContext
)

# from meshmode.array_context import (
# PyOpenCLArrayContext,
# SingleGridWorkBalancingPytatoArrayContext as PytatoPyOpenCLArrayContext
# )

from mirgecom.profiling import PyOpenCLProfilingArrayContext

from mirgecom.navierstokes import ns_operator
Expand Down Expand Up @@ -125,9 +131,15 @@ def main(ctx_factory=cl.create_some_context, restart_filename=None,
else:
queue = cl.CommandQueue(cl_ctx)

actx = actx_class(
queue,
allocator=cl_tools.MemoryPool(cl_tools.ImmediateAllocator(queue)))
if actx_class == PytatoPyOpenCLArrayContext:
actx = actx_class(comm,
queue,
mpi_base_tag=14000,
allocator=cl_tools.MemoryPool(cl_tools.ImmediateAllocator(queue)))
else:
actx = actx_class(
queue,
allocator=cl_tools.MemoryPool(cl_tools.ImmediateAllocator(queue)))

from mirgecom.simutil import global_reduce as _global_reduce
global_reduce = partial(_global_reduce, comm=comm)
Expand Down

0 comments on commit 4040bec

Please sign in to comment.