This post provides instructions on using the Microsoft HPC Pack 2008 SDK with Absoft Pro Fortran 11.0 and later.
The Microsoft HPC Pack 2008 SDK provides a Microsoft implementation of the Message Passing Interface that is based on MPICH2 from Argonne National Laboratory. While it is intended to be used in conjunction with the Microsoft HPC Server 2008, it is also suitable for MPI development on other versions of Microsoft's Windows operating system. The version of the Microsoft HPC Pack 2008 SDK used to produce these notes was obtained from Microsoft's Download Center. The SDK is available as both 32 bit and 64 bit Microsoft MSI installers.
INSTALL MICROSOFT HPC PACK 2008 SDK
Obtain and install the Microsoft HPC Pack 2008 SDK which is appropriate for your system. Both 32 and 64 bit versions are available from the Microsoft website. During installation, a directory named C:\Program Files\Microsoft HPC Pack 2008 SDK is created on your system, This directory contains the include files and libraries required for MPI development with Absoft Pro Fortran 11.0 and later.
CREATING THE ABSOFT SPECIFIC INCLUDE FILES
The FORTRAN include file mpif.h in the Microsoft HPC Pack 2008 SDK contains one line which uses a non standard FORTRAN language
construct which is not supported by the Absoft compiler. The solution to this is to create two local copies of the include file as follows:
1) Copy the file %CCP_INC%\mpif.h to %ABSOFT%\f90includes
2) Edit the %ABSOFT%\f90includes\mpif.h file and change line 208 to read PARAMETER (MPI_ADDRESS_KIND=4)
3) Copy the file %CCP_INC%\mpif.h to %ABSOFT%\f90includes64
4) Edit the %ABSOFT%\f90includes64\mpif.h file and change line 208 to read PARAMETER (MPI_ADDRESS_KIND=8)
COMPILING AND LINKING WITH THE MICROSOFT HPC PACK 2008 SDK
When compiling and linking Fortran MPI programs with the Microsoft HPC Pack 2008 SDK, you will need to add the appropriate DLL import libraries. For 32 bit development, the import libraries are %CCP_LIB32%\msmpifec.lib and %CCP_LIB32%\msmpi.lib. For 64 bit development, the import libraries are %CCP_LIB64%\msmpifec.lib and %CCP_LIB64%\msmpi.lib.
You can simplify your development by copying the DLL import libraries files into your Absoft Pro Fortran directory:
1. Copy the files msmpifec.lib and msmpi.lib from the %CCP_LIB32% directory to your Absoft lib directory.
2. Copy the files msmpifec.lib and msmpi.lib from the %CCP_LIB64% directory to your Absoft lib64 directory.
RUNNING MICROSOFT HPC PACK 2008 SDK EXECUTABLES
The Microsoft HPC Pack 2008 SDK MPI executive is:
C:\Program Files\Microsoft HPC Pack 2008 SDK\bin\mpiexec.exe
The path to this file is automatically added to your global command path during installation of the Microsoft HPC Pack 2008 SDK. You can run your MPI applications from the Absoft Development Command prompt by entering:
mpiexec.exe -n <number of processes> name_of_application