Difference between revisions of "Using the multi-model mechanism in Carpet"

From Einstein Toolkit Documentation
Jump to: navigation, search
(add Erik's email)
 
(fix subject of reference email given)
 
Line 1: Line 1:
This text was originally extracted from [http://cactuscode.org/pipermail/developers/2015-April/006360.html Running Cactus under Windows] to Cactus developers mailing list.
+
This text was originally extracted from [http://cactuscode.org/pipermail/developers/2015-April/006360.html multi-model code in Carpet] to Cactus developers mailing list.
  
 
To use the multi-model mechanism in <tt>Carpet</tt>:
 
To use the multi-model mechanism in <tt>Carpet</tt>:

Latest revision as of 13:53, 4 April 2018

This text was originally extracted from multi-model code in Carpet to Cactus developers mailing list.

To use the multi-model mechanism in Carpet:

  1. Arrange for mpirun to start the Cactus run with different parameter files for different MPI ranks. All MPI implementations I know of have a mechanism for this. You may or may not want to use different executables as well.
  2. In the parameter files, set the parameter Carpet::model to different strings.
  3. Carpet will then group all MPI ranks by this parameter's value, create a communicator for each of these, and start independent runs for each.
  4. So far, all you've done is starting several completely unrelated and independent simulations with one mpirun call.
  5. Carpet offers an aliased function GetMPICommUniverse that returns the original MPI communicator that allows all processes to communicate. (Compare with GetMPICommWorld.) Note that there is no implicit or implied synchronization between the different worlds; this is your responsibility.
  6. Thorn CactusNumerical/Slab has a mechanism for passing an MPI communicator that it should use, allowing you to transfer hyperslabs between worlds. Other thorns may be extended similarly if necessary.