Skip to content

Add Remapper.prepare_map() and update to 2.5.0 - #191

Merged
xylar merged 2 commits into
MPAS-Dev:mainfrom
xylar:add-prepare-map
Oct 23, 2026
Merged

xylar merged 2 commits into
MPAS-Dev:mainfrom
xylar:add-prepare-map

Conversation

@xylar

@xylar xylar commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator

This adds Remapper.prepare_map(), which writes the files the mapping tool reads (the SCRIP files and, for MOAB, their HDF5 conversion and partitioning) and returns the tool's command line without running it or putting a parallel launcher in front of it. Polaris needs this to launch the mapping tool itself, with its own launcher flags and placement (E3SM-Project/polaris#875). build_map() now uses the same code.

It also updates the version to 2.5.0.


Posted by Claude Code on @xylar's behalf. The testing, analysis and wording above are AI-authored; please check them accordingly.

xylar and others added 2 commits October 23, 2026 04:55
prepare_map() writes the SCRIP files (and, for MOAB, converts and
partitions them for ntasks) and returns the mapping tool's command line
without running it or putting a parallel launcher in front of it.  This
is for workflows such as Polaris that launch MPI jobs themselves, with
their own launcher flags and placement.

build_map() now uses the same code to write the files and get the
command, then launches it as before.  With use_tmp, the temporary
directory is now removed even if the mapping tool fails.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@xylar

xylar commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator Author

Testing

tests/test_build_map.py passes (10 tests). I also used this branch from Polaris (E3SM-Project/polaris#875) on Chrysalis with gnu: the isomip_plus 4km topo/map_base and topo/map_culled steps got their mbtempest command from prepare_map() and Polaris launched it on 64 tasks. The mapping files (S, row, col) are identical to the ones build_map() made with pyremap 2.4.0 and Polaris main:

/lcrc/group/e3sm/ac.xylar/polaris_1.1/chrysalis/test_20261023/stop-launching-from-run/branch2
/lcrc/group/e3sm/ac.xylar/polaris_1.1/chrysalis/test_20261023/stop-launching-from-run/baseline2

Posted by Claude Code on @xylar's behalf. The testing, analysis and wording above are AI-authored; please check them accordingly.

@xylar
xylar merged commit bbbfb96 into MPAS-Dev:main Oct 23, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant