diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e60e81fb9c..6e45bb932b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 diff --git a/.github/workflows/templates/configurations.yml b/.github/workflows/templates/configurations.yml index 0eea4085f8..5c6a18d09f 100644 --- a/.github/workflows/templates/configurations.yml +++ b/.github/workflows/templates/configurations.yml @@ -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]" @@ -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]" diff --git a/.github/workflows/templates/workflow.yml b/.github/workflows/templates/workflow.yml index ab97f0e637..7b5f59e4d5 100644 --- a/.github/workflows/templates/workflow.yml +++ b/.github/workflows/templates/workflow.yml @@ -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: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e1a99fd5d0..3863a6358b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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' } @@ -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' } @@ -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' } @@ -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' } @@ -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: '' } @@ -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: '' } @@ -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: '' } diff --git a/BUILDING.rst b/BUILDING.rst index fdcfedfcb4..5ab69aeaa4 100644 --- a/BUILDING.rst +++ b/BUILDING.rst @@ -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 diff --git a/hoomd/MeshGroupData.cc b/hoomd/MeshGroupData.cc index 8e083c50a3..c8c2bd0ed8 100644 --- a/hoomd/MeshGroupData.cc +++ b/hoomd/MeshGroupData.cc @@ -76,7 +76,7 @@ MeshGroupData::MeshGroupData(std::shared_ptr::setDirty>(this); // initialize from snapshot - initializeFromSnapshot(snapshot); + initializeFromTriangleSnapshot(snapshot); #ifdef ENABLE_MPI if (this->m_pdata->getDomainDecomposition()) @@ -106,7 +106,7 @@ MeshGroupData::~MeshGroupData() //! Initialize from a snapshot template -void MeshGroupData::initializeFromSnapshot( +void MeshGroupData::initializeFromTriangleSnapshot( const TriangleData::Snapshot& snapshot) { // check that all fields in the snapshot have correct length @@ -590,7 +590,7 @@ void export_MeshGroupData(pybind11::module& m, .def(pybind11::init, unsigned int>()) .def( pybind11::init, const typename TriangleData::Snapshot&>()) - .def("initializeFromSnapshot", &T::initializeFromSnapshot) + .def("initializeFromTriangleSnapshot", &T::initializeFromTriangleSnapshot) .def("takeSnapshot", &T::takeSnapshot) .def("getN", &T::getN) .def("getNGlobal", &T::getNGlobal) diff --git a/hoomd/MeshGroupData.h b/hoomd/MeshGroupData.h index 8207c15dd8..72cf15ad4e 100644 --- a/hoomd/MeshGroupData.h +++ b/hoomd/MeshGroupData.h @@ -61,11 +61,13 @@ class MeshGroupData : public BondedGroupData 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::Snapshot& snapshot) + { + throw std::runtime_error("Not implemented"); + } + + void initializeFromTriangleSnapshot(const TriangleData::Snapshot& snapshot); //! Take a snapshot std::map takeSnapshot(snap& snapshot) const; diff --git a/hoomd/extern/quickhull b/hoomd/extern/quickhull index a706b5ba0d..1ffbc6f884 160000 --- a/hoomd/extern/quickhull +++ b/hoomd/extern/quickhull @@ -1 +1 @@ -Subproject commit a706b5ba0d863b241668038be9eef67afbfaabac +Subproject commit 1ffbc6f884ea1da89e104a5996cf8a726db673d5 diff --git a/hoomd/hpmc/ShapeConvexPolyhedron.h b/hoomd/hpmc/ShapeConvexPolyhedron.h index ab53c33898..bee2cef2ef 100644 --- a/hoomd/hpmc/ShapeConvexPolyhedron.h +++ b/hoomd/hpmc/ShapeConvexPolyhedron.h @@ -55,10 +55,7 @@ struct PolyhedronVertices : ShapeParams PolyhedronVertices(unsigned int _N, bool managed = false) : ignore(0) { std::vector> v(_N, vec3(0, 0, 0)); - x = ManagedArray(1, managed); - y = ManagedArray(1, managed); - z = ManagedArray(1, managed); - setVerts(v, 0); + setVerts(v, 0, managed); } PolyhedronVertices(const std::vector>& verts, @@ -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 @@ -79,12 +76,13 @@ struct PolyhedronVertices : ShapeParams @param verts Vertices to set @param sweep_radius_ Sweep radius */ - void setVerts(const std::vector>& verts, ShortReal sweep_radius_) + void setVerts(const std::vector>& 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; @@ -166,7 +164,7 @@ struct PolyhedronVertices : ShapeParams vert_vector.push_back(vert); } - setVerts(vert_vector, v["sweep_radius"].cast()); + setVerts(vert_vector, v["sweep_radius"].cast(), managed); } /// Convert parameters to a python dictionary diff --git a/hoomd/managed_allocator.h b/hoomd/managed_allocator.h index a1951a4a30..8a691ae55d 100644 --- a/hoomd/managed_allocator.h +++ b/hoomd/managed_allocator.h @@ -143,6 +143,8 @@ template class managed_allocator if (!result) throw std::bad_alloc(); } + + memset(result, 0, n * sizeof(T)); allocation_bytes = n * sizeof(T); allocation_ptr = result; }