We've Grown!

This compiler is just one component of the complete PToolsWin development environment. PToolsWin supports parallel applications with MPI and OpenMP in addition to serial applications. Please visit the PToolsWin page for the latest tools, downloads, and the information.

TAU and MinGW for Windows 64-bit with MPI

ParaTools has developed a system for porting and tuning parallel POSIX applications on Microsoft Windows 64-bit with Microsoft MPI. This system combines a customized MinGW-w64 distribution with the TAU Performance System and is ideal for porting high-performance applications from Linux/Unix environments to Windows Azure or your Windows-based cluster.

TAU is a portable profiling and tracing toolkit for performance analysis of parallel programs that can help you improve the performance of your application. For example, TAU will show you which routines are taking the longest to complete on any or all cluster nodes, or it can precisely measure the overhead of MPI communication in your application. The 64-bit MinGW cross compiler generates native Windows code that does not require an intermediate POSIX layer, so your application will perform as well as a native Windows application.

Microsoft Developer Platform Evangelism This work was sponsored by the Microsoft Developer and Platform Evangelism team.

Download

Install

$TOOLS_ROOT in these instructions is the installation destination. /opt is a good value for $TOOLS_ROOT for an "all users" installation, or $HOME/software is good for a "single user" installation.

MinGW-w64

This distribution of the MinGW-w64 cross compiler includes additional headers and libraries TAU needs for complete functionality. TAU can be used with a different MinGW distribution, but some TAU features may be disabled. We recommend you use this distribution, even if you already have a MinGW installation.

  1. Download the MinGW-w64 cross compiler

  2. Install the cross compiler package:
       1 mkdir -p $TOOLS_ROOT
       2 cd $TOOLS_ROOT
       3 tar xvjf /path/to/paratools-mingw32-w64-bin_x86_64-linux_20110831.tar.bz2
    
  3. Add the MinGW-w64 cross compiler to your path:
    • Borne Shell:
      export PATH=$PATH:$TOOLS_ROOT/mingw/bin
      
    • C Shell:
      setenv PATH $PATH:$TOOLS_ROOT/mingw/bin
      

Microsoft MPI

  1. On your Windows 64-bit machine:
    1. Install the free Microsoft HPC SDK

    2. Copy C:\Program Files\Microsoft HPC Pack 2008 SDK to a temporary location (e.g. D:\ms-hpc-2008-sp2)

    3. Copy C:\Windows\System32\msmpi.dll to D:\ms-hpc-2008-sp2\Lib\amd64

    4. Transfer D:\ms-hpc-2008-sp2 to $TOOLS_ROOT

  2. Execute these commands on your POSIX machine:
       1 cd $TOOLS_ROOT/ms-hpc-2008-sp2
       2 ln -s Include Inc
       3 cd Lib/amd64
       4 $TOOLS_ROOT/mingw/bin/gendef msmpi.dll
       5 x86_64-w64-mingw32-dlltool -d msmpi.def -l libmsmpi.a -D msmpi.dll
    
  3. Download this patch for Microsoft's mpi.h file to $TOOLS_ROOT

  4. Apply the patch:
       1 cd $TOOLS_ROOT/ms-hpc-2008-sp2
       2 gunzip -c $TOOLS_ROOT/paratools-v2-msmpi.patch.gz | patch -p0
    

TAU

  1. Download TAU and PDT from the TAU website

  2. Unpack TAU:
       1     cd $TOOLS_ROOT
       2     tar xvzf /path/to/tau2.tgz
    
  3. Unpack PDT:
       1 cd $TOOLS_ROOT
       2 tar xvzf /path/to/pdt.tgz
    
  4. Configure and install TAU:
       1 cd $TOOLS_ROOT/tau2
       2 ./configure \
       3     -c++=x86_64-w64-mingw32-g++ \
       4     -cc=x86_64-w64-mingw32-gcc \
       5     -pdt=$TOOLS_ROOT/pdtoolkit-3.17 \
       6     -pdt_c++=g++ \
       7     -bfd=$TOOLS_ROOT/mingw/binutils \
       8     -mpiinc=$TOOLS_ROOT/ms-hpc-2008-sp2/Include \
       9     -mpilib=$TOOLS_ROOT/ms-hpc-2008-sp2/Lib/amd64 \
      10     -mpilibrary=-lmsmpi \
      11     -tag=mingw-w64
      12 make install -j
    
  5. Add TAU to your path:
    • Borne Shell:
      export PATH=$PATH:$TOOLS_ROOT/tau2/x86_64/bin
      
    • C Shell:
      setenv PATH $PATH:$TOOLS_ROOT/tau2/x86_64/bin
      

Using TAU and the MinGW-w64 Cross Compiler

To instrument your application with TAU as you cross compile for Windows 64-bit, simply use the appropriate TAU compiler script and TAU makefile. For example, to instrument a C++ application use "tau_cxx.sh" as your compiler. The TAU_MAKEFILE environment variable will typically be set to $TOOLS_ROOT/tau2/x86_64/lib/Makefile.tau-mingw-w64-mpi-pdt. Please see the TAU documentation for more information.

To cross-compile your application for Windows 64-bit without TAU instrumentation, simply add the prefix "x86_64-w64-mingw32-" to your compiler name. For example, if your application builds with gcc and links statically with ar and ranlib, then replace "gcc" with "x86_64-w64-mingw32-gcc", "ar" with "x86_64-w64-mingw32-ar", and "ranlib" with "x86_64-w64-mingw32-ranlib" in your build scripts or makefiles.

Examples


Microsoft Developer Platform Evangelism