HP-MPI Version 1.2 for Windows Release Note

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 does not work.
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.
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
1.8.3 Building and Running Multihost on Windows HPCS 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 HPCS cluster:
1. Change to a writable directory on a mapped drive. Share the mapped drive to a folder for
the cluster.
2. Open a Visual Studio command window. (This example uses a 64-bit version, so a Visual
Studio x64 command window is opened.)
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
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
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 /exclusive:true
Job queued, ID: 4288
5. Add a single-CPU mpirun task to the newly created job. The mpirun job creates more tasks
filling the rest of the resources with the compute ranks, resulting in a total of 16 compute
ranks for this example:
> job add 4288 /numprocessors:1 /exclusive:true
/stdout:\\node\path\to\a\shared\file.out
/stderr:\\node\path\to\a\shared\file.err "%MPI_ROOT%\bin\mpirun"
-ccp \\node\path\to\hello_world.exe
26 HP-MPI V1.2 for Windows Release Note