Difference between revisions of "Building on Windows"

From GridPACK
Jump to: navigation, search
Line 18: Line 18:
 
*** Do not install CMake.  
 
*** Do not install CMake.  
 
* [https://msdn.microsoft.com/en-us/library/windows/desktop/bb524831%28v=vs.85%29.aspx Microsoft MPI] <br/> This appears to be the only modern implementation available for Windows.  In the past, the OpenMPI and MPICH implementation were available for Windows, but no more.
 
* [https://msdn.microsoft.com/en-us/library/windows/desktop/bb524831%28v=vs.85%29.aspx Microsoft MPI] <br/> This appears to be the only modern implementation available for Windows.  In the past, the OpenMPI and MPICH implementation were available for Windows, but no more.
 +
* Some software to unpack <tt>.zip</tt>, <tt>.gz</tt>, and <tt>tar</tt> archives.  Commands to unpack all of these archives are available with Cygwin. Windows can handle  <tt>.zip</tt> archives natively.
 
* (optional) [https://www.microsoft.com/en-us/download/details.aspx?id=48215 MS-MPI Debugger Extension] is useful for debugging problem with parallel programs.
 
* (optional) [https://www.microsoft.com/en-us/download/details.aspx?id=48215 MS-MPI Debugger Extension] is useful for debugging problem with parallel programs.
* Choose a place to install libraries. <tt>C:\GridPACK</tt> is used in this case.
 
  
 
= Build Required Libraries =
 
= Build Required Libraries =
 +
 +
* In these instructions, everything is done from the Command Prompt.  Open a 64-bit Visual Studio command prompt, which should be available from the Start Menu.  Type, or copy and paste, the commands below into that command prompt window.
 +
* Choose a place to install libraries. <tt>C:\GridPACK</tt> is used in this case.  Avoid a path with spaces or special characters in it. 
 +
* Make a folder there in which source archives can be unpacked and the builds can be performed.  <tt>C:\GridPACK\src</tt> is used here.  Again, avoid a path with spaces or special characters in it.
 +
* Prepare prepare VS/CMake to use MPI:
 +
** enter the command
 +
    set msmpi
 +
** the response should be something like
 +
    MSMPI_BIN=C:\Program Files\Microsoft MPI\Bin\
 +
    MSMPI_INC=C:\Program Files (x86)\Microsoft SDKs\MPI\Include\
 +
    MSMPI_LIB32=C:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x86\
 +
    MSMPI_LIB64=C:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x64\
  
 
== Boost ==
 
== Boost ==

Revision as of 18:13, 6 December 2016

Building GridPACK on Windows is not for the faint of heart.

System Preparation

The following are available as native Windows applications and can just be installed in the normal Windows way:

  • Visual C++ in some form.
    • The "free" ones, Visual Studio Express and Community, should work.
  • Windows SDK
    Usually, this is just installed with Visual Studio
  • CMake is required
  • A minimal Cygwin installation is necessary.
    Cygwin is required to build, and test for, PETSc. If the system has a Cygwin installation that is being used, it would probably be best to make another installation for GridPACK installation exclusively.
    • Minimum required packages:
      • Base
      • Python
    • Rename /usr/bin/link.exe so it does not interfere with Windows LINK.EXE
    • If you want to use a Cygwin shell to build and/or debug GridPACK applications:
      • Do not install a compiler set.
      • Do not install CMake.
  • Microsoft MPI
    This appears to be the only modern implementation available for Windows. In the past, the OpenMPI and MPICH implementation were available for Windows, but no more.
  • Some software to unpack .zip, .gz, and tar archives. Commands to unpack all of these archives are available with Cygwin. Windows can handle .zip archives natively.
  • (optional) MS-MPI Debugger Extension is useful for debugging problem with parallel programs.

Build Required Libraries

  • In these instructions, everything is done from the Command Prompt. Open a 64-bit Visual Studio command prompt, which should be available from the Start Menu. Type, or copy and paste, the commands below into that command prompt window.
  • Choose a place to install libraries. C:\GridPACK is used in this case. Avoid a path with spaces or special characters in it.
  • Make a folder there in which source archives can be unpacked and the builds can be performed. C:\GridPACK\src is used here. Again, avoid a path with spaces or special characters in it.
  • Prepare prepare VS/CMake to use MPI:
    • enter the command
   set msmpi
    • the response should be something like
   MSMPI_BIN=C:\Program Files\Microsoft MPI\Bin\
   MSMPI_INC=C:\Program Files (x86)\Microsoft SDKs\MPI\Include\
   MSMPI_LIB32=C:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x86\
   MSMPI_LIB64=C:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x64\

Boost

BLAS/LAPACK (CLAPACK)

Some implementation of BLAS/LAPACK is required for PETSc and some other libraries. The implementation described here was chosen because it does not require a Fortran compiler. It is apparently really slow. It will probably be necessary to install Intel compilers and MKL in order to get improvement in speed. The Windows port of CLAPACK is described here.

  • Get the source here.
  • Configure, build, and install
   set prefix="C:\GridPACK"
   cmake -Wdev ^
       -G "Visual Studio 10 2010 Win64" ^
       -D CMAKE_INSTALL_PREFIX:PATH="%prefix%" ^
       ..
   cmake --build . --config Release
   cmake --build . --target install --config Release

SuiteSparse

PETSc

Global Arrays