HP-MPI Version 1.1 for Windows Release Note
HP-MPI V1.1 for Windows Release Note
Building and running applications
35
> "%MPI_ROOT%\bin\mpicc" -mpi64 hello_world.c
NOTE Specify the bitness using -mpi64 or -mpi32 for mpicc to link in the
correct libraries. Verify you are in the correct 'bitness' compiler
window. Using -mpi64 in a Visual Studio 32-bit command window
will not work.
Step 3. Run the hello_world executable file:
> "%MPI_ROOT%\bin\mpirun" -np 4 hello_world.exe
where -np 4 specifies 4 as the number of processors to run.
Step 4. Analyze hello_world output.
HP-MPI prints the output from running the hello_world executable in
non-deterministic order. The following is an example of the output:
Hello world! I'm 1 of 4 on banach1
Hello world! I'm 3 of 4 on banach1
Hello world! I'm 0 of 4 on banach1
Hello world! I'm 2 of 4 on banach1
Building and running multihost on Windows CCS clusters
The following is an example of basic compilation and run steps to execute hello_world.c on
a cluster with 16-way parallelism. To build and run hello_world.c on a CCS cluster:
Step 1. Change to a writable directory on a mapped drive. The mapped drive should be to a
shared folder for the cluster.
Step 2. Open a Visual Studio command window. (This example uses a 64-bit version, so a
Visual Studio x64 command window is opened.)
Step 3. Compile the hello_world executable file:
X:\demo> set MPI_CC=cl
X:\demo> "%MPI_ROOT%\bin\mpicc" -mpi64 ^
"%MPI_ROOT%\help\hello_world.c"
Microsoft C/C++ Optimizing Compiler Version 14.00.50727.42 for x64
Copyright Microsoft Corporation. All rights reserved.
hello_world.c
Microsoft Incremental Linker Version 8.00.50727.42