Skip to content

Commit

Permalink
Merge pull request #1634 from glotzerlab/test-gcc13-py312
Browse files Browse the repository at this point in the history
Test gcc 13 and Python 3.12.
  • Loading branch information
joaander authored Oct 11, 2023
2 parents 7385be6 + 488043f commit d03e41a
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 45 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
name: Build release tarball
runs-on: ubuntu-latest
container:
image: glotzerlab/ci:2023.07.24-ubuntu20.04
image: glotzerlab/ci:2023.10.09-ubuntu20.04

steps:
- name: Checkout
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/templates/configurations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
# - The build options are `mpi`, `tbb`, `llvm`, `nomd`, and `nohpmc`.
unit_test_configurations:
- config: "[clang14_py311, mpi, tbb, llvm]"
- config: "[gcc12_py311]"
- config: "[gcc12_py311, nomd]"
- config: "[gcc12_py311, nohpmc]"
- config: "[gcc12_py311, nomd, nohpmc]"
- config: "[gcc13_py312]"
- config: "[gcc13_py312, nomd]"
- config: "[gcc13_py312, nohpmc]"
- config: "[gcc13_py312, nomd, nohpmc]"
- config: "[cuda120_gcc11_py310, mpi, llvm, debug]"
- config: "[cuda120_gcc11_py310, mpi, llvm]"
- config: "[cuda120_gcc11_py310]"
Expand All @@ -17,13 +17,14 @@ unit_test_configurations:
# `unit_test_configurations`
validate_configurations:
- config: "[clang14_py311, mpi, tbb, llvm]"
- config: "[gcc12_py311]"
- config: "[gcc13_py312]"
- config: "[cuda120_gcc11_py310, mpi, llvm]"
- config: "[cuda120_gcc11_py310]"

# Configurations to build and test only rarely, such as just before a release.
# There should be no overlap between this list and `unit_test_configurations`
release_test_configurations:
- config: "[gcc12_py311]"
- config: "[clang16_py311, mpi, llvm]"
- config: "[clang15_py311, mpi, llvm]"
- config: "[clang13_py310, llvm]"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/templates/workflow.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<% block name %><% endblock %>
<% set container_prefix="glotzerlab/ci:2023.07.24" %>
<% set container_prefix="glotzerlab/ci:2023.10.09" %>

<% block concurrency %>
concurrency:
Expand Down
43 changes: 23 additions & 20 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ jobs:
name: Build [${{ join(matrix.config, '_') }}]
runs-on: ${{ matrix.build_runner }}
container:
image: glotzerlab/ci:2023.07.24-${{ matrix.config[0] }}
image: glotzerlab/ci:2023.10.09-${{ matrix.config[0] }}
strategy:
matrix:
include:
- {config: [clang14_py311, mpi, tbb, llvm], build_runner: [self-hosted,jetstream2,CPU], test_runner: ubuntu-latest, test_docker_options: '' }
- {config: [gcc12_py311], build_runner: [self-hosted,jetstream2,CPU], test_runner: ubuntu-latest, test_docker_options: '' }
- {config: [gcc12_py311, nomd], build_runner: [self-hosted,jetstream2,CPU], test_runner: ubuntu-latest, test_docker_options: '' }
- {config: [gcc12_py311, nohpmc], build_runner: [self-hosted,jetstream2,CPU], test_runner: ubuntu-latest, test_docker_options: '' }
- {config: [gcc12_py311, nomd, nohpmc], build_runner: [self-hosted,jetstream2,CPU], test_runner: ubuntu-latest, test_docker_options: '' }
- {config: [gcc13_py312], build_runner: [self-hosted,jetstream2,CPU], test_runner: ubuntu-latest, test_docker_options: '' }
- {config: [gcc13_py312, nomd], build_runner: [self-hosted,jetstream2,CPU], test_runner: ubuntu-latest, test_docker_options: '' }
- {config: [gcc13_py312, nohpmc], build_runner: [self-hosted,jetstream2,CPU], test_runner: ubuntu-latest, test_docker_options: '' }
- {config: [gcc13_py312, nomd, nohpmc], build_runner: [self-hosted,jetstream2,CPU], test_runner: ubuntu-latest, test_docker_options: '' }
- {config: [cuda120_gcc11_py310, mpi, llvm, debug], build_runner: [self-hosted,jetstream2,CPU], test_runner: [self-hosted,GPU], test_docker_options: '--gpus=all --device /dev/nvidia0 --device /dev/nvidia1 --device /dev/nvidia-uvm --device /dev/nvidia-uvm-tools --device /dev/nvidiactl' }
- {config: [cuda120_gcc11_py310, mpi, llvm], build_runner: [self-hosted,jetstream2,CPU], test_runner: [self-hosted,GPU], test_docker_options: '--gpus=all --device /dev/nvidia0 --device /dev/nvidia1 --device /dev/nvidia-uvm --device /dev/nvidia-uvm-tools --device /dev/nvidiactl' }
- {config: [cuda120_gcc11_py310], build_runner: [self-hosted,jetstream2,CPU], test_runner: [self-hosted,GPU], test_docker_options: '--gpus=all --device /dev/nvidia0 --device /dev/nvidia1 --device /dev/nvidia-uvm --device /dev/nvidia-uvm-tools --device /dev/nvidiactl' }
Expand Down Expand Up @@ -168,16 +168,16 @@ jobs:
needs: build
runs-on: ${{ matrix.test_runner }}
container:
image: glotzerlab/ci:2023.07.24-${{ matrix.config[0] }}
image: glotzerlab/ci:2023.10.09-${{ matrix.config[0] }}
options: ${{ matrix.test_docker_options }} -e CUDA_VISIBLE_DEVICES
strategy:
matrix:
include:
- {config: [clang14_py311, mpi, tbb, llvm], build_runner: [self-hosted,jetstream2,CPU], test_runner: ubuntu-latest, test_docker_options: '' }
- {config: [gcc12_py311], build_runner: [self-hosted,jetstream2,CPU], test_runner: ubuntu-latest, test_docker_options: '' }
- {config: [gcc12_py311, nomd], build_runner: [self-hosted,jetstream2,CPU], test_runner: ubuntu-latest, test_docker_options: '' }
- {config: [gcc12_py311, nohpmc], build_runner: [self-hosted,jetstream2,CPU], test_runner: ubuntu-latest, test_docker_options: '' }
- {config: [gcc12_py311, nomd, nohpmc], build_runner: [self-hosted,jetstream2,CPU], test_runner: ubuntu-latest, test_docker_options: '' }
- {config: [gcc13_py312], build_runner: [self-hosted,jetstream2,CPU], test_runner: ubuntu-latest, test_docker_options: '' }
- {config: [gcc13_py312, nomd], build_runner: [self-hosted,jetstream2,CPU], test_runner: ubuntu-latest, test_docker_options: '' }
- {config: [gcc13_py312, nohpmc], build_runner: [self-hosted,jetstream2,CPU], test_runner: ubuntu-latest, test_docker_options: '' }
- {config: [gcc13_py312, nomd, nohpmc], build_runner: [self-hosted,jetstream2,CPU], test_runner: ubuntu-latest, test_docker_options: '' }
- {config: [cuda120_gcc11_py310, mpi, llvm, debug], build_runner: [self-hosted,jetstream2,CPU], test_runner: [self-hosted,GPU], test_docker_options: '--gpus=all --device /dev/nvidia0 --device /dev/nvidia1 --device /dev/nvidia-uvm --device /dev/nvidia-uvm-tools --device /dev/nvidiactl' }
- {config: [cuda120_gcc11_py310, mpi, llvm], build_runner: [self-hosted,jetstream2,CPU], test_runner: [self-hosted,GPU], test_docker_options: '--gpus=all --device /dev/nvidia0 --device /dev/nvidia1 --device /dev/nvidia-uvm --device /dev/nvidia-uvm-tools --device /dev/nvidiactl' }
- {config: [cuda120_gcc11_py310], build_runner: [self-hosted,jetstream2,CPU], test_runner: [self-hosted,GPU], test_docker_options: '--gpus=all --device /dev/nvidia0 --device /dev/nvidia1 --device /dev/nvidia-uvm --device /dev/nvidia-uvm-tools --device /dev/nvidiactl' }
Expand Down Expand Up @@ -229,16 +229,16 @@ jobs:
needs: build
runs-on: ${{ matrix.test_runner }}
container:
image: glotzerlab/ci:2023.07.24-${{ matrix.config[0] }}
image: glotzerlab/ci:2023.10.09-${{ matrix.config[0] }}
options: ${{ matrix.test_docker_options }} -e CUDA_VISIBLE_DEVICES
strategy:
matrix:
include:
- {config: [clang14_py311, mpi, tbb, llvm], build_runner: [self-hosted,jetstream2,CPU], test_runner: ubuntu-latest, test_docker_options: '' }
- {config: [gcc12_py311], build_runner: [self-hosted,jetstream2,CPU], test_runner: ubuntu-latest, test_docker_options: '' }
- {config: [gcc12_py311, nomd], build_runner: [self-hosted,jetstream2,CPU], test_runner: ubuntu-latest, test_docker_options: '' }
- {config: [gcc12_py311, nohpmc], build_runner: [self-hosted,jetstream2,CPU], test_runner: ubuntu-latest, test_docker_options: '' }
- {config: [gcc12_py311, nomd, nohpmc], build_runner: [self-hosted,jetstream2,CPU], test_runner: ubuntu-latest, test_docker_options: '' }
- {config: [gcc13_py312], build_runner: [self-hosted,jetstream2,CPU], test_runner: ubuntu-latest, test_docker_options: '' }
- {config: [gcc13_py312, nomd], build_runner: [self-hosted,jetstream2,CPU], test_runner: ubuntu-latest, test_docker_options: '' }
- {config: [gcc13_py312, nohpmc], build_runner: [self-hosted,jetstream2,CPU], test_runner: ubuntu-latest, test_docker_options: '' }
- {config: [gcc13_py312, nomd, nohpmc], build_runner: [self-hosted,jetstream2,CPU], test_runner: ubuntu-latest, test_docker_options: '' }
- {config: [cuda120_gcc11_py310, mpi, llvm, debug], build_runner: [self-hosted,jetstream2,CPU], test_runner: [self-hosted,GPU], test_docker_options: '--gpus=all --device /dev/nvidia0 --device /dev/nvidia1 --device /dev/nvidia-uvm --device /dev/nvidia-uvm-tools --device /dev/nvidiactl' }
- {config: [cuda120_gcc11_py310, mpi, llvm], build_runner: [self-hosted,jetstream2,CPU], test_runner: [self-hosted,GPU], test_docker_options: '--gpus=all --device /dev/nvidia0 --device /dev/nvidia1 --device /dev/nvidia-uvm --device /dev/nvidia-uvm-tools --device /dev/nvidiactl' }
- {config: [cuda120_gcc11_py310], build_runner: [self-hosted,jetstream2,CPU], test_runner: [self-hosted,GPU], test_docker_options: '--gpus=all --device /dev/nvidia0 --device /dev/nvidia1 --device /dev/nvidia-uvm --device /dev/nvidia-uvm-tools --device /dev/nvidiactl' }
Expand Down Expand Up @@ -283,13 +283,13 @@ jobs:
needs: build
runs-on: ${{ matrix.test_runner }}
container:
image: glotzerlab/ci:2023.07.24-${{ matrix.config[0] }}
image: glotzerlab/ci:2023.10.09-${{ matrix.config[0] }}
options: ${{ matrix.test_docker_options }} -e CUDA_VISIBLE_DEVICES
strategy:
matrix:
include:
- {config: [clang14_py311, mpi, tbb, llvm], build_runner: [self-hosted,jetstream2,CPU], test_runner: ubuntu-latest, test_docker_options: '' }
- {config: [gcc12_py311], build_runner: [self-hosted,jetstream2,CPU], test_runner: ubuntu-latest, test_docker_options: '' }
- {config: [gcc13_py312], build_runner: [self-hosted,jetstream2,CPU], test_runner: ubuntu-latest, test_docker_options: '' }
- {config: [cuda120_gcc11_py310, mpi, llvm], build_runner: [self-hosted,jetstream2,CPU], test_runner: [self-hosted,GPU], test_docker_options: '--gpus=all --device /dev/nvidia0 --device /dev/nvidia1 --device /dev/nvidia-uvm --device /dev/nvidia-uvm-tools --device /dev/nvidiactl' }
- {config: [cuda120_gcc11_py310], build_runner: [self-hosted,jetstream2,CPU], test_runner: [self-hosted,GPU], test_docker_options: '--gpus=all --device /dev/nvidia0 --device /dev/nvidia1 --device /dev/nvidia-uvm --device /dev/nvidia-uvm-tools --device /dev/nvidiactl' }

Expand Down Expand Up @@ -334,10 +334,11 @@ jobs:
name: Build [${{ join(matrix.config, '_') }}]
runs-on: ${{ matrix.build_runner }}
container:
image: glotzerlab/ci:2023.07.24-${{ matrix.config[0] }}
image: glotzerlab/ci:2023.10.09-${{ matrix.config[0] }}
strategy:
matrix:
include:
- {config: [gcc12_py311], build_runner: [self-hosted,jetstream2,CPU], test_runner: ubuntu-latest, test_docker_options: '' }
- {config: [clang16_py311, mpi, llvm], build_runner: [self-hosted,jetstream2,CPU], test_runner: ubuntu-latest, test_docker_options: '' }
- {config: [clang15_py311, mpi, llvm], build_runner: [self-hosted,jetstream2,CPU], test_runner: ubuntu-latest, test_docker_options: '' }
- {config: [clang13_py310, llvm], build_runner: [self-hosted,jetstream2,CPU], test_runner: ubuntu-latest, test_docker_options: '' }
Expand Down Expand Up @@ -447,11 +448,12 @@ jobs:
needs: build_release
runs-on: ${{ matrix.test_runner }}
container:
image: glotzerlab/ci:2023.07.24-${{ matrix.config[0] }}
image: glotzerlab/ci:2023.10.09-${{ matrix.config[0] }}
options: ${{ matrix.test_docker_options }} -e CUDA_VISIBLE_DEVICES
strategy:
matrix:
include:
- {config: [gcc12_py311], build_runner: [self-hosted,jetstream2,CPU], test_runner: ubuntu-latest, test_docker_options: '' }
- {config: [clang16_py311, mpi, llvm], build_runner: [self-hosted,jetstream2,CPU], test_runner: ubuntu-latest, test_docker_options: '' }
- {config: [clang15_py311, mpi, llvm], build_runner: [self-hosted,jetstream2,CPU], test_runner: ubuntu-latest, test_docker_options: '' }
- {config: [clang13_py310, llvm], build_runner: [self-hosted,jetstream2,CPU], test_runner: ubuntu-latest, test_docker_options: '' }
Expand Down Expand Up @@ -516,11 +518,12 @@ jobs:
needs: build_release
runs-on: ${{ matrix.test_runner }}
container:
image: glotzerlab/ci:2023.07.24-${{ matrix.config[0] }}
image: glotzerlab/ci:2023.10.09-${{ matrix.config[0] }}
options: ${{ matrix.test_docker_options }} -e CUDA_VISIBLE_DEVICES
strategy:
matrix:
include:
- {config: [gcc12_py311], build_runner: [self-hosted,jetstream2,CPU], test_runner: ubuntu-latest, test_docker_options: '' }
- {config: [clang16_py311, mpi, llvm], build_runner: [self-hosted,jetstream2,CPU], test_runner: ubuntu-latest, test_docker_options: '' }
- {config: [clang15_py311, mpi, llvm], build_runner: [self-hosted,jetstream2,CPU], test_runner: ubuntu-latest, test_docker_options: '' }
- {config: [clang13_py310, llvm], build_runner: [self-hosted,jetstream2,CPU], test_runner: ubuntu-latest, test_docker_options: '' }
Expand Down
2 changes: 1 addition & 1 deletion BUILDING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Install prerequisites

**General requirements:**

- C++17 capable compiler (tested with ``gcc`` 9 - 12 and ``clang`` 10 - 16)
- C++17 capable compiler (tested with ``gcc`` 9 - 13 and ``clang`` 10 - 16)
- Python >= 3.8
- NumPy >= 1.17.3
- pybind11 >= 2.2
Expand Down
6 changes: 3 additions & 3 deletions hoomd/MeshGroupData.cc
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ MeshGroupData<group_size, Group, name, snap>::MeshGroupData(std::shared_ptr<Part
&BondedGroupData<group_size, Group, name, true>::setDirty>(this);

// initialize from snapshot
initializeFromSnapshot(snapshot);
initializeFromTriangleSnapshot(snapshot);

#ifdef ENABLE_MPI
if (this->m_pdata->getDomainDecomposition())
Expand Down Expand Up @@ -106,7 +106,7 @@ MeshGroupData<group_size, Group, name, snap>::~MeshGroupData()

//! Initialize from a snapshot
template<unsigned int group_size, typename Group, const char* name, typename snap>
void MeshGroupData<group_size, Group, name, snap>::initializeFromSnapshot(
void MeshGroupData<group_size, Group, name, snap>::initializeFromTriangleSnapshot(
const TriangleData::Snapshot& snapshot)
{
// check that all fields in the snapshot have correct length
Expand Down Expand Up @@ -590,7 +590,7 @@ void export_MeshGroupData(pybind11::module& m,
.def(pybind11::init<std::shared_ptr<ParticleData>, unsigned int>())
.def(
pybind11::init<std::shared_ptr<ParticleData>, const typename TriangleData::Snapshot&>())
.def("initializeFromSnapshot", &T::initializeFromSnapshot)
.def("initializeFromTriangleSnapshot", &T::initializeFromTriangleSnapshot)
.def("takeSnapshot", &T::takeSnapshot)
.def("getN", &T::getN)
.def("getNGlobal", &T::getNGlobal)
Expand Down
12 changes: 7 additions & 5 deletions hoomd/MeshGroupData.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,13 @@ class MeshGroupData : public BondedGroupData<group_size, Group, name, true>

virtual ~MeshGroupData();

// mask the base class initializeFromSnapshot(const Snapshot& snapshot)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Woverloaded-virtual"
void initializeFromSnapshot(const TriangleData::Snapshot& snapshot);
#pragma clang diagnostic pop
virtual void initializeFromSnapshot(
const typename BondedGroupData<group_size, Group, name, true>::Snapshot& snapshot)
{
throw std::runtime_error("Not implemented");
}

void initializeFromTriangleSnapshot(const TriangleData::Snapshot& snapshot);

//! Take a snapshot
std::map<unsigned int, unsigned int> takeSnapshot(snap& snapshot) const;
Expand Down
14 changes: 6 additions & 8 deletions hoomd/hpmc/ShapeConvexPolyhedron.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,7 @@ struct PolyhedronVertices : ShapeParams
PolyhedronVertices(unsigned int _N, bool managed = false) : ignore(0)
{
std::vector<vec3<ShortReal>> v(_N, vec3<ShortReal>(0, 0, 0));
x = ManagedArray<ShortReal>(1, managed);
y = ManagedArray<ShortReal>(1, managed);
z = ManagedArray<ShortReal>(1, managed);
setVerts(v, 0);
setVerts(v, 0, managed);
}

PolyhedronVertices(const std::vector<vec3<ShortReal>>& verts,
Expand All @@ -69,7 +66,7 @@ struct PolyhedronVertices : ShapeParams
z((unsigned int)verts.size(), managed), n_hull_verts(0), N((unsigned int)verts.size()),
diameter(0.0), sweep_radius(sweep_radius_), ignore(ignore_)
{
setVerts(verts, sweep_radius_);
setVerts(verts, sweep_radius_, managed);
}

/** Set the shape vertices
Expand All @@ -79,12 +76,13 @@ struct PolyhedronVertices : ShapeParams
@param verts Vertices to set
@param sweep_radius_ Sweep radius
*/
void setVerts(const std::vector<vec3<ShortReal>>& verts, ShortReal sweep_radius_)
void setVerts(const std::vector<vec3<ShortReal>>& verts,
ShortReal sweep_radius_,
bool managed = false)
{
N = (unsigned int)verts.size();
diameter = 0;
sweep_radius = sweep_radius_;
bool managed = x.isManaged();

unsigned int align_size = 8; // for AVX
unsigned int N_align = ((N + align_size - 1) / align_size) * align_size;
Expand Down Expand Up @@ -166,7 +164,7 @@ struct PolyhedronVertices : ShapeParams
vert_vector.push_back(vert);
}

setVerts(vert_vector, v["sweep_radius"].cast<float>());
setVerts(vert_vector, v["sweep_radius"].cast<float>(), managed);
}

/// Convert parameters to a python dictionary
Expand Down
2 changes: 2 additions & 0 deletions hoomd/managed_allocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ template<class T> class managed_allocator
if (!result)
throw std::bad_alloc();
}

memset(result, 0, n * sizeof(T));
allocation_bytes = n * sizeof(T);
allocation_ptr = result;
}
Expand Down

0 comments on commit d03e41a

Please sign in to comment.