glotzerlab / hoomd-blue

Molecular dynamics and Monte Carlo soft matter simulation on GPUs.
http://glotzerlab.engin.umich.edu/hoomd-blue
BSD 3-Clause "New" or "Revised" License
324 stars 127 forks source link

Refactor CI workflows #1798

Closed joaander closed 1 month ago

joaander commented 1 month ago

Description

Move away from jinja templated workflows to reusable workflows

A future PR will migrate to base Ubuntu templates with micromamba provided build dependencies. With micromamba and conda lock files, bumping a single dependency (e.g. numpy) no longer requies long docker image builds. However, moving from jinja templates to reusable workflows is enough for one PR on its own.

Motivation and context

Make it easier to update workflows and allow dependabot to update GitHub actions versions.

How has this been tested?

CI checks.

Change log

Changed:

Checklist:

joaander commented 1 month ago

clang18 adds warnings when variable length arrays are placed on the stack. HOOMD-blue code did so in a variety of places. I replaced these with std::vector in the MPI code. Benchmark before and after (mpirun -n 24 python3 -m hoomd_benchmarks.md_pair_lj --device CPU -v -N 64000 --warmup_steps 10000 --benchmark_steps 1000 --repeat 10):

I used a large fixed size stack array in the convex polyhedron support function. This code is called in the innermost loop, so std::vector will severely impact performance here. I added an error check to prevent stack overflows. The max size is 4096 vertices which should be much larger than any reasonable use-case for convex polyhedron overlap checks. Benchmark (python3 -m hoomd_benchmarks.hpmc_octahedron --device=CPU -v -N 1000 --repeat 10)