HP-MPI User's Guide (11th Edition)

Getting started
Getting started using Windows
Chapter 232
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> "%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
Copyright Microsoft Corporation. All rights reserved.
/out:hello_world.exe
"/libpath:C:\Program Files (x86)\Hewlett-Packard\HP-MPI\lib"
/subsystem:console
libhpmpi64.lib
libmpio64.lib
hello_world.obj
Step 4. Create a new job requesting the number of CPUs to use. Resources are
not yet allocated, but the job is given a JOBID number which is printed
to stdout:
> job new /numprocessors:16
Job queued, ID: 4288
Step 5. Add a single-CPU mpirun task to the newly created job. Note that
mpirun will create more tasks filling the rest of the resources with the
compute ranks, resulting in a total of 16 compute ranks for this example: