# iMOD User Manual version 4.4 (html)

#### 2.3Installation of MPI software

iMOD 4.3 includes the Parallel Krylov Solver (PKS) package. The Parallel Krylov Solver (PKS) package facilitates running (large) iMOD models on Windows-based multi-core computers potentially resulting in a drastic reduction of runtimes. This package uses Message Passing Interface (MPI) software. Hence, prior to using the PKS-package MPI-software should be installed on your computer too.

##### 2.3.1Limitations

The PKS package was implemented for the 64-bit version of iMODFLOW (see Step 5), so the PKS package can be used on Windows-based multi-core 64-bit computer systems, for example on Windows-based laptops and desktops containing Intel CORE i5 or i7 processors or on Windows-based multi-core 64-bit supercomputers.

In iMOD 4.3 the LAK-, MNW-, PST-, SFR- and UZF-packages are not supported by the PKS-package; when an iMOD-model contains one or more of these package the single-core PCG-solver has to be used. So, the PKS-package can be used in combination with the remaining MODFLOW-packages implemented in iMOD; please note that the PKS package can also be used for iMOD models containing the MetaSWAP-concept; this potentially gives another boost to the speed of model simulations containing an iterative state-of-the-art coupling between the saturated and unsaturated zone.

##### 2.3.2Installation steps for the MPI software

The 64-bit iMODFLOW-executable uses the 64-bit MPICH (1.4.1p1) implementation for MPI, hence the following MPI software http://www.mpich.org/static/downloads/1.4.1p1/mpich2-1.4.1p1-win-x86-64.msi should be installed prior to using the PKS package.

Note: In order to install the MPI software correctly, you should do this as Administrator:

• • Open the Command Prompt as administrator by: Start $\rightarrow$ (Search programs and files) cmd $\rightarrow$ right mouse click $\rightarrow$ Run as administrator.

• • In the MS-DOS-box named Administrator: Command Prompt, if necessary, first go to proper drive, e.g. by typing:
D:
and pressing the Enter-key.

• • In the MS-DOS-box named Administrator: Command Prompt go the {installfolder}: omit the drive-letter and colon and precede {installfolder} with a backslash:
cd \{installfolder}, e.g. cd \iMOD

• • In the MS-DOS-box named Administrator: Command Prompt:
msiexec /i mpich2-1.4.1p1-win-x86-64.msi

• • Follow the instructions of the MPI-installer.

We included a general test-program that allows you to check whether the installation of the MPI-software was successful. To perform this check please do the following:

• • Go to your {installfolder}, e.g. to D:\iMOD.

• • Open the batch-file ’Run_test_mpi_installation.bat’ in an ascii-editor.

• • In line 2, adjust the reference to the folder and name of the installed MPI-executable, e.g.
set mpi "C:\Program Files\MPICH2\bin\mpiexec.exe"

• • Save the batch-file and close the ascii-editor.

• • Open a ’Windows Command Processor’-box.

• • Type ’Run_test_mpi_installation.bat’ and press Enter.

A test is performed using 2 cores; when the test is successful the following message appears:
echo of core 0
echo of core 1

and the ’Window Command Processer’-box should look similar to this:

##### 2.3.4Info on how to use the PKS-package

It is very easy to adapt existing (pre-iMOD 4.0)-runfiles (*.RUN) for the use of the PKS-package; for more info, see section ’Updating a runfile from iMOD 3.6 to iMOD 4.0’ in Section 10.20.7 of the iMOD User Manual.

The PKS-package can be configured in the ’Solver Settings’-tab of the ’Start Model Simulation’-window of the main menu option ’Tools’; for more info see the iMOD User Manual, Section 7.9.

Once the PKS-package has been configured, there are two ways to start a multi-core model simulation:

• 1. Inside the iMOD-GUI: see Section 7.9 (’Model Simulation’) of the iMOD User Manual.

• 2. Outside the iMOD-GUI by typing the appropriate command at the DOS-prompt in a ’Windows Command Processor’-box; here’s an example of how to start a multi-core model simulation from outside the iMOD-GUI by entering the following command in a ’Windows Command Processer’-box:

mpiexec.exe -localonly 2 iMODFLOW.exe iMODFLOW.run

In this example MPI launches two processes of iMODFLOW.exe instances on two computational cores, meaning that the model runs using two subdomains. The -localonly option ensures that you should not necessarily have to be connected to your network for running with MPI.
For more detailed info, see Section 10.21 (’Start Model Simulation’) of the iMOD User Manual.

Tutorial 6 (Section 11.6) contains an excercise on how to run your model using the PKS package.

You are now set to start iMOD; after completing this chapter new iMOD-users are encouraged to proceed with the tutorials (Chapter 11 of the iMOD User Manual). As a 3D-appetizer consider trying to run and visualize one of the pre-defined tutorial models: follow the steps as described in the next section.