Introduction

Here the details of the standard implementation of Mir interpreter are documented. The topics of installation, running and updating are covered.

Installation

Standard Mir interpreter is a command line program with supplementary files. For the installation you need to copy all the provided files into a directory, for example /opt/Mir in Linux or C:\Program Files\Mir in Windows. The path to this directory can be added to the PATH environment variable so that the Mir interpreter can be called just by typing mir in the command line.

If you want to run Mir in parallel using MPI [1], you have to install the required MPI packages. Mir supports several MPI implementations. For Linux version it is possible to use MPICH1 (already built in the respective libmirmpiw.so.XXX.mpich1 wrapper), MPICH3, OpenMPI2, OpenMPI3 and OpenMPI4. For FreeBSD currently only MPICH1 can be used. For Windows the MS-MPI version 10 can be used, which needs to be already installed. You can get it from https://www.microsoft.com/en-us/download/details.aspx?id=100593 or https://github.com/microsoft/Microsoft-MPI/releases Note, you need to install only msmpisetup.exe but not the SDK. Whatever version of Mir interpreter you use, the available MPI interfaces for this version can be found in the mirmpiw directory where Mir is installed. In this directory are located library files with endings in names, indicating for which particular MPI implementation they are created. For example, libmirmpiw.so.1.0.0.openmpi4 is for OpenMPI4. Libraries with the stub ending are just for the serial version of Mir. For using a particular version of MPI you need to copy (removing the specific ending) the respective libmirmpiw.XXX file to the lib (bin in Windows version) directory where Mir is installed. For example, for using MPICH1 version of Mir in Linux, you may need to copy mirmpiw/libmirmpiw.so.1.0.0.mpich1 to lib/libmirmpiw.so.1.0.0 (note, in your installation the particular version numbers can be different).

Updating

The easiest way to update Mir is to use run automatic script update.sh (for Linux, macOS and any other *NIX type system) or update.cmd (for Windows) located in the Mir installation directory. If this does to work or not suitable due to some reason then you can manually remove old files and copy new files from Mir installation archive.

Running

Mir interpreter can be started in interactive mode just be running mir without input file name. For obtaining information on command line arguments run

mir --help

Mir can be started in parallel MPI mode using --wrapper command line option, for example

mir --wrapper "mpirun -np 4"

In this example we start four MPI processes of the interpreter using the system-wide mpirun program. Ensure that the correct Mir MPI Wrapper library is used, which corresponds to the MPI implementation of this mpirun command. We can also specify the full path to the mpirun, as in the example for OpenMPI 4.1.0 below

mir --wrapper "/opt/openmpi-4.1.0/bin/mpirun -np 4"

Note, in this case you need to copy the respective libmirmpiw.so.*.openmpi4 library from the mirmpiw directory to the lib directory where Mir interpreter is installed. Also the corresponding libraries from the OpenMPI installation must be accessible by the loader. If not, the respective path can be indicated in the command line using the LD_LIBRARY_PATH environment variable, for example

LD_LIBRARY_PATH="/opt/openmpi-4.1.0/lib:$LD_LIBRARY_PATH" mir --wrapper "/opt/openmpi-4.1.0/bin/mpirun -np 4"

Several wrappers can be combined, for example rlwrap and mpirun can be used together as

mir --wrapper "rlwrap mpirun -np 4"

References

[1] Message Passing Interface Forum, “MPI: A Message-Passing Interface Standard Version 4.0.” https://www.mpi-forum.org/docs/mpi-4.0/mpi40-report.pdf , 2021.