HP-MPI Version 1.0 for Windows Release Note

HP-MPI V1.0 for Windows Release Note
Building Applications
29
Building Applications
Building an MPI application with Visual Studio and using the
property pages
To build an MPI application in C or C++ with VS2005, use the property pages provided by
HP-MPI to help link applications.
Two pages are included with HP-MPI, and are located at the installation location (MPI_ROOT)
in devtools\HPMPI.vsprops and HPMPI64.vsprops.
Go to VS Project, select View, select Property Manager and expand the project. This will
display the different configurations and platforms set up for builds. Include the appropriate
property page (HPMPI.vsprops for 32-bit apps, HPMPI64.vsprops for 64-bit apps) in the
Configuration/Platform section.
Select this page by either double-clicking the page or by right-clicking on the page and
selecting Properties. Go to the User Macros section. Set MPI_ROOT to the desired location
(i.e. the installation location of HP-MPI). This should be set to the default installation
location:
%ProgramFiles(x86)%\Hewlett-Packard\HP-MPI
NOTE This is the default location on 64-bit machines. The location for 32-bit machines
is %ProgramFiles%\Hewlett-Packard\HP-MPI
The MPI application can now be built with HP-MPI.
The property page sets the following fields automatically, but can also be set manually if the
property page provided is not used:
C/C++ — Additional Include Directories
Set to "%MPI_ROOT%\include\[32|64]"
Linker — Additional Dependencies
Set to libhpmpi32.lib or libhpmpi64.lib depending on the application.
Additional Library Directories
Set to "%MPI_ROOT%\lib"