Multicore Watershed Delineation
Since version 4.8.2 MapWindow adopted version 5 of the
TauDEM software. TauDEM,
Terrain Analysis Using Digital
Elevation Maps, is the main component of the MapWindow
Watershed
Delineation plugin.
TauDEM version 5 is designed for modern multicore architectures. A multicore CPU has more than one processor: 2, 4, even more. By
using an implementation of the Message Passing Interface (MPI),
TauDEM version 5 can take advantage of multiple cores, splitting tasks
between them, and speeding up calculations. It is also able to
process much bigger DEMs: up to 4GB.
The implementation of MPI used by TauDEM
is MPICH2 from the Argonne National Laboratory in the USA. MPICH2 is free, open
source software. It is a little
tricky to install on Windows, and not all users will need it, so the
approach adopted for MapWindow is as follows:
- By default MPICH2 is not installed. TauDEM will run without it, in
"single process" mode.
- You may obtain and install MPICH2, and we give some instructions
below. Then MapWindow will discover that MPICH2's program manager is
running, and will take advantage of it. There is no point in doing
this unless you have a multicore CPU, and probably not much unless you
have large DEMs. To give an example, on a dual-core machine I managed
to get a reduction of just over 30% on the 36 minutes need to
calculate the D8 flow directions for a DEM with 36 million cells. The
best number of processes for this calculation was 8.
Installing MPICH2
Note that you need to be an administrator to install MPICH2.
- Download the installer from the
MPICH2 web
site. The current stable release for MPICH2 is 1.4.1. It was released on Aug. 24th, 2011. It is almost
always advisable to choose the latest stable release. Get the 64-bit
version if you have a 64-bit machine.
- MPICH2 supports multi-process computations across several machines.
So you may get a Windows firewall query as to whether you want to
allow the MPICH2 program manager, smpd, access to networks. Since
TauDEM only runs multiple processes inside your machine you
may Keep Blocking access (Windows XP) or Cancel access
(Vista and Windows 7) (unless, of course, you are using MPICH2 for
other purposes for which it needs network access).
-
During installation you are asked for a secret word to be used
for security in inter-machine communication. Again, for TauDEM you are not
interested, so you can leave the default secret word of "behappy".
-
You need to add MPICH2's bin folder to your Path environment variable.
To do this, in Windows 7: select Start (the icon in the bottom left of
your screen) -> Computer -> Properties -> Advanced System Settings ->
Advanced -> Environment Variables -> Path (in System variables) -> Edit, and add ;C:\Program Files\MPICH2\Bin to the end of the Path. (The initial ";" is the separator between entries.)
In Windows XP, select Start -> right click on My Computer -> Properties -> Advanced -> Environment
Variables and then as in Windows 7.
-
You need to register a program mpiexec, supplying it with your
login password. To do this you need to start a command window in
administrator mode. In Windows 7, select Start -> All Programs -> Accessories,
right click on Command Prompt -> Run as Administrator. In Windows XP,
select Start -> All Programs -> Accessories -> Command Prompt.
Then use the
command
mpiexec -register
At the prompts supply your user name (or just hit Enter if the default
is you) and then provide and confirm your login password. You need an administrator account with a password!
-
The moment has come to check all is well. In the same command window, cd to
C:\Program Files\MPICH2\examples and try the command
mpiexec -n 2 cpi cpi is a small program for calculating π. As you can see, this
failed the first time for me. I tried smpd -install which reinstalled the MPICH2 program manager smpd, and then I was able
to run the cpi program with 2 processes.
Now it is ready for use with MapWindow: installation is complete.
- You can download some sample data from the TauDEM website:
Logan River Example Data
Cub River Example Data
TauDEM 5.0 Help File [CHM, 148 KB] — To activate the file: After downloading to your local disk, right click on the file and select Properties. At the bottom of the General Tab, click on the Unblock button.
Copyright (C) This page was created by Chris George and updated by Paul Meems