-
Notifications
You must be signed in to change notification settings - Fork 372
Online distributed graph partitioning using PT-Scotch #1364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
abishekg7
wants to merge
21
commits into
MPAS-Dev:develop
Choose a base branch
from
abishekg7:ptscotch_c_f
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PT-Scotch can be built with 64-bit integers or 32-bit integers. This is determined from build-time options and the generic integer type SCOTCH_Num covers either option. This commit replaces the type of certain integer variables, in the MPAS interface to PT-Scotch, to use SCOTCH_Num to remain consistent with the external library. Note that MPAS doesn't yet support 64-bit integers, and variables of type SCOTCH_Num are typecast into 32-bit integers in framework/mpas_block_decomp.F. And in order for MPAS to correctly work with PT-Scotch, PT-Scotch must not be built to use 64-bit integers.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR enables the use of MPAS atmosphere core without requiring any graph decomposition files specified as input, if the atmosphere core has been built with the Scotch graph partitioning library (built separately).
This PR supersedes #1348 to implement a Fortran interface to the PT-Scotch C library within MPAS.
Building MPAS with Scotch
Instructions to build Scotch are provided later in the description. Once Scotch has been installed, the MPAS atmosphere core can be leveraged to use online graph partitioning by setting the path to Scotch prior to building MPAS.
If MPAS is built/linked with Scotch successfully, you should see a message stating that at the end of the build output.
Usage and run-time behavior
After building MPAS with Scotch, you can still choose whether or not to use online graph partitioning by setting appropriate values for the
config_block_decomp_file_prefix
namelist option.If
config_block_decomp_file_prefix
+mpi_tasks
points to a valid graph decomp file that already exists in the run directory, then it is used to proceed with the model run without invoking Scotch.If
config_block_decomp_file_prefix==''
orconfig_block_decomp_file_prefix
+mpi_tasks
does not match any valid graph decomp file in the run directory, then Scotch graph partitioning is invoked. During this process, the generated partition is saved as a graph decomp file to the run directory so that it may be reused in the following runs without needing to invoke Scotch again.If MPAS has not been built with scotch, any code paths relating to Scotch will not be taken. And an incorrect specification of
config_block_decomp_file_prefix
+mpi_tasks
should lead to the model halting.Downloading and building Scotch
Scotch may be obtained from its gitlab repository or as tarballs from this link
Build instructions are on this page
It can be as simple as
To be able to use the distributed graph partitioning provided by PT-Scotch, you will need to pass an appropriate MPI installation path during the Scotch build.
Other system pre-requisites are Bison and Flex. I have observed that an older Flex version (v2.6.1) on Eris caused the Scotch build to fail. After pulling in a more recent version of Flex v2.6.4 it seemed to build fine. Scotch documentation also references the requirement for a Bison version > 3.4.