import numpy as np import sys import time import mui4py domain = sys.argv[1] # Configuration for the interfaces config1d = mui4py.Config(1, mui4py.FLOAT64) config2d = mui4py.Config(2, mui4py.FLOAT32) config3d = mui4py.Config(3, mui4py.FLOAT64) appcomm = mui4py.mpi_split_by_app() rank = appcomm.Get_rank() # Set up interfaces by type # 1D interfaces ifs = [] ifaces1d = mui4py.create_unifaces(domain, ifs, config1d) # 2D interfaces ifs = ["I1", "I2"] ifaces2d = mui4py.create_unifaces(domain, ifs, config2d) ifaces2d["I1"].set_data_types({ "data1": mui4py.FLOAT64, "data2": mui4py.STRING }) ifaces2d["I2"].set_data_types({"data": mui4py.INT64}) # 3D interfaces ifs = ["I3"] ifaces3d = mui4py.create_unifaces(domain, ifs, config3d)
import numpy as np import time import sys import mui4py domain = sys.argv[1] # Configuration for the interfaces config1d = mui4py.Config(1, mui4py.FLOAT64) config2d = mui4py.Config(2, mui4py.FLOAT32) config3d = mui4py.Config(3, mui4py.FLOAT64) appcomm = mui4py.mpi_split_by_app() rank = appcomm.Get_rank() # Set up interfaces by type # 1D interfaces ifs = ["I4"] ifaces1d = mui4py.create_unifaces(domain, ifs, config1d) ifaces1d["I4"].set_data_types({"data": mui4py.INT32}) # 2D interfaces ifs = [] ifaces2d = mui4py.create_unifaces(domain, ifs, config2d) # 3D interfaces ifs = [] ifaces3d = mui4py.create_unifaces(domain, ifs, config3d) # Join all interfaces under a single dict for convenience ifaces = {**ifaces1d, **ifaces2d, **ifaces3d} time.sleep(0.1) print ("Domain", domain + ",", "rank", rank, "connected to interfaces:", "\n\t1D:", list(ifaces1d.keys()),
#% @brief See README.md # """ from mpi4py import MPI import mpi4py import datetime import numpy as np import time import os # Include MUI header file and configure file import mui4py # Common world claims MPI_COMM_WORLD = mui4py.mpi_split_by_app() # Declare MPI ranks rank = MPI_COMM_WORLD.Get_rank() # Define MUI dimension dimensionMUI = 2 # Define the name of push/fetch values name_push = "coarseField" name_fetch = "fineField" # Define MUI push/fetch data types data_types_push = {name_push: mui4py.FLOAT64} data_types_fetch = {name_fetch: mui4py.FLOAT64}