import sys import mdi use_mpi4py = False try: from mpi4py import MPI use_mpi4py = True except: pass # Initialize the MDI Library mdi.MDI_Init(sys.argv[2]) # Connect to the engine comm = mdi.MDI_Accept_communicator() # Determine the name of the engine mdi.MDI_Send_Command("