Supercomputers

We currently operate three major systems:

  • Owens Cluster, a 23,000+ core Dell Intel Xeon machine available to clients later in 2016
  • Ruby Cluster, an 4800 core HP Intel Xeon machine
    • 20 nodes have Intel Xeon Phi accelerators
    • 20 nodes have Nvidia Tesla K40 GPUs
    • One node has 1 TB of RAM and 32 cores, for large SMP style jobs.
  • Oakley Cluster, an 8,300+ core HP Intel Xeon machineOakley computing cluster
    • One in every 10 nodes has 2 Nvidia Tesla GPU accelerators
    • One node has 1 TB of RAM and 32 cores, for large SMP style jobs

Our clusters share a common environment, and we have several guides available.

OSC also provides more than 2 PB of storage, and another 2 PB of tape backup.

  • Learn how that space is made available to users, and how to best utilize the resources, in our storage environment guide.

System Notices are available online.

Finally, you can keep up to date with any known issues on our systems (and the available workarounds). An archive of resolved issues can be found here.

Service: 

Oakley

TIP: Remember to check the menu to the right of the page for related pages with more information about Oakley's specifics.

Oakley is an HP-built, Intel® Xeon® processor-based supercomputer, featuring more cores (8,328) on half as many nodes (694) as the center’s former flagshipsystem, the IBM Opteron 1350 Glenn Cluster. The Oakley Cluster can achieve 88 teraflops, tech-speak for performing 88 trillion floating point operations per second, or, with acceleration from 128 NVIDIA® Tesla graphic processing units (GPUs), a total peak performance of just over 154 teraflops.

 

Hardware

Photo: OSC Oakley HP Intel Xeon ClusterDetailed system specifications:

  • 8,328 total cores
    • 12 cores/node  & 48 gigabytes of memory/node
  • Intel Xeon x5650 CPUs
  • HP SL390 G7 Nodes
  • 128 NVIDIA Tesla M2070 GPUs
  • 873 GB of local disk space in '/tmp'
  • QDR IB Interconnect
    • Low latency
    • High throughput
    • High quality-of-service.
  • Theoretical system peak performance
    • 88.6 teraflops
  • GPU acceleration
    • Additional 65.5 teraflops
  • Total peak performance
    • 154.1 teraflops
  • Memory Increase
    • Increases memory from 2.5 gigabytes per core to 4.0 gigabytes per core.
  • Storage Expansion
    • Adds 600 terabytes of DataDirect Networks Lustre storage for a total of nearly two petabytes of available disk storage.
  • System Efficiency
    • 1.5x the performance of former system at just 60 percent of current power consumption.

How to Connect

To connect to Oakley, ssh to oakley.osc.edu.

Batch Specifics

We have recently updated qsub to provide more information to clients about the job they just submitted, including both informational (NOTE) and ERROR messages. To better understand these messages, please visit the messages from qsub page.

Refer to the documentation for our batch environment to understand how to use PBS on OSC hardware. Some specifics you will need to know to create well-formed batch scripts:

  • Compute nodes on Oakley are 12 cores/processors per node (ppn). Parallel jobs must use ppn=12 .
  • If you need more than 48 GB of RAM per node, you may run on the 8 large memory (192 GB) nodes  on Oakley ("bigmem"). You can request a large memory node on Oakley by using the following directive in your batch script: nodes=XX:ppn=12:bigmem , where XX can be 1-8.

  • We have a single huge memory node ("hugemem"), with 1 TB of RAM and 32 cores. You can schedule this node by adding the following directive to your batch script: #PBS -l nodes=1:ppn=32 . This node is only for serial jobs, and can only have one job running on it at a time, so you must request the entire node to be scheduled on it. In addition, there is a walltime limit of 48 hours for jobs on this node.
Requesting less than 32 cores but a memory requirement greater than 192 GB will not schedule the 1 TB node! Just request nodes=1:ppn=32 with a walltime of 48 hours or less, and the scheduler will put you on the 1 TB node.
  • GPU jobs may request any number of cores and either 1 or 2 GPUs.  Request  2 GPUs per a node by adding the following directive to your batch script: #PBS -l nodes=1:ppn=12:gpus=2

Using OSC Resources

For more information about how to use OSC resources, please see our guide on batch processing at OSC. For specific information about modules and file storage, please see the Batch Execution Environment page.

Supercomputer: 
Service: 

Batch Limit Rules

Memory Limit:

It is strongly suggested to consider the memory use to the available per-core memory when users request OSC resources for their jobs. On Oakley, it equates to 4GB/core and 48GB/node.

If your job requests less than a full node ( ppn< 12), it may be scheduled on a node with other running jobs. In this case, your job is entitled to a memory allocation proportional to the number of cores requested (4GB/core).  For example, without any memory request ( mem=XX ), a job that requests  nodes=1:ppn=1  will be assigned one core and should use no more than 4GB of RAM, a job that requests  nodes=1:ppn=3  will be assigned 3 cores and should use no more than 12GB of RAM, and a job that requests  nodes=1:ppn=12  will be assigned the whole node (12 cores) with 48GB of RAM.  However, a job that requests  nodes=1:ppn=1,mem=12GB  will be assigned one core but have access to 12GB of RAM, and charged for 3 cores worth of Resource Units (RU).  See Charging for memory use for more details.

A multi-node job ( nodes>1 ) will be assigned the entire nodes with 48GB/node and charged for the entire nodes regardless of ppn request. For example, a job that requests nodes=10:ppn=1 will be charged for 10 whole nodes (12 cores/node*10 nodes, which is 120 cores worth of RU). A job that requests large-memory node ( nodes=XX:ppn=12:bigmem, XX can be 1-8) will be allocated the entire large-memory node with 192GB of RAM and charged for the whole node (12 cores worth of RU). A job that requests huge-memory node ( nodes=1:ppn=32 ) will be allocated the entire huge-memory node with 1TB of RAM and charged for the whole node (32 cores worth of RU).

To manage and monitor your memory usage, please refer to Out-of-Memory (OOM) or Excessive Memory Usage.

GPU Limit:

On Oakley, GPU jobs may request any number of cores and either 1 or 2 GPUs ( nodes=XX:ppn=XX: gpus=1 or gpus=2 ). The memory limit depends on the ppn request and follows the rules in Memory Limit.

Walltime Limit

Here are the queues available on Oakley:

NAME

MAX WALLTIME

MAX JOB SIZE

NOTES

Serial

168 hours

1 node

 

Longserial

336 hours

1 node

Restricted access

Parallel

96 hours

125 nodes

 

Longparallel

250 hours

230 nodes

Restricted access

Hugemem

48 hours

1 node

32 core with 1 TB RAM

nodes=1:ppn=32

Debug

1 hour

12 nodes

 

Job Limit

An individual user can have up to 128 concurrently running jobs and/or up to 1500 processors/cores in use. All the users in a particular group/project can among them have up to 192 concurrently running jobs and/or up to 1500 processors/cores in use. Jobs submitted in excess of these limits are queued but blocked by the scheduler until other jobs exit and free up resources.

A user may have no more than 1000 jobs submitted to both the parallel and serial job queue separately. Jobs submitted in excess of this limit will be rejected.

Supercomputer: 

Citation

To cite Oakley, please use the following Archival Resource Key:

ark:/19495/hpc0cvqn

Here is the citation in BibTeX format:

@misc{Oakley2012,
ark = {ark:/19495/hpc0cvqn},
howpublished = {\url{http://osc.edu/ark:/19495/hpc0cvqn}},
year  = {2012},
author = {Ohio Supercomputer Center},
title = {Oakley supercomputer}
}

And in EndNote format:

%0 Generic
%T Oakley supercomputer
%A Ohio Supercomputer Center
%R ark:/19495/hpc0cvqn
%U http://osc.edu/ark:/19495/hpc0cvqn
%D 2012

Here is an .ris file to better suit your needs. Please change the import option to .ris.

Documentation Attachment: 
Supercomputer: 

Queues and Reservations

Here are the queues available on Oakley. Please note that you will be routed to the appropriate queue based on your walltime and job size request.

Name Nodes available max walltime max job size notes

Serial

Available minus reservations

168 hours

1 node

 

Longserial

Available minus reservations

336 hours

1 node

Restricted access

Parallel

Available minus reservations

96 hours

125 nodes

 

Longparallel

Available minus reservations

250 hours

230 nodes

Restricted access

Hugemem

1

48 hours

1 node

 

"Available minus reservations" means all nodes in the cluster currently operational (this will fluctuate slightly), less the reservations listed below. To access one of the restricted queues, please contact OSC Help. Generally, access will only be granted to these queues if performance of the job cannot be improved, and job size cannot be reduced by splitting or checkpointing the job.

In addition, there are a few standing reservations.

Name Times Nodes Available Max Walltime Max job size notes
Debug 8AM-6PM Weekdays 12 1 hour 12 nodes For small interactive and test jobs.
GPU ALL 62 336 hours 62 nodes

Small jobs not requiring GPUs from the serial and parallel queues will backfill on this reservation.

OneTB ALL 1 48 hours 1 node Holds the 32 core, 1 TB RAM node aside for the hugemem queue.

 

Occasionally, reservations will be created for specific projects that will not be reflected in these tables.

Supercomputer: 
Service: 

Ruby

Ruby is unavailable for general access. Please follow this link to request access.
TIP: Remember to check the menu to the right of the page for related pages with more information about Ruby's specifics.

Ruby, named after the Ohio native actress Ruby Dee, is The Ohio Supercomputer Center's newest cluster.  An HP built, Intel® Xeon® processor-based supercomputer, Ruby provides almost the same amount of total computing power (~144 TF) as our former flagship system Oakley on less than half the number of nodes (240 nodes).  Ruby also features two distinct sets of hardware accelerators; 20 nodes are outfitted with NVIDIA® Tesla K40 and another 20 nodes feature Intel® Xeon® Phi coprocessors.

Hardware

Detailed system specifications:

  • 4800 total cores
    • 20 cores/node  & 64 gigabytes of memory/node
  • Intel Xeon E5 2670 V2 (Ivy Bridge) CPUs
  • HP SL250 Nodes
  • 20 Intel Xeon Phi 5110p coprocessors
  • 20 NVIDIA Tesla K40 GPUs
  • 2 NVIDIA Tesla K20X GPUs 
    • Both equiped on single "debug" queue node
  • 1 TB of local disk space in '/tmp'
  • FDR IB Interconnect
    • Low latency
    • High throughput
    • High quality-of-service.
  • Theoretical system peak performance
    • 96 teraflops
  • NVIDIA GPU performance
    • 28.6 additional teraflops
  • Intel Xeon Phi performance
    • 20 additional teraflops
  • Total peak performance
    • ~144 teraflops

Ruby has one huge memory node.

  • 32 cores (Intel Xeon E5 4640 CPUs)
  • 1 TB of memory
  • 483 GB of local disk space in '/tmp'

Ruby is configured with two login nodes.

  • Intel Xeon E5-2670 (Sandy Bridge) CPUs
  • 16 cores/node & 128 gigabytes of memory/node

Connecting

To login to Ruby at OSC, ssh to the following hostname:

ruby.osc.edu 

You can either use an ssh client application or execute ssh on the command line in a terminal window as follows:

ssh <username>@ruby.osc.edu

From there, you have access to the compilers and other software development tools. You can run programs interactively or through batch requests. See the following sections for details.

File Systems

Ruby accesses the same OSC mass storage environment as our other clusters. Therefore, users have the same home directory as on the Oakley and Glenn clusters. Full details of the storage environment are available in our storage environment guide.

Software Environment

The module system on Ruby is the same as on the Oakley system. Use  module load <package>  to add a software package to your environment. Use  module list  to see what modules are currently loaded and  module avail  to see the module that are available to load. To search for modules that may not be visible due to dependencies or conflicts, use  module spider . By default, you will have the batch scheduling software modules, the Intel compiler and an appropriate version of mvapich2 loaded.

You can keep up to on the software packages that have been made available on Ruby by viewing the Software by System page and selecting the Ruby system.

Understanding the Xeon Phi

Guidance on what the Phis are, how they can be utilized, and other general information can be found on our Ruby Phi FAQ.

Compiling for the Xeon Phis

For information on compiling for and running software on our Phi coprocessors, see our Phi Compiling Guide.

Batch Specifics

We have recently updated qsub to provide more information to clients about the job they just submitted, including both informational (NOTE) and ERROR messages. To better understand these messages, please visit the messages from qsub page.

Refer to the documentation for our batch environment to understand how to use PBS on OSC hardware. Some specifics you will need to know to create well-formed batch scripts:

  • Compute nodes on Ruby have 20 cores/processors per node (ppn).  
  • If you need more than 64 GB of RAM per node you may run on Ruby's huge memory node ("hugemem").  This node has four Intel Xeon E5-4640 CPUs (8 cores/CPU) for a total of 32 cores.  The node also has 1TB of RAM.  You can schedule this node by adding the following directive to your batch script: #PBS -l nodes=1:ppn=32 .  This node is only for serial jobs, and can only have one job running on it at a time, so you must request the entire node to be scheduled on it.  In addition, there is a walltime limit of 48 hours for jobs on this node.
  • 20 nodes on Ruby are equiped with a single NVIDIA Tesla K40 GPUs.  These nodes can be requested by adding gpus=1 to your nodes request, like so: #PBS -l nodes=1:ppn=20:gpus=1 .
    • By default a GPU is set to the Exclusive Process and Thread compute mode at the beginning of each job.  To request the GPU be set to Default compute mode, add default to your nodes request, like so: #PBS -l nodes=1:ppn=20:gpus=1:default .
  • Ruby has 5 debug nodes which are specifically configured for short (< 1 hour) debugging type work.  These nodes have a walltime limit of 1 hour.  These nodes are equiped with E5-2670 V1 CPUs with 16 cores per a node. 
    • To schedule a debug node:
      #PBS -l nodes=1:ppn=16 -q debug

Using OSC Resources

For more information about how to use OSC resources, please see our guide on batch processing at OSC. For specific information about modules and file storage, please see the Batch Execution Environment page.

 

Supercomputer: 
Service: 

Technical Specifications

The following are technical specifications for Ruby.  We hope these may be of use to the advanced user.

  Ruby System (2014)
Number oF nodes 240 nodes
Number of CPU Sockets 480 (2 sockets/node)
Number of CPU Cores 4800 (20 cores/node)
Cores per Node 20 cores/node
Local Disk Space per Node ~800GB in /tmp, SATA
Compute CPU Specifications

Intel Xeon E5-2670 V2

  • 2.5 GHz 
  • 10 cores per processor
Computer Server Specifications

200 HP SL230

40 HP SL250 (for accelerator nodes)

Accelerator Specifications

20 NVIDIA Tesla K40 

  • 1.43 TF peak double-precision performance
  • 1 GK110B GPU 
  • 2880 CUDA cores
  • 12GB memory

20 Intel Xeon Phi 5110p 

  • 1.011 TF peak performance
  • 60 cores
  • 1.053 GHz
  • 8GB memory
Number of accelerator Nodes

40 total 

  • 20 Xeon Phi equiped nodes
  • 20 NVIDIA Tesla K40 equiped nodes
Total Memory ~16TB
Memory Per Node

64GB

Memory Per Core 3.2GB
Interconnect  FDR/EN Infiniband (56 Gbps)
Login Specifications

2 Intel Xeon E5-2670

  • 2.6 GHz
  • 16 cores
  • 132GB memory
Special Nodes

Huge Memory (1)

  • Dell PowerEdge R820 Server
  • 4 Intel Xeon E5-4640 CPUs
    • 2.4 GHz
  • 32 cores (8 cores/CPU)
  • 1 TB Memory

 

Supercomputer: 

Programming Environment

Compilers

C, C++ and Fortran are supported on the Ruby cluster. Intel, PGI and GNU compiler suites are available. The Intel development tool chain is loaded by default. Compiler commands and recommended options for serial programs are listed in the table below. See also our compilation guide.

LANGUAGE INTEL EXAMPLE PGI EXAMPLE GNU EXAMPLE
C icc -O2 -xHost hello.c pgcc -fast hello.c gcc -O2 -march=native hello.c
Fortran 90 ifort -O2 -xHost hello.f90 pgf90 -fast hello.f90 gfortran -O2 -march=native hello.f90

Parallel Programming

MPI

The system uses the MVAPICH2 implementation of the Message Passing Interface (MPI), optimized for the high-speed Infiniband interconnect. MPI is a standard library for performing parallel processing using a distributed-memory model. For more information on building your MPI codes, please visit the MPI Library documentation.

Ruby uses a different version of mpiexec than Oakley or Glenn. This is necessary because of changes in Torque. All OSC systems use the mpiexec command, but the underlying code on Ruby is mpiexec.hydra while the code on Oakley and Glenn was developed at OSC. They are largely compatible, but a few differences should be noted.

Caution: There are many variations on mpiexec and mpiexec.hydra. Information found on non-OSC websites may not be applicable to our installation.
Note: Oakley has been updated to use the same mpiexec as Ruby.

The table below shows some commonly used options. Use mpiexec -help for more information.

OAKLEY (old) RUBY COMMENT
mpiexec mpiexec Same command on both systems
mpiexec a.out mpiexec ./a.out Program must be in path on Ruby, not necessary on Oakley.
-pernode -ppn 1 One process per node
-npernode procs -ppn procs procs processes per node
-n totalprocs
-np totalprocs
-n totalprocs
-np totalprocs
At most totalprocs processes per node (same on both systems)
-comm none   Omit for simple cases. If using $MPIEXEC_RANK, consider using pbsdsh with $PBS_VNODENUM.
-comm anything_else   Omit. Ignored on Oakley, will fail on Ruby.
  -prepend-rank Prepend rank to output
-help -help Get a list of available options

mpiexec will normally spawn one MPI process per CPU core requested in a batch job. The -pernode option is not supported by mpiexec on Ruby, instead use -ppn 1 as mentioned in the table above.

OpenMP

The Intel, PGI and gnu compilers understand the OpenMP set of directives, which give the programmer a finer control over the parallelization. For more information on building OpenMP codes on OSC systems, please visit the OpenMP documentation.

GPU and Phi Programming

To request the GPU node on Ruby, use nodes=1:ppn=20:gpus=1. For GPU programming with CUDA, please refer to CUDA documentation. Also refer to the page of each software to check whether it is GPU enabled.

To request the Xeon Phi (MIC) node on Ruby, use nodes=1:ppn=20:mics=1. For Phi programming, please refer to Ruby Phi FAQ and Phi Compiling Guide

Supercomputer: 
Service: 

Phi Compiling Guide

This document was created to guide users through the compiling and execution of programs for Ruby's Phi coprocessors.  It is not intended to help determine which of the Phi usage models to use.  No special actions are needed for programs running exclusively on the host  For more general information on Ruby and its Phi coprocessors see our Ruby FAQ page.  Only Fortran, C, and C++ code can be compiled to run on the Phi coprocessors.  Code to be run on Ruby or the Xeon Phi coprocessors should be compiled on Ruby.

The Ruby login nodes do not have Phi coprocessors.  To get access to to a Phi coprocessor you will need to submit a job requesting a Phi coprocessor .  For debugging and short interactive work you can submit a job to the debug queue which has Phi equiped nodes.

The Intel Xeon Phi accelerators are referred to as "Phis", and the Intel Xeon CPU as "Host" for this guide

All Usage Models

Users compiling for Ruby should ensure they have the newest version of the Intel Compilers loaded.

Intel compiler suite version 15.0.0 can be loaded with the command:

module load intel/15.0.0

A list of the Intel compiler suite versions available can be seen with:

module spider intel

General Performance Considerations

  • Code should be parallelized.  Due to the simplified architecture of the Phi, serial code run on the Phi will usually be slower than the same serial code run on the host Xeon CPU.  Only through parallel computation can the Phi's power be fully utilized.  
  • Code should be vectorized.  Vectorization is the unrolling of a loop so that one operation can be performed on multiple pairs of operands at once.  The Phi has extra-wide vector units compared to a CPU, increasing the importance of vectorization for performance.
Performance increases due to threading and vectorization
Chart showing the importance of vectorization and multi-threading (Image courtesy Intel)

 

Native Mode

This is the simplest usage model for running code on the Xeon Phi coprocessors.  Code is compiled on the host to be run exclusively on the Phi coprocessor.

To compile an application for the native usage model, use the -mmic compiler flag:

icc -O3 -mmic helloWorld.c -o helloWorld.out

Home directories (rooted at /nfs) are mounted to the Phis, so as long as your application resides within there you do not need to copy it over to the Phi.

You can start your application on the Phi remotely from the host using the following syntax:

ssh mic0-$(hostname) ~/helloWorld.out
Hello World

Make sure to replace the Phi hostname and application path and name with your own.

If your application requires any shared libraries, make sure they are both in a location accessible from the Phi and specified on the Phi.  Shared locations include all home directories located on /nfs.  You can also copy any necessary libraries over to the Phi's /tmp folder.  

The Phi's have a minimal environment to start with.  If you require a LD_LIBRARY_PATH (or any other environment variables)  for your application you will need to manually set it on the Phis.  If you copied your necessary library files to /tmp, you could do the following from the Phi:

export LD_LIBRARY_PATH=/tmp

To check what environment variables the Phi comes with, run the following from the host:

ssh mic0-$(hostname) env

MPI Usage

MVAPICH2 can be used within natively compiled code to spawn MPI tasks exclusively on the Phi.  The only additional steps required are the setting of the environment variable I_MPI_MIC to 1 at runtime and making sure your processes are launched on the Phi.

Setting I_MPI_MIC to 1 at runtime enables the MPI library on the host to recognize and work with the Phi:

export I_MPI_MIC=1 

Making sure your processes are executed on the Phi is as simple as specifying to mpiexec to launch on the Phi.  Note the use of mpiexec.hydra, not mpiexec:

mpiexec.hydra -host mic0 -n 16 /tmp/MPI_prog.out

An alternative is to ssh to the Phi and launch mpiexec from there:

mpiexec.hydra -n 16 /tmp/MPI_prog.out

Important performance considerations:

  • Data should be aligned to 64 Bytes (512 bits)
  • Due to the large SIMD width of 64 Bytes, vectorization is crucial
  • Use the -qopt-report compiler flag (versions 15+) to generate vectorization reports to see whether loops have been vectorizied for the Phi architecture
    • If vectorized, messages will read "*MIC* Loop was vectorized" or similar

 

Intel MKL Automatic Offload (AO)

Some Intel MKL functions are Automatic Offload capable; if the library call is made after automatic offloading has been enabled, MKL will automatically decide at runtime whether or not to offload some or all of the calls to the Phi.  This decision is based upon the problem size, load on the processors, and other metrics.  This offloading is completely transparent to the user, and no special compiler options are needed.  If the Phi is not available for any reason, MKL functions will fall back to executing on the host.

Automatic Offload enabled functions

The following Level-3 BLAS functions and LAPACK functions are AO-enabled as of the latest MKL version 11.1, available on Ruby:

  • *GEMM, *SYMM, *TRMM, and *TRSM
  • LU, QR, Cholesky factorizations

* (asterisk) is a wildcard specifying all data types (S, D, C, and Z).

Enabling and Disabling Automatic Offload

Automatic Offload can be both enabled and disabled through the setting of an environment variable or the call of a support function.  Compiler pragmas are not needed -- users can compile and link code the usual way.

To enable AO in FORTRAN or C code:

rc = mkl_mic_enable()

Alternatively, to enable AO through an environment variable:

export MKL_MIC_ENABLE=1

 

To disable AO in FORTRAN or C code:

rc = mkl_mic_disable()

Alternatively, to disable AO through an environment variable:

export MKL_MIC_ENABLE=0

Using Automatic Offload and Compiler Assisted Offload in the same program

The Intel MKL library supports the use of both Automatic Offload and Compiler Assisted Offload in the same program.  When doing so, users need to explicitly specify work division for AO aware functions using support functions or environment variables.  By default, if the work division is not specified, all work will be done on the host.  

Force execution failure if offload not available

Intel MKL will default to running computations on the host if the Phi is not available for any reason.  Whether or not computations were offloaded to the Phi will not be apparent to the user.  To force execution to fail if the offload fails, use the following command to set the proper environment variable:

export MKL_MIC_DISABLE_HOST_FALLBACK=1

Setting this will cause programs to exit with the error message "Could not enable Automatic Offload" if an offload attempt fails.

Generate offload report

By default, automatic offload operations are transparent to the user; whether or not work was offloaded and how much of that work was offloaded will not be apparent to the user.  To allow users to examine these details, MKL can generate an offload report at runtime.  The environment variable OFFLOAD_REPORT needs to be set to 1 or 2 before runtime to do this.

export OFFLOAD_REPORT=1

Setting OFFLOAD_REPORT to 0 (or not setting it) results in no offload report.

Setting OFFLOAD_REPORT to 1 results in a report including:

  • Name of function called
  • Effective Work Division
  • Time spent on Host during call
  • Time spent on each available Phi coprocessor during call

Setting OFFLOAD_REPORT to 2 results in a report including everything from 1, and in addition:

  • Amount of data transferred to and from each Phi during call

Important performance considerations:

  • Automatic offload performs best on large, square matrices

For more information on using the Intel MKL automatic offload feature, refer to Intel's guide on the subject.

 

Compiler Assisted Offload (CAO)

In Compiler Assisted Offload, pragmas, also known as directives, are added to the code specifying sections of that code to offload their execution to the Phis.  These offload regions do not require any special coding considerations, and can utilize OpenMP and Intel Clik programming models.  When the compiler reaches an offload pragma, it generates code for both the host and the Phi.  The resulting executable consists of code for both the host and the Phi.

Currently, the Intel compiler supports Intel's Language Extensions for Offload (LEO) for markup.  It is expected version 4.0 of the OpenMP standard will include offload directives for the Phi coprocessors as well.

Adding offload directives

The primary step in preparing code for CAO is to add directives specifying when and how to offload code to the Phi.  Here is a basic example of what these offload directives look like in C:

int main(){
...
    //offload code
    #pragma offload target(mic)
    {
        //parallelisms via OpenMP on the MIC
        #pragma omp parallel for
        for( i = 0; i < k; i++ ){
            for( j = 0; i < k; j++ ){
                a[i] = tan(b[j]) + cos(c[j]);
            }
        } //end OpenMP section
    } //end offload section
...
}

..and the same example in Fortran:

program main
...
!dir$ offload begin target(mic)
!$omp parallel do
do i = 1,K
    do j = 1,K
        a(i) = tan(b(j)) + cos(c(j))
    end do
end do
!dir$ end offload
...
end program
   

Specifiers can be added to specify the target Phi (useful for when multiple Phis are available) and to control the flow of data to and from the Phi.  An example of these specifiers in C:

#pragma offload target(mic:0) inout(a) in(b,c)

This directive is specifying:

  • This section of code be offloaded to a specific Phi coprocessor, in this case 0.
  • The inout specifier defines a variable be both copied to the Phi and back to the host.
  • The in specifier defines a variable as strictly input to the coprocessor.  The value is not coped back to the host

For more information on directives and additional specifiers refer to Intel's Effective Use of the Intel Compiler's Offload Features.

Compilation

No additional steps are required at the compile or link stage.  

Execution

No special steps are required at runtime; offload of specified sections of code and data transfers are automatically handled.

Controlling Offload with Environment Variables

Environment variables can be used to affect the way the offload runtime library operates.  These environment variables are prefixed with either "MIC_" or "OFFLOAD_".  Listed below are some commonly used environment variables:

MIC_LD_LIBRARY_PATH

Sets the path where shared libraries needed by the MIC offloaded code reside.

OFFLOAD_REPORT

When set to 1 or 2, offload details are printed to standard out, with 2 including details of data transfers.

OFFLOAD_DEVICES

Restricts the process to only use the specified Phis.  Multiple Phis can be specified using commas.

MIC_ENV_PREFIX

By default, all environment variables defined on the host are replicated to the coprocessors execution environment when an offload occurs.  This behavior can be modified by defining this environment variable.  When defined, only environment variables on the host prefixed with MIC_ENV_PREFIX's value are passed on to the Phi.  The passed environment variables are set on the Phi with the prefix stripped.  This is particularly valuable for controlling OpenMP, MPI, and Intel Clik environment variables. 

Setting MIC_ENV_PREFIX has no effect on the fixed MIC_* environment variables such as MIC_LD_LIBARAY_PATH.

MPI

While calling MPI functions within offload regions is not supported, offloading within a MPI program is supported by the Intel MPI library.  When offloading, however, no attempt is made to coordinate the Phi's resource usage amongst the MPI ranks.  If 12 MPI ranks running on the host all offload 8 threads to the Phi, all of these threads will be spawned on the first 8 cores of the Phi.  As can be seen, this can quickly lead to resource conflicts.  A performance penalty is also incurred when multiple ranks offload simultaneously to a single Phi.  

Mitigating these issues is beyond the scope of this guide; please refer to Using MPI and Xeon Phi Offload Together for more information.

For more detailed information on programming for the CAO model please refer to Intel's Effective Use of the Intel Compiler's Offload Features.

 

Symmetric/Heterogeneous Offload

Called both Symmetric and Heterogeneous offloading, this programming model treats the Phi as simply another node in a heterogeneous cluster.  MPI ranks are spawned on both the host and Phi.  Because the Phi cannot run a executable compiled for the host, two separate executables need to be prepared.  Getting these separate executables to run from the same mpiexec.hydra call requires adding a prefix or postfix to the Phi executables name and setting the respective environment variable.

Setup

Remember to source both the compilervars and mpivars files before starting as outlined in the all usage models section above.

Make sure to have your desired implementation loaded before compilation.  We recommend using the MVAPICH2 MPI implementation that is loaded by default.

Compilation

Executables must be compiled for both the host and Phi separately. You must use the Intel compiler and the Intel MPI implementation.  To compile the phi executable, include the -mmic flag at compilation.  No special considerations are required for the host executable.

# Create host executable
mpicc helloworld.c -o helloworld.out

# Create Phi executable
mpicc -mmic helloworld.c -o helloworld.out.mic

Execution

Make sure to have your chosen MPI implementation module loaded at runtime.

Once in a job, first, create a MPI hosts file containing the hosts to run on on separate lines:

-Bash-4.1$ cat mpi_hosts
r0001
mic0-r0001

Notice that mic# goes before the Xeon hostname, separated by a hyphen.  In this case we will target both one Xeon CPU and one Phi coprocessor.

Then set I_MPI_MIC to 1 so the MPI library on the host recognizes and works with the Phi:

export I_MPI_MIC=1 

Next, let MPI know how you identify your Phi executable in comparison to your host executable.  In our case we used the postfix .micto identify our Phi executable and thus we will need to set I_MPI_MIC_PREFIX.

export I_MPI_MIC_POSTFIX=.mic

Alternatively a prefix can be used.  The prefix option enables Phi specific executables to be stored in a separate directory.

Finally, from the host start the program up. Note the use of mpiexec.hydra, not mpiexec.

mpiexec.hydra -f mpi_hosts -pernost 1 -n 2 helloworld.out

 

MPI

Coming soon.

 

 

Supercomputer: 

Ruby Phi FAQ

The Ruby cluster is composed of both standard Intel Xeon CPUs as well as new Xeon Phi coprocessors.  Special considerations must be taken both when compiling for and running software on the Phi coprocessors.  This guide provides general information on the Phi coprocessors and breaks down the different types of programming models available for them.  For detailed information on compiling software for our Phis, please refer to our Phi Compiling Guide

 

The Intel Xeon Phi coprocessors are referred to as "Phis", and the Intel Xeon CPU as "Host". 

What are the Xeon Phi coprocessors?

The Xeon Phi coprocessors (commonly referred to as both accelerators and MICs) can be thought of as complementary add-ons to Ruby's standard Xeon Host CPUs.  Much like the GPU accelerators available on Oakley and Glenn, they are used to increase performance by providing a specialized computational environment optimized for certain operations.  For certain operations, the Phis will be orders of magnitude faster than the same operation run on the CPU.  

How are the Phi coprocessors different than GPUs?

The goal of each is to do the same thing, but how they do this differs.  Xeon Phis run Intel assembly code similar to that of the Xeon Host CPUs.  By simply recompiling source code for the Phi, most programs can greatly benefit.  On the other hand, GPUs traditionally run their own proprietary code, requiring programs to be tediously tailored for these specific GPUs before they can be compiled and run. 

 

Should I use the Phis?

Short answer: If you are going to run your code on Ruby, yes.  Getting code to run on the Phis can be such a simple process and result in significant gains that there is little reason not to.  

For more help on determining whether to use the Phi, refer to Intel's guide on the subject.

You do not have to take advantage of the Phis to run code on Ruby. 

 

How can I use the Phis?

There are three main ways of taking advantage of the Phi's computing power:

  1. Native Execution

    • Compile binary for Phi ONLY
    • Done with -mmic compiler flag
    • SSH to Phi and then run
    • Good for getting familiar with Phi characteristics
    • Host sits idly during code execution
  2. Symmetric/Heterogeneous Execution (Using MPI)

    • Compile and run code on both Host and Phi
    • Both the Host and the Phi operate "symmetrically" as MPI targets
    • Requires careful load balancing between MPI tasks due to differences between Host and Phi (as well as OpenMP threads if taking the hybrid approach)
  3. Offload Execution

    • Automatic Offload (AO) with Intel Math Kernel Library (MKL)
      • Some MKL routines are automatically offloaded to Phi when code is run on the Host
      • Does not require any changes to code -- completely transparent to the user
      • MKL determines if computation will benefit from offloading
    • Compiler Assisted Offloading (CAO)
      • Add offload directives/pragmas to parts of code you want offloaded
      • If the Phi is unavailable for any reason, code defaults back to running on the Host
      • Two programming sub-models differing on data movement
        1. Explicit - Code directs data movement to/from Phi 
          • Only supports arrays of scalar or bitwise copyable structure or class.  For more complex C/C++ data types, use implicit model
          • Uses #pragma offload construct
        2. Implicit - Code establishes virtual "shared memory" model, data is synchronized automatically between Host and Phi at established points
          • only available for C/C++
          • appropriate for complex, pointer-based data structure (linked lists, binary trees, etc.)
          • Uses _Cilk_shared and _Cilk_offload constructs
          • Not appropriate for very large data

What programming languages can you use for the Phis?

Only code compiled from C/C++ and Fortran can be run on the Phis.

Can I still use X for parallel programming?

The Phis have available most parallel programming options available on the Host.  Specifically, the Phis are known to support the following:

  • MVAPICH2 (OSC's recommended MPI library)
  • OpenMP
  • ​Intel Cilk Plus
  • pthreads
  • Intel Threading Building Blocks (Intel TBB)

What sections of code should I offload? (CAO only)

Highly-parallel sections of code are good candidates for offload.  Serial code offloaded will run much slower than on the Host.

Data transfers between the Phi and Host must also be taken into consideration when choosing sections of code to offload. Data transfers are slow and should be minimized.  If two offloaded parallel sections of code have a serial section between them and they all act on the same data, it may be more efficient to offload the serial section as well.  This eliminates the need to transfer the data back to the Host, run the serial section, and then transfer this data back to the Phi.

 

How do I run code on the Phis?

MKL, OpenMP, or MPI based programs

To run a MKL, OpenMP, or MPI based program on the Phis, some libraries may need to be copied over.  

 

How do I set up environment variables on the Phi?

By default, all environment variables set on the Host are passed to the Phi.  This behavior can be over-ridden by setting the MIC_ENV_PREFIX to a string.  Then, only environment variables prefixed by this string will then be passed to the Phi's environment.

For example, setting MIC_ENV_PREFIX to PHI would cause only environment variables prefixed with PHI to be passed (PHI_PATH, PHI_LIBRARY, etc.).

MIC_LD_LIBRARY_PATH is not stripped and passed to the Phi, and thus MIC_ENV_PREFIX=MIC will not work to change the Phi's LD_LIBRARY_PATH

See Intel's Setting Environment Variables on the CPU to Modify the Coprocessor's Execution Environment for more information on passing and setting environment variables.

 

Supercomputer: 

Using the Intel Xeon Phi on Ruby

Introduction

Twenty of the new Ruby nodes have an Intel Xeon Phi coprocessor.  Some of the older debug nodes do as well.  This guide explains how to build and run code for the Phi on Ruby.  It does not discuss programming techniques or performance issues.

For background information on the Xeon Phi and techniques for using the Phi efficiently, the following references may be useful: 

The Xeon Phis are somewhat difficult to configure and use. Information that you find in documents from Intel or other sources, particularly TACC, may need modification to work at OSC. Here’s a guide to what you can use directly and what needs to be adapted for Ruby.

  • Information that’s the same everywhere: Xeon Phi architecture, capabilities, programming advice, compiling and linking, overviews of usage modes, environment variables
  • Information that’s overridden by this guide for Ruby: Batch system usage, accessing the Phi, setting up the host environment, running programs on the Phi, file management, some MPI information

Several examples have been created to illustrate various Phi usage models. Code for the examples is available on Ruby. Detailed instructions are included below for building and running them.

Accessing the Xeon Phi Nodes on Ruby

The Phis are accessed through the batch system with either an interactive or a regular job. You must add “:mics=1” to your “nodes” request. A few of the debug nodes have 2 mics.

Some examples:

#PBS -l nodes=4:ppn=20:mics=1
qsub -l nodes=1:ppn=20:mics=1
qsub -I -l nodes=1:ppn=16:mics=1 -q debug
qsub -I -l nodes=1:ppn=16:mics=2 -q debug

Your job executes on the Xeon processor. You can use the Xeon Phi through one of the programming models described below.

Note: Use mvapich2 for MPI usage on the Xeon Phis on Ruby.

Programming Models for the Xeon Phi

The Intel Xeon Phi is a coprocessor, or accelerator, that can be attached to an Intel Xeon processor, which is referred to as the host. The Phi is also known as a Many-Integrated-Core processor, or MIC, pronounced “Mike”.

Programming for the Phi is done with the Intel version 15 (or higher) compiler in C/C++ or Fortran. The Intel module on Ruby, which is loaded automatically at login, sets up the host environment.  

In addition to the Intel module, the mic module is necessary to set up the environment:

module load mic
As of the Ruby software update on September 15th the mic module has been integrated with the Intel module and no longer needs to be separately loaded.

There are three ways to use the Phi, with variations on each. These programming models are described next. Examples for each are given in the next section.

Compiler Notes

Fortran note: To activate preprocessing during compilation, either use the capitalized “.F90” suffix or add the  -fpp  flag.

Note: -qopenmp replaces -openmp, which has been deprecated in the newest Intel compilers.

Optimization flags are mostly the same as for the host.

Native Computing

Most programs that run on the Xeon host can be recompiled to run natively on the Xeon Phi coprocessor. Codes that vectorize and parallelize well may run faster on the Phi than on the host; other codes may perform poorly.

You can login to the Phi and run your mic-built program the way you would on the host. You can also run a native mic program directly from the host. The Phi runs a stripped-down version of Linux called BusyBox. The only shell available is sh.

Note: The env  command does not show the LD_LIBRARY_PATH variable on the Phi; you can see its value with “echo $LD_LIBRARY_PATH”.

On Ruby the host node (Xeon) has a name of the form r0221. The associated Xeon Phi in this case is named mic0-r0221. If you are logged into a node that has a Phi you can log into the Phi with:

ssh mic0-$(hostname)

Home directories are mounted on the Phis, but the gpfs and lustre file systems are not. Most of the environment you’re used to seeing on the host is not available on the Phi.

All compilation for the Phi is done on the host. Simply add the flag -mmic  to the compilation line (and remove any other -m or -x flag). The .mic extension is optional; it is often used to distinguish coprocessor native executables.

icc -O3 -openmp -mmic mysource.c -o myapp.mic
ifort –O3 -openmp -mmic mysource.f90 -o myapp.mic

To run a native program from the host, use the micnativeloadex command. This command uses the   SINK_LD_LIBRARY_PATH environment variable to search for shared library dependencies on the coprocessor. Note that MIC_LD_LIBRARY_PATH (used for offload model) is initialized by the Intel compiler module but SINK_LD_LIBRARY_PATH is not.

export SINK_LD_LIBRARY_PATH=$MIC_LD_LIBRARY_PATH
micnativeloadex myapp.mic

You can also login to the coprocessor as described above and run your program normally.

ssh mic0-$(hostname)
./myapp.mic

It is possible, and quite common, to run MPI programs on one or more Xeon Phi coprocessors. For the Xeon Phis on Ruby mvapich2 is the supported MPI implementation.

Reference: https://software.intel.com/en-us/articles/building-a-native-application-for-intel-xeon-phi-coprocessors

Offload Computing

Offload computing represents a true coprocessor model. A program runs on the host and offloads portions of its work to the coprocessors. There are several ways to use the offload programming model.

Automatic Offload - MKL

Automatic offload is a feature of the Intel Math Kernel Library (MKL). Certain computationally intensive MKL functions are automatic-offload capable. (See references below.) If automatic offload is enabled, through either an environment variable or a function call, MKL will automatically divide the work of these functions between the host and the coprocessor if the problem size warrants it. Automatic offload applies only to host MKL calls made outside of offload sections.

These environment variables should be set when using automatic offload:

export MKL_MIC_ENABLE=1
export OMP_NUM_THREADS=20
export MIC_OMP_NUM_THREADS=240

MKL_MIC_ENABLE enables automatic offload. OMP_NUM_THREADS specifies the number of OpenMP threads on the host. MIC_OMP_NUM_THREADS  specifies the number of OpenMP threads on the coprocessor for offload code.

MKL can be used in other modes as well. MKL calls can be made in offload code; it is also available in native mode.

Compiler-assisted offload – explicit model

With the explicit offload model the programmer controls data movement and code execution through the use of compiler directives (Fortran) or pragmas (C/C++).

Compiler-assisted offload – implicit model

Implicit offload uses a virtual shared memory model. It uses Cilk Plus, an extension to the C and C++ languages, and is available for C/C++ only. 

Detecting and monitoring offload

At compile time you can get offload information with the option -opt-report-phase=offload.

At run time the environment variable OFFLOAD_REPORT can be set on the host to provide offload information. Valid values are 0, 1, 2, and 3, with 3 providing the most information and 0 disabling the report. It is also possible to ssh to mic0-$(hostname) and run “top” to see offload processes running.

Here’s sample output from the Fortran offload example with OFFLOAD_REPORT  set to 1.

[r0222]$ export OFFLOAD_REPORT=1
[r0222]$ ./tbo_sort.out
Fortran Tutorial: Offload Demonstration
Checking for Intel(R) Xeon Phi(TM) (Target CPU) devices...
Number of Target devices installed:      1
[Offload] [MIC 0] [File]                    tbo_sort.F90
[Offload] [MIC 0] [Line]                    183
[Offload] [MIC 0] [Tag]                     Tag 0
[Offload] [HOST]  [Tag 0] [CPU Time]        0.737751(seconds)
[Offload] [MIC 0] [Tag 0] [MIC Time]        0.024227(seconds)
[Offload] [MIC 0] [File]                    tbo_sort.F90
[Offload] [MIC 0] [Line]                    209
[Offload] [MIC 0] [Tag]                     Tag 1
[Offload] [HOST]  [Tag 1] [CPU Time]        0.003644(seconds)
[Offload] [MIC 0] [Tag 1] [MIC Time]        0.000086(seconds)
[Offload] [MIC 0] [File]                    tbo_sort.F90
[Offload] [MIC 0] [Line]                    252
[Offload] [MIC 0] [Tag]                     Tag 2
[Offload] [HOST]  [Tag 2] [CPU Time]        0.004511(seconds)
[Offload] [MIC 0] [Tag 2] [MIC Time]        0.000108(seconds)
Unsorted original values...first twenty (20) values:
Evens and Odds:
1    2    3    4    5    6    7    8    9   10
11   12   13   14   15   16   17   18   19   20
Sorted results...first ten (10) values each:
Evens:     2    4    6    8   10   12   14   16   18   20
Odds :     1    3    5    7    9   11   13   15   17   19
Primes:     2    3    5    7   11   13   17   19   23

References

http://software.intel.com/en-us/articles/effective-use-of-the-intel-compilers-offload-features

https://software.intel.com/en-us/articles/intel-mkl-automatic-offload-enabled-functions-for-intel-xeon-phi-coprocessors

https://software.intel.com/en-us/articles/performance-tips-of-using-intel-mkl-on-intel-xeon-phi-coprocessor

Symmetric Computing

Symmetric computing, also known as heterogeneous computing, involves running an MPI program with ranks on both the host and the coprocessor. It is “symmetric” in the sense that the same program executes on both the host and the coprocessor. It is “heterogeneous” because different processor types are involved.

The symmetric computing model does not yet work on Ruby.

Examples

The sole purpose of these examples is to illustrate how to build and run code for the Intel Xeon Phis on Ruby. They do not necessarily follow good programming techniques, nor are they suitable for performance comparisons.

The examples are taken from the Intel compiler distribution on Ruby. Some were written as mic examples; others were adapted from sample code written for a normal cpu. A path is provided for the original version of all sample code. Paths into the Intel compiler directory are given relative to $MKLROOT because that’s the only environment variable available. Paths are also provided for the working copies.

Program Written for Host Run Natively on MIC – Fortran Example

This code is an OpenMP program written for the CPU. We build and run it also as a native MIC application.

Original path:  $MKLROOT/../Samples/en_US/Fortran/openmp_samples/openmp_sample.f90

Working directory:  /nfs/14/judithg/ruby/mic/Samples/Fortran/openmp_samples

Description: This code finds all primes in the first 10,000,000 integers, the number of 4n+1 primes, and the number of 4n-1 primes in the same range.

 

Start batch job:


[ruby02]$ qsub -I -l nodes=1:ppn=20:mics=1
qsub: waiting for job 40901 to start
qsub: job 40901 ready
[r0221]$ cd ~/ruby/mic/Samples/Fortran/openmp_samples

Build and run on the host:


[r0221]$ ifort -o openmp_sample -xHost -qopenmp -fpp openmp_sample.f90
[r0221]$ ./openmp_sample
Range to check for Primes:           1    10000000
We are using          20  thread(s)
Number of primes found:      664579
Number of 4n+1 primes found:      332181
Number of 4n-1 primes found:      332398

Build native MIC application on the host:


[r0221]$ ifort -o openmp_sample.mic -mmic -qopenmp -fpp openmp_sample.f90

Run by logging into MIC:


[r0221]$ ssh mic0-$(hostname)
-sh-4.2$ cd ~/ruby/mic/Samples/Fortran/openmp_samples
-sh-4.2$ ./openmp_sample.mic
Range to check for Primes:           1    10000000
We are using         240  thread(s)
Number of primes found:      664604
Number of 4n+1 primes found:      332206
Number of 4n-1 primes found:      332398
-sh-4.2$  exit
logout
Connection to mic0-r0221 closed.

Run from the host:


[r0221]$ export SINK_LD_LIBRARY_PATH=$MIC_LD_LIBRARY_PATH
[r0221]$ micnativeloadex ./openmp_sample.mic
Range to check for Primes:           1    10000000
We are using         236  thread(s)
Number of primes found:      664604
Number of 4n+1 primes found:      332206
Number of 4n-1 primes found:      332398

Notes

The application gave different results on the MIC than it did on the host, due to imprecision of math functions.  In order to ensure proper arithmetic accuracy, use -fp-model precise .

Program Written for Host Run Natively on MIC – C Example

This code is an OpenMP program written for the CPU. We build and run it also as a native MIC application.

Original path:  $MKLROOT/../Samples/en_US/C/openmp_samples/openmp_sample.c

Working directory:  /nfs/14/judithg/ruby/mic/Samples/C++/openmp_samples

Description: Matrix multiplication

Start batch job:


[ruby02]$ qsub -I -l nodes=1:ppn=20:mics=1
qsub: waiting for job 40901 to start
qsub: job 40901 ready
[r0221]$ cd ~/ruby/mic/Samples/C++/openmp_samples

Build and run on the host:


[r0221]$ icc -o openmp_sample -xHost -qopenmp openmp_sample.c
[r0221]$ ./openmp_sample
Using time() for wall clock time
Problem size: c(600,2400) = a(600,1200) * b(1200,2400)
Calculating product 5 time(s)
We are using 20 thread(s)
Finished calculations.
Matmul kernel wall clock time = 1.00 sec
Wall clock time/thread = 0.05 sec
MFlops = 17280.000000

Build native MIC application on the host:

Note: This can also be done on a login node.


[r0221]$ icc -o openmp_sample.mic -mmic -qopenmp openmp_sample.c

Run by logging into MIC:


[r0221]$ ssh mic0-r0221
-sh-4.2$ cd ~/ruby/mic/Samples/Fortran/openmp_samples
-sh-4.2$ ulimit -s unlimited
-sh-4.2$ ./openmp_sample.mic
-sh-4.2$  exit
logout
Connection to mic0-r0221 closed.

Note

The stack size on the MIC by default is 8192 kbytes. This application requires a larger stack, so we have to change it. Otherwise it fails with a segmentation fault.

MKL Automatic Offload – Fortran

This code was provided by Intel as an example of automatic offload.

Original path:  $MKLROOT/examples/examples_mic.tgz

Working directory:  /nfs/14/judithg/ruby/mic/Samples/mkl/mic_ao/blasf/work

Description: Runs SGEMM – matrix multiplication

Build the example:

Build on the host, on either a login node or a compute node. The makefile hides all the interesting details, so individual commands are given here.


[r0222]$ ifort -c -O3 -openmp sgemm.f90
[r0222]$ ifort -o sgemm.out sgemm.o -mkl

Run the example:


[r0222]$ export MKL_MIC_ENABLE=1
[r0222]$ export MIC_OMP_NUM_THREADS=240
[r0222]$ ./sgemm.out
Computing SGEMM on the host
Enabling Automatic Offload
Automatic Offload enabled: 1 MIC devices present
Computing SGEMM with automatic workdivision
Setting workdivision for device MIC: 0 to 1.0
Resulting workdivision configuration:
workdivision[HOST: 0] = -1.0
workdivision[MIC: 0] =  1.0
Computing SGEMM on device  0
Done

Inside the code:

This is unmodified host code.

MKL Automatic Offload – C

This code was provided by Intel as an example of automatic offload.

Original path:  $MKLROOT/examples/examples_mic.tgz

Working directory:  /nfs/14/judithg/ruby/mic/Samples/mkl/mic_ao/blasc/work

Description: Runs SGEMM – matrix multiplication

Build the example:

Build on the host, on either a login node or a compute node. The makefile hides all the interesting details, so individual commands are given here.


[r0222]$ icc -c -O3 -openmp sgemm.f90
[r0222]$ icc -o sgemm.out sgemm.o -mkl

Run the example:


[r0222]$ export MKL_MIC_ENABLE=1
[r0222]$ export MIC_OMP_NUM_THREADS=240
[r0222]$ ./sgemm.out
Computing SGEMM on the host
Enabling Automatic Offload
Automatic Offload enabled: 1 MIC devices present
Computing SGEMM with automatic workdivision
Setting workdivision for device MIC:00 to 1.0
Resulting workdivision configuration:
workdivision[HOST] = -1.00
workdivision[MIC:00] = +1.00
Computing SGEMM on device 00
Done

Inside the code:

This is unmodified host code.

Explicit Offload Example – Fortran

This code was provided by Intel as an example of explicit offload. It was originally part of a tutorial.

Original path:  $MKLROOT/../Samples/en_US/Fortran/mic_samples/LEO_tutorial

Working directory:  /nfs/14/judithg/ruby/mic/Samples/Fortran/LEO_tutorial

Description: Sorts a list of numbers, identifies evens, odds and primes

Build the example:

Build on the host, on either a login node or a compute node.


make mic

Compile and link commands:


ifort -qopenmp  -c tbo_sort.F90 -o tbo_sort.o
ifort -V tbo_sort.o -qopenmp   -o tbo_sort.out

Run the example:


[r0222]$ ./tbo_sort.out
Fortran Tutorial: Offload Demonstration
Checking for Intel(R) Xeon Phi(TM) (Target CPU) devices...
Number of Target devices installed:      1
Unsorted original values...first twenty (20) values:
Evens and Odds:
1    2    3    4    5    6    7    8    9   10
11   12   13   14   15   16   17   18   19   20
Sorted results...first ten (10) values each:
Evens:     2    4    6    8   10   12   14   16   18   20
Odds :     1    3    5    7    9   11   13   15   17   19
Primes:     2    3    5    7   11   13   17   19   23

Inside the code:

This programming model uses compiler directives. See the source code for details, but here is a sample line of code.


!DIR$ OFFLOAD BEGIN target(mic : target_id) mandatory &
inout(numEs) in(all_Vals) out(E_vals

Explicit Offload Example – C

This code was provided by Intel as an example of explicit offload.

Original path:  $MKLROOT/../Samples/en_US/C++/mic_samples/intro_sampleC

Working directory:  /nfs/14/judithg/ruby/mic/Samples/C++/intro_sampleC

Description: Runs several test functions

Build the example:

Build on the host, on either a login node or a compute node.


make mic

Typical compile command:


icc -qopenmp  -c sampleC00.c -o sampleC00.o

Simplified link command:


icc *.o -qopenmp   -o intro_sampleC.out

Run the example:


[r0222]$ ./intro_sampleC.out
Samples started
Checking for Intel(R) Xeon Phi(TM) (Target CPU) devices...
Number of Target devices installed: 1
Offload sections will execute on: Target CPU (offload mode)
PASS Sample01
PASS Sample02
PASS Sample03
PASS Sample04
PASS Sample05
PASS Sample06
PASS Sample07
PASS Sample08
PASS Sample09
PASS Sample10
PASS Sample11
PASS Sample12
PASS Sample13
PASS Sample14
Samples complete

Inside the code:

This programming model uses compiler pragmas. See the source code for details, but here is a sample line of code.


#pragma offload target(mic) optional inout(myglob

Implicit Offload Example – C++

This example is almost identical to the C example of implicit offload.

Original path:  $MKLROOT/../Samples/en_US/C++/mic_samples/shrd_sampleCPP

Working directory:  /nfs/14/judithg/ruby/mic/Samples/C++/shrd_sampleCPP

Description: Runs several test functions

Build the example:

Build on the host, on either a login node or a compute node.


make mic

Typical compile command:


icpc -qopenmp  -c shrd_ofld00.cpp -o shrd_ofld00.o

Simplified link command:


icpc *.o -qopenmp   -o shrd_sampleCPP.out

Run the example:


[r0222]$ ./shrd_sampleCPP.out
Samples started
Checking for Intel(R) Xeon Phi(TM) (Target CPU) devices...
Number of Target devices installed: 1
Offload sections will execute on: Target CPU (offload mode)
PASS shrd_ofld01
PASS shrd_ofld02
PASS shrd_ofld03
PASS shrd_ofld04
PASS shrd_ofld05
PASS shrd_ofld06
PASS shrd_ofld07
PASS shrd_ofld08
PASS shrd_ofld09
PASS shrd_ofld10
PASS shrd_ofld11
PASS shrd_ofld_vt01
PASS shrd_ofld_vt02
PASS shrd_ofld_vt03
PASS shrd_ofld_link
Samples complete

Inside the code:

This programming model uses Cilk. See the source code for details, but here is a sample line of code.


_Cilk_shared int chk_target00();

 

 

 

Tag: 
Supercomputer: 

Executing Programs

Batch Requests

Batch requests are handled by the TORQUE resource manager and Moab Scheduler as on the Oakley and Glenn systems. Use the qsub command to submit a batch request, qstat to view the status of your requests, and qdel to delete unwanted requests. For more information, see the manual pages for each command.

There are some changes for Ruby, they are listed here:

  • Ruby nodes have 20 cores per node, and 64 GB of memory per node. This is less memory per core than on Oakley.
  • Ruby will be allocated on the basis of whole nodes even for jobs using less than 20 cores.
  • The amount of local disk space available on a node is approximately 800 GB.
  • MPI Parallel Programs should be run with mpiexec, as on Oakley, but the underlying program is mpiexec.hydra instead of OSC's mpiexec. Type mpiexec --help for information on the command line options.

Example Serial Job

This particular example uses OpenMP.

  #PBS -l walltime=1:00:00
  #PBS -l nodes=1:ppn=20
  #PBS -N my_job
  #PBS -j oe

  cd $TMPDIR
  cp $HOME/science/my_program.f .
  ifort -O2 -openmp my_program.f
  export OMP_NUM_PROCS=20
  ./a.out > my_results
  cp my_results $HOME/science

Please remember that jobs on Ruby must use a complete node.

Example Parallel Job

    #PBS -l walltime=1:00:00
    #PBS -l nodes=4:ppn=20
    #PBS -N my_job
    #PBS -j oe

    cd $HOME/science
    mpif90 -O3 mpiprogram.f
    cp a.out $TMPDIR
    cd $TMPDIR
    mpiexec ./a.out > my_results
    cp my_results $HOME/science

For more information about how to use OSC resources, please see our guide on batch processing at OSC. For specific information about modules and file storage, please see the Batch Execution Environment page.

Supercomputer: 
Service: 

Queues and Reservations

Here are the queues available on Ruby. Please note that you will be routed to the appropriate queue based on your walltime and job size request.

Name Nodes available max walltime max job size notes

Serial

Available minus reservations

168 hours

1 node

 

Parallel

Available minus reservations

96 hours

40 nodes

 

Hugemem

1

48 hours

1 node

32 core with 1 TB RAM
Debug 5 1 hour 2 nodes

16 core with 128GB RAM

For small interactive and test jobs. 

Use "-q debug" to request it 

"Available minus reservations" means all nodes in the cluster currently operational (this will fluctuate slightly), less the reservations. To access one of the restricted queues, please contact OSC Help. Generally, access will only be granted to these queues if performance of the job cannot be improved, and job size cannot be reduced by splitting or checkpointing the job.

Occasionally, reservations will be created for specific projects.

Approximately half of the Ruby nodes are a part of client condo reservations. Only jobs of short duration are eligible to run on these nodes, and only when they are not in use by the condo clients. As a result, your job(s) may have to wait for eligible resources to come available while it appears that much of the cluster is idle.
Supercomputer: 
Service: 

Batch Limit Rules

Full Node Charging Policy

On Ruby, we always allocate whole nodes to jobs and charge for the whole node. If a job requests less than a full node (nodes=1:ppn<20), the job execution environment is what is requested (the job only has access to the # of cores according to ppn request) with 64GB of RAM; however, the job will be allocated whole node and charge for the whole node. A job that requests nodes>1 will be assigned the entire nodes with 64GB/node and charged for the entire nodes regardless of ppn request.  A job that requests huge-memory node (nodes=1:ppn=32) will be allocated the entire huge-memory node with 1TB of RAM and charged for the whole node (32 cores worth of RU).

To manage and monitor your memory usage, please refer to Out-of-Memory (OOM) or Excessive Memory Usage.

Queue Default

Please keep in mind that if you submits a job with no node specification, the default is nodes=1:ppn=20, while if you submits a job with no ppn specified, the default is nodes=N:ppn=1

Debug Node

Ruby has 5 debug nodes which are specifically configured for short (< 1 hour) debugging type work. These nodes have a walltime limit of 1 hour. These nodes are equiped with E5-2670 V1 CPUs with 16 cores per a node.  To schedule a debug node, use nodes=1:ppn=16 -q debug

GPU and Intel Xeon Phi (MIC) Node

On Ruby, 20 nodes are equipped with NVIDIA Tesla K40 GPUs (one GPU with each node).  These nodes can be requested by adding gpus=1 to your nodes request (nodes=1:ppn=20:gpus=1). 20 nodes are equipped with Intel Xeon Phi (MIC) accelerators (one MIC with each node). These nodes can be requested by adding mics=1 to your nodes request (nodes=1:ppn=20:mics=1)

Walltime Limit

Here are the queues available on Ruby:

NAME

MAX WALLTIME

MAX JOB SIZE

NOTES

Serial

168 hours

1 node

 

Parallel

96 hours

40 nodes

 

Hugemem

48 hours

1 node

32 core with 1 TB RAM

Debug

1 hour

6 nodes

16 core with 128GB RAM

Job Limit

An individual user can have up to 40 concurrently running jobs and/or up to 800 processors/cores in use. All the users in a particular group/project can among them have up to 80 concurrently running jobs and/or up to 1600 processors/cores in use if the system is busy. Debug queue is 1 job at a time per user. For Condo users, please contact OSC Help for more instructions.

Supercomputer: 

Citation

To cite Ruby, please use the following Archival Resource Key:

ark:/19495/hpc93fc8

Here is the citation in BibTeX format:

@article{Ruby2015,
ark = {ark:/19495/hpc93fc8},
url = {http://osc.edu/ark:/19495/hpc93fc8},
year  = {2015},
author = {Ohio Supercomputer Center},
title = {Ruby supercomputer}
}

And in EndNote format:

%0 Generic
%T Ruby supercomputer
%A Ohio Supercomputer Center
%R ark:/19495/hpc93fc8
%U http://osc.edu/ark:/19495/hpc93fc8
%D 2015

Here is an .ris file to better suit your needs. Please change the import option to .ris.

Documentation Attachment: 
Supercomputer: 

Request Access

Projects who would like to use the Ruby cluster will need to request access.  This is because of the particulars of the Ruby environment, which includes its size, MICs, GPUs, and scheduling policies.  

Motivation

Access to Ruby is done on a case by case basis because:

  • It is a smaller machine than Oakley or Glenn, and thus has limited space for users
    • Oakley has 694 nodes, while Ruby only has 240 nodes.
  • It's CPUs are less general, and therefore more consideration is required to get optimal performance
  • Scheduling is done on a per-node basis, and therefore jobs must scale to this level at a bare minimum 
  • Additional consideration is required to get full performance out of its MICs and GPUs

Good Ruby Workload Characteristics

Those interested in using Ruby should check that their work is well suited for it by using the following list.  Ideal workloads will exhibit one or more of the following characteristics:

  • Work scales well to large core counts
    • No single core jobs
    • Scales well past 2 nodes on Oakley
  • Needs access to Ruby specific hardware (MICs or GPUs)
  • Memory bound work
  • Software:
    • Supports MICs or GPUs
    • Takes advantage of:
      • Long vector length
      • Higher core count
      • Improved Memory Bandwidth

Applying for Access

Those who would like to be considered for Ruby access should send the following in a email to OSC Help:

  • Name
  • Project ID
  • Plan for using Ruby
  • Evidence of workload being well suited for Ruby

Owens

TIP: Remember to check the menu to the right of the page for related pages with more information about Owens' specifics.

OSC's Owens cluster being installed in 2016 is a Dell-built, Intel® Xeon® processor-based supercomputer. More details will be forthcoming as we finalize facilities changes and deployment schedules.

We expect to have about half of this system powered on and available to all clients by August 29, 2016, and the rest of the system powered on by November 1, 2016.

Hardware

Detailed system specifications:

  • 824 Dell Nodes
  • Dense Compute
    • 648 compute nodes (Dell PowerEdge C6320 two-socket servers with Intel Xeon E5-2680 v4 (Broadwell, 14 cores, 2.40GHz) processors, 128GB memory)

  • ​GPU Compute (not yet available)

    • 1​60 ‘GPU ready’ compute nodes (Dell PowerEdge R730 two-socket servers with Intel Xeon E5-2680 v4 (Broadwell, 14 cores, 2.40GHz) processors, 128GB memory) – we’ll be adding NVIDIA’s next gen ‘Pascal’ GPUs when they come out much later this year

  • ​Analytics

    • 8 big memory / big disk nodes (Dell PowerEdge R930 four-socket server with Intel Xeon E5-4830 v3 (Haswell 12 core, 2.10GHz) processors, 1,536GB memory, 24 x 2TB drives)​

    • 8 big memory nodes (Dell PowerEdge R930 four-socket server with Intel Xeon E5-4830 v3 (Haswell 12 core, 2.10GHz) processors, 1,536GB memory)​

  • 23,392 total cores
    • 28 cores/node  & 128 gigabytes of memory/node
  • Mellanox EDR (100Gbps) Infiniband networking
  • Theoretical system peak performance
    • ~750 teraflops (CPU only)

How to Connect

To login to Owens at OSC, ssh to the following hostname:

owens.osc.edu 

You can either use an ssh client application or execute ssh on the command line in a terminal window as follows:

ssh <username>@owens.osc.edu

From there, you have access to the compilers and other software development tools. You can run programs interactively or through batch requests. See the following sections for details.

File Systems

Owens accesses the same OSC mass storage environment as our other clusters. Therefore, users have the same home directory as on the Oakley and Ruby clusters. Full details of the storage environment are available in our storage environment guide.

Home directories should be accessed through either the $HOME environment variable or the tilde notation (~username). Project directories are located at /fs/project. Scratch storage is located at /fs/scratch.

Owens will not have symlinks allowing use of the old file system paths. This is in contrast to Oakley and Ruby, which will have the symlinks.

Software Environment

The module system on Owens is the same as on the Oakley and Ruby systems. Use  module load <package>  to add a software package to your environment. Use  module list  to see what modules are currently loaded and  module avail  to see the modules that are available to load. To search for modules that may not be visible due to dependencies or conflicts, use  module spider . By default, you will have the batch scheduling software modules, the Intel compiler and an appropriate version of mvapich2 loaded.

You can keep up to on the software packages that have been made available on Owens by viewing the Software by System page and selecting the Owens system.

Compiling Code to Use Advanced Vector Extensions (AVX2)

The Haswell and Broadwell processors that make up Owens support the Advanced Vector Extensions (AVX2) instruction set, but you must set the correct compiler flags to take advantage of it. AVX2 has the potential to speed up your code by a factor of 4 or more, depending on the compiler and options you would otherwise use.

In our experience, the Intel and PGI compilers do a much better job than the gnu compilers at optimizing HPC code.

With the Intel compilers, use -xHost and -O2 or higher. With the gnu compilers, use -march=native and -O3 . The PGI compilers by default use the highest available instruction set, so no additional flags are necessary.

This advice assumes that you are building and running your code on Owens. The executables will not be portable.

See the Owens Programming Environment page (not yet written) for details.

Batch Specifics

We have recently updated  qsub  to provide more information to clients about the job they just submitted, including both informational (NOTE) and ERROR messages. To better understand these messages, please visit the messages from  qsub  page.

Refer to the documentation for our batch environment to understand how to use PBS on OSC hardware. Some specifics you will need to know to create well-formed batch scripts:

  • The qsub syntax for node requests is different on Owens than on Ruby and Oakley.  See ??? for details.
  • Most compute nodes on Owens have 28 cores/processors per node (ppn).  Big-memory (analytics) nodes have 24 processors per node.
  • Jobs on Owens may request partial nodes.  This is in contrast to Ruby but similar to Oakley.
  • (Owens info TBD) Ruby has 5 debug nodes which are specifically configured for short (< 1 hour) debugging type work.  These nodes have a walltime limit of 1 hour.  These nodes are equiped with E5-2670 V1 CPUs with 16 cores per a node. 
    • To schedule a debug node:
      #PBS -l nodes=1:ppn=16 -q debug

Using OSC Resources

For more information about how to use OSC resources, please see our guide on batch processing at OSC. For specific information about modules and file storage, please see the Batch Execution Environment page.

Supercomputer: 
Service: 

Citation

To cite Owens, please use the following Archival Resource Key:

ark:/19495/hpc6h5b1

Here is the citation in BibTeX format:

@article{Owens2016,
ark = {ark:/19495/hpc93fc8},
url = {http://osc.edu/ark:/19495/hpc6h5b1},
year  = {2016},
author = {Ohio Supercomputer Center},
title = {Owens supercomputer}
}

And in EndNote format:

%0 Generic
%T Owens supercomputer
%A Ohio Supercomputer Center
%R ark:/19495/hpc6h5b1
%U http://osc.edu/ark:/19495/hpc6h5b1
%D 2016

Here is an .ris file to better suit your needs. Please change the import option to .ris.

Documentation Attachment: 
Supercomputer: 
Service: 

Owens Early User Information

Early Access Period

Owens is expected to be available to all OSC clients on a later date to be announced. A small number of projects will be given access during the preceding 5 weeks to help us with testing and to provide feedback. Early access is by application only; the application deadline has passed.

Early access will be granted in several stages beginning August 15, 2016. Applicants will receive notification of their access date via ServiceNow.

During the early access period there will be no charges for Owens jobs. Charging will begin when Owens is opened up for general access.

System Instability – Warning

Please be aware that the system may go down with little or no warning during the early access period. If your work won’t tolerate this level of instability, we recommend that you use Oakley or Ruby instead.

Connecting to Owens

Early access to Owens will be granted to all members of selected projects. Access is controlled by the linux secondary group “owens.” If your project is selected for early access you will be added to this group.

ssh owens.osc.edu

Changes to qsub

The qsub syntax for node requests is different on Owens than on Ruby and Oakley. Details will be coming soon.

Job Performance Reports

We are requesting that all early users on Owens provide OSC with performance reports for a sampling of their jobs. The reports are single-page html documents generated by Allinea's perf-report tool. They provide high-level summaries that you can use to understand and improve the performance of your jobs.

OSC staff will review this information to help us understand the overall performance of the system. We will also provide assistance to individual users and projects to improve job efficiency.

Generating a performance report requires just a simple and minimally invasive modification to your job script. In all cases you must load the allinea module:

module load allinea
Applications started with mpiexec/mpirun

If you normally run your application as

mpiexec <mpi args> <program> <program args>

you should run it like this:

perf-report --np=<num procs> --mpiargs="<mpi args>" <program> <program args>

The mpiargs argument can be omitted if you aren't passing arguments to mpiexec. The np argument is required and is the total number of MPI processes to be started.

Serial and threaded applications

If your application does not use MPI, you should run it like this:

perf-report <program> <program args>
If it doesn't work -- special cases

1.  If your program is statically linked you may need to compile with extra flags to allow perf-report to work. Contact oschelp@osc.edu for assistance

2.  If you have an MPI program but you don't explicitly use mpiexec or mpirun, try this:

perf-report <program> <program args>

If it doesn't work, contact oschelp@osc.edu for assistance.

Retrieving your report

These commands will generate html and plain text files for the report, for example,  wavec_20p_2016-02-05_12-46.html . You can open the report in html format using

firefox wavec_20p_2016-02-05_12-46.html

Note:  If your job runs in $TMPDIR you'll need to add a line to your script to copy the performance report back to your working directory. You can specify the name and/or location of the report files using the "--output=" option.

For more information, see:

https://www.osc.edu/documentation/software_list/allinea_performance_reports

http://www.allinea.com/product-documentation

Getting Support

Please send your support requests to oschelp@osc.edu rather than to individual staff members. You can help us out by formatting the subject of your email as follows:

[owens][usrname] Informative description including software package if applicable

Include details of the problem with job IDs, complete error messages, and commands you executed leading up to the problem.

We know you’re going to discover problems that we didn’t encounter during our testing. We appreciate your patience as we work to fix them.

Hardware Availability

Full hardware availability (except GPUs) is planned for November 1, 2016. The following hardware will be available during the early access period:

340 Broadwell nodes, each with 28 cores and 128GB memory

8 big memory Haswell nodes, each with 24 cores and 1.5TB memory

8 big memory / big disk Haswell nodes, each with 24 cores, 1.5TB memory, 24 x 2TB drives

2 login nodes, Haswell, 28 cores each

Note:  160 nodes are “GPU ready” but GPUs won’t be purchased until NVIDIA’s next generation Pascal GPUs are available.

Software Availability

The table below shows software that will be available at the start of the early access period. Installation of other software will be ongoing. The supercomputing software pages on the OSC website will be kept up to date as new software is installed.

If you find that software is missing or misconfigured, please report it as described above under "Getting Support."

Software included with the system (no module necessary)

Software

Version

Notes

gcc

4.8.5

 

cmake

2.8.11

 

python 

2.7.5

 

git

1.8.3.1

 

gsl

1.15

 

gnuplot

4.6 patchlevel 2

 
java 1.8.0_91  
boost 1.53.0  
papi 5.2.0  
libpng 1.5.13  
cairo 1.14.2  

Compilers and general applications

Software

Version

Notes

gcc

6.1.0

 

Python

2.7.11

Anaconda bundle

Python

3.5.1

Anaconda bundle

R

3.3

 

Intel

16.0.3

 

MKL 11.3.3  
intelmpi 5.1.3  

ncview

2.1.7

 

paraview

4.4.0

 

MATLAB

R2015b

 

Totalview 2016.04.08  
Allinea 6.0.6  

Libraries (built for Intel 16.0 and gcc 4.8.5)

Software

Version

Notes

mvapich2

2.2

Currently 2.2rc1

fftw3

3.3.4

 

scalapack

2.0.2

 

hdf5

1.8.17

 

netcdf

4.3.3.1

 

pnetcdf

1.7.0

 

openmpi

1.10.2

 

metis

5.1.0

 

parmetis 4.0.3  

 

Bioinformatics software

Software

Version

Notes

Bedtools

2.25.0

 

Bowtie1

1.1.2

 
Bowtie2 2.2.9  

BWA

0.7.13

 

GATK

3.5

 

SAMtools

1.3.1

 

Picard

2.3.0

 

MuTect

1.1.4

 

STAR

2.5.2a

 

VarScan

2.4.1

 

Bcftools

1.3.1

 

VCFtools

0.1.14

 

Subread

1.5.0-p2

 

BamTools

2.2.2

 

eXpress

1.5.1

 

RNA-SeQC

1.1.8

 

SRA Toolkit

2.6.3

 

SnpEff

4.2

 

FASTX-Toolkit

0.0.14

 

GMAP

2016-05-25

 

Bam2fastq

1.1.0

 

Trimmomatic

0.36

 

MIRA

4.0.2

 

HOMER

4.8

 

STAR-Fusion

0.7.0

 

miRDeep2

2.0.0.8

 

Chemistry software

Software

Version

Notes

LAMMPS

14May16

 

Gromacs

5.1.2

 

NAMD

 

 

Gaussian

 

 

Amber

16

 

Turbomole

 

 

CHARMM

 

 

Other applications

Software

Version

Notes

warp3d

17.6.1

 

OpenFOAM

2.2.2

 

Supercomputer: