Multiple volumes#726
Conversation
| kappa=1., s0=-6., time=0, operator_states_quad=None, | ||
| grad_cv=None, quadrature_tag=None, boundary_kwargs=None, | ||
| kappa=1., s0=-6., time=0, quadrature_tag=DISCR_TAG_BASE, | ||
| volume_dd=DD_VOLUME_ALL, boundary_kwargs=None, |
There was a problem hiding this comment.
Can't yet, some of the drivers still use it (isolator and nozzle).
| kappa=1., s0=-6., time=0, quadrature_tag=DISCR_TAG_BASE, | ||
| volume_dd=DD_VOLUME_ALL, boundary_kwargs=None, |
There was a problem hiding this comment.
quadrature_tag and volume_dd both contain a discretization tag.
You could do volume_dd=None and then allow (with a deprecation warning) a quadrature_tag to be passed, otherwise raise.
(Here and elsewhere.)
There was a problem hiding this comment.
As we discussed elsewhere, the two discretization tags here are only sometimes redundant. I tried to remove those cases.
| dd_base = volume_dd | ||
| dd_vol = dd_base.with_discr_tag(quadrature_tag) |
There was a problem hiding this comment.
I'm getting myself confused on how dd_base, dd_vol, volume_dd are intended to be different. (Add a comment?)
There was a problem hiding this comment.
I did my best to clarify the naming. I'm now using dd for the function parameters, checking that they're volumes where required, and then using dd_vol and dd_vol_quad internally for the base and quadrature discretizations, respectfully (and using the same naming scheme for other dds like bdry/allfaces and arrays).
| dd_allfaces = dd_trace.with_domain_tag( | ||
| replace(dd_trace.domain_tag, tag=FACE_RESTR_ALL)) |
There was a problem hiding this comment.
Fixed in inducer/grudge#280 with with_boundary_tag.
| discr, gas_model, boundaries, state, *, time=0.0, | ||
| numerical_flux_func=num_flux_central, | ||
| quadrature_tag=DISCR_TAG_BASE, | ||
| quadrature_tag=DISCR_TAG_BASE, volume_dd=DD_VOLUME_ALL, |
| discr, gas_model, boundaries, state, *, time=0.0, | ||
| numerical_flux_func=num_flux_central, | ||
| quadrature_tag=DISCR_TAG_BASE, | ||
| quadrature_tag=DISCR_TAG_BASE, volume_dd=DD_VOLUME_ALL, |
| inviscid_numerical_flux_func=inviscid_facial_flux_rusanov, | ||
| gradient_numerical_flux_func=num_flux_central, | ||
| viscous_numerical_flux_func=viscous_facial_flux_central, | ||
| quadrature_tag=DISCR_TAG_BASE, return_gradients=False, |
| from meshmode.distributed import get_partition_by_pymetis | ||
| return get_partition_by_pymetis(mesh, num_ranks) | ||
|
|
||
| if comm.Get_rank() == 0: |
There was a problem hiding this comment.
This all looks pretty bureaucratic. Can we do this in grudge/meshmode? What's the background to this?
There was a problem hiding this comment.
Removed from this PR (still need to figure out how to clean it up, but we'll worry about that later.)
| domain_boundary_states, grad_cv, interior_grad_cv_pairs, | ||
| grad_t, interior_grad_t_pairs, quadrature_tag=None, | ||
| numerical_flux_func=viscous_facial_flux_central, time=0.0): | ||
| grad_t, interior_grad_t_pairs, quadrature_tag=DISCR_TAG_BASE, |
3109bca to
faf3717
Compare
7200ebb to
c0780b8
Compare
|
@matthiasdiener @inducer Am I correct in guessing that the current MPI communication tagging strategy isn't guaranteed to work when you call the same operator multiple times in a single compiled function? I ran into some trouble with the example I just set up (multiple-volumes.py), which creates multiple copies of the same mesh with different initial conditions and calls |
I know I wasn't asked, but what about doing something like:
... after making those comm tags importable classes? That way the driver writer can override or pass different tags if needed/wanted? |
I guess so, but it would be nice if we didn't have to do that... That version would also leave me with some (admittedly self-inflicted) challenges, since I made the number of volumes in that example a parameter. 🙂 |
5eaf339 to
87339e5
Compare
87339e5 to
1d235ee
Compare
|
Ready for review again. I'm going to let the production CI fail until this gets pretty close to being ready to merge (and I think the doc CI will fail until inducer/grudge#280 goes in). |
|
The doc CI failures are one thing getting in the way of merging this into main at the moment. @matthiasdiener and I looked at this a couple of weeks ago, and IIRC the conclusion was that it seems to be pulling doc references from grudge main, not the multi-volume branch. Maybe there's a way to work around this? |
75aad74 to
3dfca1b
Compare
| make_fluid_state | ||
| ) | ||
| from logpyle import IntervalTimer, set_dt | ||
| from mirgecom.euler import extract_vars_for_logging |
There was a problem hiding this comment.
Should group this import above. There are a couple that need grouping.
Extracted out of #630. Depends on inducer/grudge#246 and inducer/meshmode#342.
Questions for the review @lukeolson:
dcoll,BoundaryDomainTag(from grudge multi-volume), adding a dof descriptordd, promoting the boundary tags.multiple-volumes-mpi.pyto check this off.u=xandu=yon vol 1 and 2, resp, to close this box: https://github.com/illinois-ceesd/mirgecom/pull/726/files#diff-a711e4a672e5ea17608d8536895c9a666557a0872b0b23b2e3f3809874898dfbR91