Running AmberTools and Amber on Microsoft Windows

| General remarks | Installation on Windows using Cygwin |
| Installation of the native Windows version of PMEMD |
| PMEMD benchmarks | Return to Main Amber Page |

1. General remarks

Almost all of AmberTools and Amber (including the X-windows parts) will compile and run on Windows using the Cygwin development tools: see The cygwin package provides a way to make Microsoft Windows machines resemble a Linux/Unix environment; if you are unfamiliar with the Linux/Unix environment, you will need to learn the basics in order to use Amber on Windows: Search the web for "Unix Tutorial" which will find pages like this tutorial.

The bottom line is that the Windows version is fully functional, but the primary development and target operating system is Unix or Linux or Mac OSX. If you have to use a Windows machine, you should consider installing Linux on it using a virtual machine such as VirtualBox or the Windows-based Ubuntu Installer or on Windows 10 (Anniversary Edition) the Windows Subsystem for Linux.

Amber also has the (advanced) option to build and run certain executables outside the Cygwin environment, using Intel compilers. In particular, pmemd can be built both in serial and in parallel using Microsoft MPI for maximum performance under Windows Desktops and Windows HPC Clusters (see section 3, below). You should only try this after you are familiar with the cygwin installation and are sure you need faster execution. This Windows port was developed by Thorsten Wölfle, Andreas W. Götz and Ross C. Walker.


2. Installation on Windows using Cygwin

  1. Go to Install Cygwin. You might want to save the file (called "setup-x86.exe") on your desktop, since you will need to run this program again later on. Note: it is likely that the setup-x86_64.exe version for 64-bit Windows will also work fine, but we haven't yet tested this.

  2. Run (double-click) the setup-x86.exe program. When asked, it is in general safe to accept all the defaults. Choose a mirror that seems to be close to where you are.

    When you get to the selection of packages that can be installed for Cygwin you have to make sure to include the following programs/libraries:

    gcc-core, gcc-fortran, gcc-g++, make, m4, flex, diffutils, tcsh, util-linux, patch, xinit, libXt6, libXt-devel, libXext6, libXext-devel, zlib, zlib-devel, libbz2, libbz2-devel

    Notes about using setup: You should be seeing list of packages that can be installed. There is a button in the upper right corner, called "View" that cycles between various views of the optional packages. Click on it until you reach the "Full" view (indicated to the right of the "View" button). You should see a giant list of all individual packages (in alphabetical order). For most packages, the status column will say "skip", meaning that the package will not be installed. If you go to some package and click on the little arrows next to it, the "skip" label will change to a version number. (Clicking again and again on the arrows cycles between all the possibilities -- play with this a bit unitl you see how it works -- it's only intuitive after you've experimented a bit.) Look for the above-mentioned programs/libraries and make sure that they are selected for installation. Finally, press "Next" at the bottom to complete the installation.

  3. You will now have an icon called "Cygwin" on your desktop. If you double-click on that, you will get a text terminal (white text with a black background.) This is where you will type commands. (If you click on the top window bar, and select "properties", you can change the color scheme or the font size.)

  4. To run the xleap program, you will need to start up the X-window system by typing the command "xinit &". Then, set your display variable by typing "export DISPLAY=:0.0". After this, you can run xleap, which will show up in the X-display window. (Note that these instructions are for the Xorg 7.6 system that was released for cygwin in Oct., 2011).

  5. It's easiest to add the following lines to your .bashrc file in your home directory:

    export AMBERHOME=/home/username/amber12
    export PATH="$AMBERHOME/bin:$PATH"
    export DISPLAY=:0.0

    To edit files, you can install the "joe" or "nano" text editors using the setup program. A more advanced editor (installed by default) is "vi".

  6. You can now continue with the installation of Amber12 and AmberTools13, following the instructions in Chapter 1.2 of the AmberTools13 Reference Manual. Be sure to give the "-cygwin" option to configure.


3. Installation of the native Windows version of PMEMD

For maximum performance under Windows, Amber's pmemd program can now be built and run, both in serial and in parallel using Microsoft MPI, outside the Cygwin environment. The configuration step of the build process, however, still requires a Cygwin installation (see section 2 above). Once the native Windows executables of pmemd have been built, they can be executed on Windows machines that do not have Cygwin installed.


3.1 Prerequisites

To compile the native Windows version of pmemd on Windows Vista, Windows 7 or Windows HPC Cluster Server 2008 you have to install (in addition to Cygwin):
  1. Visual Studio 2008 (or later), optionally with the Intel C compiler.

  2. The download this from Steve Kemp's Homepage).
For building and installing the parallel version of pmemd you need to install in addition
  1. Intel Cluster Toolkit (for parallel builds, mpif90 ...).

  2. Microsoft HPC Pack 2008 SDK (provides MSMPI, mpiexec).
If you are running a cluster with Windows HPC Cluster Server 2008, you have to set it up according to the documentation provided by Microsoft. If you are going to run pmemd on a workstation and not a cluster of nodes connected to a server, you will typically be running under Windows Vista or Windows 7.


3.2 Installation of PMEMD

In order to build the native Windows version of pmemd you need to open both a Cygwin shell and a DOS shell which contains the Intel Fortran Build Environment (this DOS shell is included in the Intel Visual Fortran Compiler package). In what follows, every command that should be typed into the Cygwin and DOS shell is preceded by "CYGWIN>" and "DOS>", respectively.

Serial version

  1. Using the Cygwin shell, configure Amber for the native Windows installation:

    CYGWIN> cd $AMBERHOME/AmberTools/src
    CYGWIN> ./configure -windows intel

  2. Using the Fortran enabled DOS shell, you can now build pmemd:

    DOS> set PATH=C:\path_to_make;%PATH%

    (here, path_to_make.exe is the directory where you installed the GNU make executable)

    DOS> set AMBERHOME=C:\cygwin\home\name\amber12
    DOS> cd %AMBERHOME%\src
    DOS> make serial_win

    At this point the screen will fill up with compilation messages. Upon a successful build you will see the message "move pmemd.exe ..\..\..\bin" and "1 file(s) moved" close to the end of the output. Any error messages following this message can be safely ignored.

    Note that the pmemd executable which may have been built with Cygwin (see section 2 above) has now been overwritten with the native Windows executable.

  3. You can now test the installation of pmemd in the Cygwin shell (although the pmemd executable which you have just built does not require the Cygwin shell the test scripts rely on it) by typing:

    CYGWIN> cd $AMBERHOME/test
    CYGWIN> make test.serial.pmemd

    This will run a series of tests, most of which should say PASSED.

Parallel version

You are now ready to build the parallel native Windows version of pmemd.

  1. First, you have to configure the parallel version in the Cygwin shell:

    CYGWIN> cd $AMBERHOME/AmberTools/src
    CYGWIN> ./configure -mpi -windows intel

  2. Now you can build parallel pmemd in the Fortran enabled DOS shell. Please note that the DOS shell also needs to have the Intel Cluster Toolkit enabled. If this is not yet the case, you can enable it by typing (we assume that the Intel Cluster Toolkit is installed in the default installation directory):

    DOS> C:\Program Files (x86)\Intel\ICT\\ictvars

    For building parallel pmemd you have to type:

    DOS> cd %AMBERHOME%\src
    DOS> make clean
    DOS> make parallel_win

    At this point the screen will fill up with compilation messages. Upon a successful build you will see the message "move pmemd.MPI.exe ..\..\..\bin" and "1 file(s) moved" close to the end of the output. Any error messages following this message can be safely ignored.

  3. You can now test the installation of parallel pmemd in the Cygwin shell. At the time of writing, you need to first type the following:

    CYGWIN> rm exe
    CYGWIN> mv bin exe
    CYGWIN> ln -s exe bin

    (This needs to be done because Microsoft's mpiexec environment cannot follow symbolic links.)

    Now run the tests:

    CYGWIN> export DO_PARALLEL="mpiexec -n 4" (to run on 4 processors)
    CYGWIN> cd $AMBERHOME/test
    CYGWIN> make test.parallel.pmemd

    This will run a series of tests, most of which should say PASSED.