Loading…
Attending this event?
• Scientific Computing clear filter
Monday, September 16
 

15:15 MDT

Bridging the Gap: Writing Portable Programs for CPU and GPU
Monday September 16, 2024 15:15 - 16:15 MDT
This talk presents a series of effective patterns to address challenges arising when
code is developed that shall operate seamlessly on both GPU (Cuda) and CPU environments.
This scenario is a common oversight among Cuda developers,
given the substantial architectural differences between CPUs and GPUs.

The patterns presented cover a range of scenarios,
from handling stray function calls,
strategies for conditional compilation,
exploiting constexpr functions,
leveraging undefined behaviour,
usage of Cuda specific macros,
conditional instantiation of templates,
and
managing compiler warnings and errors.

Key patterns include: "Host device everything", "Conditional function body", "Constexpr everything", "Disable the warnings", "Defensive Programming", "Conditional Host Device Template", and "Function dispatching".

We evaluate each pattern based on ease of use, maintenance overhead, applicability and known usages. Additionally, pitfalls to avoid and considerations for implementations are provided to guide developers in adopting these patterns effectively.
Speakers
avatar for Thomas Mejstrik

Thomas Mejstrik

Scientist, University of Vienna
Thomas Mejstrik earned his doctoral degree in Mathematics from the University of Vienna, Austria, specializing in numerical linear algebra and high-performance computing. Additionally, he obtained a Master's degree in Piano Education from the University of Music and Performing Arts... Read More →
Monday September 16, 2024 15:15 - 16:15 MDT
Cottonwood 8/9

16:45 MDT

Data Is All You Need for Fusion
Monday September 16, 2024 16:45 - 17:45 MDT
Functions are the fundamental unit of interoperability in software design: users write applications by composing functions provided by various libraries. However, naive function composition can result in poor performance due to memory overheads that exist at function boundaries. Operator fusion --- combining the execution of several operators into one operator --- is a well-known technique to combat this overhead. Previous solutions to add fusion rely on complex, monolithic compilers and languages that force performance engineers to rediscover old solutions in new ecosystems, leading to decades of performance engineering work going underutilized. In this work, I attempt to identify the minimal ingredients required to enable fusion on top of existing library interfaces. In doing so, I propose a lightweight enrichment of function interfaces that exposes data production and consumption patterns of functions. I show how to implement these ideas in C++ and demonstrate the benefits of my system by showing that it is competitive with state-of-the-art high-performance libraries, and that it can fuse across library boundaries for unforeseen workloads.
Speakers
avatar for Manya Bansal

Manya Bansal

PhD Student, Massachusetts Institute of Technology
Manya is a first-year computer science PhD student at MIT. She is interested in designing extensible and productive languages and tools for heterogeneous systems.
Monday September 16, 2024 16:45 - 17:45 MDT
Cottonwood 2/3
 
Tuesday, September 17
 

15:15 MDT

High-performance, Parallel Computer Algebra in C++
Tuesday September 17, 2024 15:15 - 15:45 MDT
The jump from a theoretical algorithm to a high-performant real-world implementation is non-trivial. Factors that impact performance not reflected in an academic paper must be resolved in practice, including and not limited to cache misses, machine word size limits, parallelism overheads, and differing instruction speeds.

The Ontario Research Centre for Computer Algebra (ORCCA) performs fundamental research and development in computer algebra. Part of our work involves researching and implementing high-performance, parallel algorithms in C++. In this talk, we discuss a state-of-the-art algorithm for polynomial multiplication that beats leading computer algebra systems, such as Maple (our own library) and FLINT. We focus on our experience implementing the algorithm in CUDA C++, the challenges we faced, and our solutions.
Speakers
DT

David Tran

Software Engineer, Snowflake
David Tran is a researcher with the Ontario Research Center for Computer Algebra, developing novel, high-performance parallel algorithms in computer algebra. Previously, he worked with C++ as a software engineer at Apple and at Snowflake. He is in the final year of his joint Bachelor's... Read More →
Tuesday September 17, 2024 15:15 - 15:45 MDT
Cottonwood 2/3

15:50 MDT

Application of C++ in Computational Cancer Modeling
Tuesday September 17, 2024 15:50 - 16:20 MDT
Cancer research involves simulating "pseudo tumors" by sampling stochastic processes. Beginning with C++11, there were new features introduced in both the language and Standard Library that proved to be highly beneficial for simulating stochastic processes and analyzing the results. In addition, the linear algebra library Eigen, comprised of template code, makes it simple to perform matrix and vector operations in C++. Using an application in colorectal cancer research, the presentation will feature three topics in C++, namely random number generation, parallel computing, and leveraging the Eigen library.

One of the main attractions of Eigen is that it simplifies the code implementation for people who think mathematically, as the + and * operators are clearly defined in the mathematical sense of matrix addition and row-by-column matrix multiplication.  This talk highlights this aspect by demonstrating how to express the simulation of a stochastic cancer modeling process in C++, a problem that is well formulated in terms of matrix operations.

Simulating these stochastic processes also requires drawing random numbers. Before the new <random> capabilities in C++11, users typically needed to patch together their own uniform random number generators, as well as transformations to their desired distributions such as the Poisson and exponential distributions, which required a large amount of time for implementation and testing. This talk will show that by using methods such as std::discrete_distribution and std::exponential_distribution in <random>, constructing a random process simulator is technically simple in C++.

Cancers with seemingly similar initial conditions may develop into drastically different conditions. Much attention has been paid to events with high variability. To test a theoretical model, a huge number of simulations needs to be done to capture this variability. Therefore, concurrency is in reality a requirement rather than an option. In this application, parallel versions of certain STL algorithms introduced in C++17 are used to obtain descriptive statistics on the simulated data. In addition, an application of task-based concurrency will be used for replacing multithreaded computing formerly based on the pthread library.

In sum, this talk provides an example of using modern C++ in computational biology, with a goal of showing the C++ community that computational biology is a growing domain for applying modern C++ to general science.
Speakers
RZ

Ruibo Zhang

University of Washington
Ruibo Zhang is a second year Ph.D. student at University of Washington, department of applied mathematics. He has been working on applying probability theory in modeling cancer.
Tuesday September 17, 2024 15:50 - 16:20 MDT
Cottonwood 2/3

16:45 MDT

Vectorizing a CFD Code With `std::simd` Supplemented by (Almost) Transparent Loading and Storing
Tuesday September 17, 2024 16:45 - 17:45 MDT
Computational Fluid Dynamics (CFD) codes are ubiquitous in high performance computing. Their computational demands require the use of all levels of parallelism provided by the hardware. This includes the SIMD units of today's processors, which provide one level of data parallelism. With `std::simd`, it becomes possible to address these units directly from C++.

The talk reports on our work on the vectorization of a CFD code. The focus will be primarily on the way we have expressed vectorization using `std::experimental::simd` and less on the achieved performance gains. In this context, we have developed a library that complements `std::simd`. The goal of this library is to make loading and saving `std::simd` variables syntactically equivalent
to loading and saving their scalar counterparts. Loop bodies written for scalar variables can then be used for `std::simd` variables without modification. The talk also discusses some possible improvements to C++, since this goal can currently only be achieved by using a macro.
Speakers
avatar for Olaf Krzikalla

Olaf Krzikalla

Research assistant, DLR e.V.
Olaf Krzikalla started using C++ as a student at the Technical University of Dresden in the mid-90s. After that he worked as a software developer for several companies. During this time he also contributed the first version of `boost::intrusive`. In 2009 Olaf joined the HPC Center... Read More →
Tuesday September 17, 2024 16:45 - 17:45 MDT
Cottonwood 2/3
 
Wednesday, September 18
 

09:00 MDT

Improving our safety with a quantities and units library
Wednesday September 18, 2024 09:00 - 10:00 MDT
Safety has been a huge buzzword in the C++ Community in recent years. There are many concerns about the safety of our C++ language, and projects developed using it. Many improvements are being discussed, starting from handling of the low-level fundamental types, through updating the language rules (e.g., initialization), up to providing safer high-level abstractions in the library.

This lecture presents how the usage of a Modern C++ quantities and units library can improve the safety of the code we write every day. During the talk, Mateusz will describe all issues and possible solutions discussed in P2981: Improving our safety with a physical quantities and units library. Based on the examples developed with the mp-units project, the attendees will not only learn the obvious benefits of using such a library but also some less known safety features will be presented.

During the talk, we will see typical issues of code bases that do not use a proper library. We will also learn about various mishaps in engineering that happened through the ages and were caused by human errors in handling quantities and their units. We will also see how they can be easily and safely addressed using the mp-units library.

In the end, Mateusz will describe which issues can't be solved by the quantities and units library itself for now. He will review a list of potential extensions to the C++ language and its library that would allow even more safety in our projects.
Speakers
avatar for Mateusz Pusz

Mateusz Pusz

C++ Trainer | Principal Engineer, Train IT | Epam Systems
A software architect, principal engineer, and security champion with over 20 years of experience designing, writing, and maintaining C++ code for fun and living. A trainer with over 10 years of C++ teaching experience, consultant, conference speaker, and evangelist. His main areas... Read More →
Wednesday September 18, 2024 09:00 - 10:00 MDT
Spruce 3/4
 
Thursday, September 19
 

15:15 MDT

To Int or to Uint, This is the Question
Thursday September 19, 2024 15:15 - 16:15 MDT
In our daily work, we often use integral data types to perform arithmetic calculations, but we may not always consider how the selection of the data type can affect performance and compiler optimizations. This talk will delve into the importance of choosing the correct data type for the job and how it impacts compiler optimizations. We will also examine the overall performance implications for the application. We will explore specific algorithms where using unsigned data types is more beneficial and other situations where signed data types are the best choice. Furthermore this talk will dive into the differences between signed and unsigned integers, how the processor handles certain operations and explain many of the surprising pitfalls of using integral types.
Attendees will come away with a deeper understanding of how data type selection can impact their code and how to make better choices for optimal performance.

This session will follow the guidelines from my short article on LinkedIn but it will go into higher details and contain more examples and explanations.
Speakers
avatar for Alex Dathskovsky

Alex Dathskovsky

Director of SW engineering, Speedata
Alex has over 17 years of software development experience, working on systems, low-level generic tools and high-level applications. Alex has worked as an integration/software developer at Elbit, senior software developer at Rafael, technical leader at Axxana, Software manager at Abbott... Read More →
Thursday September 19, 2024 15:15 - 16:15 MDT
Adams A

16:45 MDT

Linear Algebra with The Eigen C++ Library
Thursday September 19, 2024 16:45 - 17:45 MDT
Linear algebra is an essential part of scientific programming, particularly in domains such as quantitative finance, data science, physics, and medical research.  It is also relevant to imaging in game development.   As C++ did not have all the convenient built-in multidimensional array capabilities and supporting libraries that came with typical Fortran platforms, scientific programmers making the transition to C++ back in the late 1990’s and early 2000's often found themselves in an inconvenient situation with limited options.  These included building up this functionality mostly from scratch, wrestling with interfaces to numerical Fortran libraries such as BLAS and LAPACK, or somehow convincing management to invest in a third-party commercial C++ linear algebra library.

The situation has improved substantially over the years with the development of several well-regarded open-source linear algebra libraries for C++.  One in particular that has become popular, first released in 2006, is the Eigen library.  It has been adopted for use within both the TensorFlow machine learning library and the Stan Math Library, as well as at CERN, and it can also be found in the implementation of high-performance quantitative trading strategies in C++.

In this talk, we will examine the setup and basics of the Eigen library, followed by a discussion of some of its more advanced features, including applications of matrix decompositions frequently used in quantitative work, as well as its compatibility with STL algorithms.  It will conclude with an overview of how it can be used within the context of the C++26 BLAS interface proposal (P1673), via an interface with std::mdspan now available in C++23.
Speakers
avatar for Daniel Hanson

Daniel Hanson

CppCon Student Program Chair
Former faculty, Dept of Applied Mathematics/Computational Finance & Risk Management, University of Washington, Seattle.  Remains active in computational applications of C++ and supporting the CppCon student program.  
Thursday September 19, 2024 16:45 - 17:45 MDT
Cottonwood 8/9
 
Friday, September 20
 

13:30 MDT

High-Performance Numerical Integration in the Age of C++26
Friday September 20, 2024 13:30 - 14:30 MDT
Could we revisit numerical integrators in the light of C++26 and bring more genericity, performance, and expressivity to the domain? In this talk, we will explore how modern C++ techniques can add something new and relevant to one of the oldest and most basic task of scientific computing: the integration of systems of equations. We will examine, in particular, how most numerical integrators can be derived from a small set of first principles that can be easily mapped onto C++ concepts and composable algorithmic building blocks. One of the goal of the approach introduced in this presentation will be to achieve as much as possible with the simplest and smallest amount of code. C++23 and C++26 programming techniques, including reflection, will be leveraged to transfer some of the burden of implementation to the compiler while still ensuring maximum performance.

In practice, the talk will combine aspects of high-performance computing, numerical methods, and software architecture. We will start by summarizing recent discoveries made in applied mathematics on Runge-Kutta methods, linear multistep methods, and general linear methods to see how it can help design better abstractions that can be translated into C++ concepts. We will then examine how a few carefully crafted algorithmic building blocks can be combined to generate the whole diversity of numerical integrators from first principles. The automation of this approach using C++23 and C++26's reflection to make the compiler generate highly efficient code will be then discussed in great length. Next, we will dive into parallelization strategies, including distributed ones as well as heterogenous computing. Some perspectives will also be given on the possibility for the compiler to branch on the best integrator given the mathematical properties of a system of equations as well as ways to derive new integrators at compile-time.

To illustrate our approach, we will examine the behavior and performance of numerous integrators on several real-world problems including a supercomputing N-body code for cosmology that simulates the gravitational dynamics of large scale astrophysical structures in an expanding Universe. A great care will be taken to make all the code and examples as reproducible and standalone as possible so that most of the presented content can simply be copied and pasted to make it work everywhere. Finally, even if the talk will focus on the particular case of numerical integration, the methodology presented in this talk will be applicable everywhere in scientific computing and beyond to achieve better software architecture in technical contexts.
Speakers
avatar for Vincent Reverdy

Vincent Reverdy

Researcher in Astrophysics and Computer Science, French National Centre for Scientific Research
Vincent Reverdy is a Full Researcher in Computer Science and Astrophysics at French Center for Scientific Research (CRNS) and located at the Annecy Laboratory for Particle Physics (LAPP) in the French Alps. He also is a member of the French delegation to the C++ Standards Committee... Read More →
Friday September 20, 2024 13:30 - 14:30 MDT
Cottonwood 2/3

14:45 MDT

A new dragon in the den: fast conversion from floating-point numbers
Friday September 20, 2024 14:45 - 15:45 MDT
Standard C++ provides a few functions to convert a double or float value to string, namely, sprintf, stringstream::operator<<, snprintf, to_string, to_chars and format.

This talk concerns what goes on behind the scenes, i.e, the algorithms which these functions might use to do their job. Curiously, many of these algorithms have dragon-related names like Dragon, Grisu, Errol, Ryu and Dragonbox.

Here mythology meets technology and we shall introduce the new dragon that has just arrived in the den.

(Please leave your bows and arrows at home, they won't be necessary here.)
Speakers
avatar for Cassio Neri

Cassio Neri

Quantitative Researcher
Cassio Neri holds a PHD in Applied Mathematics from University of Paris Dauphine. Cassio has been professionally coding in C++ for more than 15 years but his coding experience has started far earlier when he was a kid. He currently works on the financial industry in London but had... Read More →
Friday September 20, 2024 14:45 - 15:45 MDT
Cottonwood 2/3
 
Share Modal

Share this link via

Or copy link

Filter sessions
Apply filters to sessions.