HPCC Multi-processor Parallel Environments

The Wharton High-Performance Computing Cluster (HPCC) system is a powerful environment for running research code – code that may require a long run-time, a lot of memory, or numerous iterations. By default, research code on HPCC will run as a job with access to a single CPU core. However, by specifying a parallel environment, jobs can take advantage of more than one core, across nodes (MPI) or within the same node and shared memory (MP).

Let’s take a look at running a simple multiprocessing job with OpenMP.

Once logged into HPCC, the demo code can be copied to your home directory:

Take a look at the source code, in hello_openmp.c, for an idea of what’s actually going on. Essentially it’s a simple “hello world” program that will identify which processor cores the job’s threads of execution have touched.

Let’s compile the code and give it a try on four cores:

Once the job completes, we should have an output file in the current directory – HelloOMP.oXXXXXX – where the X’s are the job number. The output should look something like this:

*NOTE: This is not just for custom C code written with OpenMP! (E.g., Matlab has many functions that benefit from multithreaded computation. And Python uses optimize routines for its numpy/scipy modules.)

As a specialist in Linux and high-performance computing, Burris enjoys enabling faculty within The Wharton School of the University of Pennsylvania by providing effective research computing resources. Burris has been involved in research computing since 2001. Current projects find Burris working with HPC, big data, cloud computing and grid technologies. His favorite languages are Python and BASH. In his free time, he enjoys bad cinema, video editing, synthesizers and bicycling.