CMake Workshop

ALCF-ECP CMake Workshop

The Exascale Computing Project (ECP) is partnering with Kitware and the ALCF to offer a three-day workshop on CMake from July 15-17, 2020.

This workshop is designed to help attendees advance their use of CMake on ALCF computing resources, including the upcoming exascale system, Aurora. The event will assist exascale code developers in learning how to resolve issues outside of their control and provide guidance on writing a build system generator capable of seamlessly configuring for multiple unique architectures with a variety of compilers. The three-day workshop will be held online and connection information will be provided to registered attendees.

Seating is limited due to the hands-on nature of the workshop. Please register as soon as possible and note attendance is contingent on an acceptance email.

Required materials for workshop

Workshop Agenda

DAY 1
 

  • Kitware Background
  • CMake Background
  • Intro To CMake
    • Basic CMake concepts (source/binary tree, generators, etc)
    • CMake workflow
    • CMake Features
    • How to install CMake / Get from Spack
    • How to run CMake on existing projects
    • Exercise
      • Module load cmake
      • Run ccmake and cmake on HPC machinw
      • Run ccmake, cmake, cmake-gui locally
  • Commands and Variables
    • CMake basic syntax
    • CMake variables
    • Language levels ( c++11/14/17/20 )
    • Exercise
      • How modules and cmake interact for compilers
      • Configure a File and C++11 Controls
      • flow control
    • Functions/macros
    • Compiler options
    • CMake variable scoping rules
    • Build configurations
  • CMake Libraries
    • Shared/static/object
    • Exercise: Adding a library
    • Usage requirements
    • Exercise: Usage requirements
  • CMake Install Rules
    • How to control rpath in CMake
    • Build rpath
    • Install rpath
  • CTest
    • Exercise: Installing and testing
  • Find Modules Debugging
  • System Introspection
    • Exercise: System introspection
  • Build Output and Name Controls
    • Build directory layout
    • Debug '_d' suffix
  • Custom Commands
    • Exercise: Custom command and generated file
  • Mixing Library Types
    • Symbol Vvsibility
    • Exercise: Mixing static and shared
  • Generator Expressions
    • Exercise: Using generator expressions
  • Import/Export Targets
    • Exercise: Export configuration
  • CMake Policies
    • How CMake provides backwards compatibility
    • How to use policies
  • MPI and Tests
    • Exercise: Using CMake, CTest, and MPI on an ALCF machine
  • Basics of Cross Compilation
    • Exercise: Cross compilation for Cray environment
  • Recent CMake Improvements

 

DAY 2
 

  • Q&A and Day 1 review
  • CPack
    • Exercise: Building an installer
  • CDash
    • Coverage
    • Static analysis
    • Dynamic analysis
    • Exercise: Submitting a dashboard
    • Test resource allocation
  • Github
    • Using Gitlab-ci to build a C++ CMake project
    • CDash reporting
    • Using ecp-Gitlab-ci to build a C++ CMake project
    • Exercise: Setup gitlab-ci
  • Writing a Find Module
    • Exercise: Write a find module
  • CUDA Support
    • How to control CUDA compiler detection
    • Separable compilation
    • Exercise: Using CUDA and FindCUDAToolkit
  • Hands-on help

 

DAY 3
 

  • Review topics based on feedback of attendees
  • Hands-on help