• Skip to Main Content
  • Go to the Website's Home
  • Go to Website News
  • Go to About this site
  • Skip to Audience Navigation Menu
  • About
    • Welcome to the College
    • Facts and Figures
    • Message from the Dean
    • Visit Us
    • College Administration
    • News Center
  • Research
    • Research Home
    • Departments
    • Centers & Labs
    • Faculty Directory
    • Opportunities for Undergraduates
  • Admissions
    • Undergraduate Admissions
    • Undergraduate Recruiting
    • Graduate Admissions
  • Academics
    • Departments
    • Undergraduate Programs and Degrees
    • Graduate Programs and Degrees
    • Course Guide/Bulletin
    • Teaching
    • Support Services
  • Departments
    • Aerospace Engineering
    • Atmospheric, Oceanic and Space Sciences
    • Biomedical Engineering
    • Chemical Engineering
    • Civil and Environmental Engineering
    • Electrical Engineering and Computer Science
    • Industrial and Operations Engineering
    • Interdisciplinary Professional Programs
    • Materials Science and Engineering
    • Mechanical Engineering
    • Naval Architecture and Marine Engineering
    • Nuclear Engineering and Radiological Sciences
  • Support the College
    • Giving
    • Involve Yourself
    • Corporate Relationships
  •   

College of Engineering

Center for Advanced Computing

  • Welcome
  • About
  • Getting Started
    • Getting Started
    • Learning About HPC
    • CAC Training Courses
  • Resources
    • Resources
    • Systems
    • Software
    • Storage
    • Networking
    • Visualization
    • Teragrid
  • Academics
  • Contact Us
  • Frequently Asked Questions
Follow Us On Twitter

Contact Information

[Contact] Center for Advanced Computing
College of Engineering
cac-support@umich.edu Link

Center for Advanced Computing  /  Resources  /  Software  /  OPT

OPT

Usage
Compiling C Code
Compiling Fortran
Using optgui

Overview

OPT is a software profiler for application developers who want to achieve higher performance for their parallel and scalar codes - for C, C++ and Fortran applications. It can help you concentrate your effort on the parts of your code that really impact its overall performance. Statistical analysis shows areas of poor communication or computation balance across processors, allowing the behavior of parallel processes to be understood clearly. OPT can offer you useful insight into what your program is doing.

Usage

  • Load the opt module with module load opt
  • Compile the C or Fortran code using the opt profiling library that matches the MPI library in use.
  • Run the application to completion, as you would run normally. The job will run slower due to logging of the data.
  • After the application has finished, view the results using the optgui
  • Repeat as needed and compare multiple jobs

Compiling for Profiling with OPT

The OPT module defines a number of environment variables used thought this compiling example that will make compiling simpler.

Compiling C/C++ Code

Change your mpi.h to optmpi.h

#include <optmpi.h>

Compile with the OPT include path and link with the opt library that matches your MPI library.

mpicc -g source.c -o myexe -I$OPT_INC -L$OPT_LINK -lopt-openmpi

Compiling Fortran Code

Compiling Fortran is very similar to C/C++, only need to link against the opt library matching your MPI library.

mpif90 -g source.f90 -o myexe -L$OPT_LINK -lopt-openmpi

At this point run the code as you normally would, ether interactively or via PBS file, both using mpirun.

OptGUI

Optgui is used to view the data from one or many jobs. It is also used to define new profiles, but is not required. It will store data from finished jobs so it may be viewed latter. To run optgui you need an X server running. If you do not have an X server use the CAEN VNC service. The use of this service and basic optgui is demonstrated in the video below.

CSS 2.1 Valid
University of Michigan
  • Home
  • Contact Us
  • Site Map
  • Site Feedback
  • Accessibility
  • Emergency Procedures
  • Jump to top of the page
© 2009 College of Engineering, University of Michigan