Skip to content

Commit 1532682

Browse files
authored
Merge pull request #1920 from glotzerlab/4.9.1-hot-fixes
Release 4.9.1
2 parents e93861a + c50c697 commit 1532682

32 files changed

+291
-218
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 4.9.0
2+
current_version = 4.9.1
33
commit = False
44
tag = False
55
parse = ^(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)(?:-(?P<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))(?:\.(?P<number>0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)))?$

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ body:
6060
attributes:
6161
label: HOOMD-blue version
6262
description: What version of HOOMD-blue are you using?
63-
placeholder: 4.9.0
63+
placeholder: 4.9.1
6464
validations:
6565
required: true
6666
- type: markdown

.github/ISSUE_TEMPLATE/release.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: Release checklist
33
about: '[for maintainer use]'
4-
title: 'Release 4.9.0'
4+
title: 'Release 4.9.1'
55
labels: ''
66
assignees: 'joaander'
77

.github/workflows/test.yaml

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -97,34 +97,6 @@ jobs:
9797
- config: [gcc, 11, -py, 310, -mpi, -tbb]
9898
- config: [gcc, 10, -py, 310, -mpi, -tbb]
9999

100-
check-links:
101-
name: "Check links"
102-
runs-on: ubuntu-latest
103-
steps:
104-
- name: Check out repo
105-
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
106-
with:
107-
submodules: true
108-
- name: Set up Python
109-
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
110-
with:
111-
python-version: "3.12"
112-
- name: Setup uv
113-
uses: glotzerlab/workflows/setup-uv@5cfac9da9cb78e16ae97a9119b6fd13c1c2d6f5e # 0.1.0
114-
- name: Install dependencies
115-
run: uv pip install -r sphinx-doc/requirements.txt --system
116-
- name: Install tools
117-
run: sudo apt-get install pandoc
118-
- name: Build Sphinx Docs
119-
run: sphinx-build -b html sphinx-doc doc_build
120-
- name: Link Checker
121-
id: lychee
122-
uses: lycheeverse/lychee-action@2b973e86fc7b1f6b36a93795fe2c9c6ae1118621 # v1.10.0
123-
with:
124-
args: -n './**/*.md' './**/*.html' './**/*.rst'
125-
--timeout 60
126-
fail: true
127-
128100
tests_complete:
129101
name: Unit test
130102
if: always()

CHANGELOG.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ Change Log
77
4.x
88
---
99

10+
4.9.1 (2024-10-31)
11+
^^^^^^^^^^^^^^^^^^
12+
13+
*Fixed*
14+
15+
* Correct compile errors with ``-DENABLE_GPU=on -DHOOMD_GPU_PLATFORM=HIP``
16+
(`#1920 <https://github.com/glotzerlab/hoomd-blue/pull/1915>`__)
17+
1018
4.9.0 (2024-10-29)
1119
^^^^^^^^^^^^^^^^^^
1220

CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ add_subdirectory (CMake)
1616

1717
################################
1818
## Version information
19-
set(HOOMD_VERSION_RAW "4.9.0")
19+
set(HOOMD_VERSION_RAW "4.9.1")
2020
string(REGEX MATCH "(.*)\\.(.*)\\.(.*)$" _hoomd_version_match ${HOOMD_VERSION_RAW})
2121
set(HOOMD_VERSION_MAJOR ${CMAKE_MATCH_1})
2222
set(HOOMD_VERSION_MINOR ${CMAKE_MATCH_2})
@@ -68,7 +68,12 @@ set(CMAKE_HIP_STANDARD 14)
6868

6969
# Enable compiler warnings on gcc and clang (common compilers used by developers)
7070
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
71-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wconversion -Wno-sign-conversion -Wno-unknown-pragmas -Wno-deprecated-declarations -Wno-unused-result")
71+
if (NOT (ENABLE_GPU AND HOOMD_GPU_PLATFORM STREQUAL "HIP"))
72+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wconversion")
73+
endif()
74+
75+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-sign-conversion -Wno-unknown-pragmas -Wno-deprecated-declarations -Wno-unused-result")
76+
7277
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
7378
endif()
7479

INSTALLING.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ channel:
2222

2323
.. code-block:: bash
2424
25-
micromamba install hoomd=4.9.0
25+
micromamba install hoomd=4.9.1
2626
2727
.. _conda-forge: https://conda-forge.org/docs/user/introduction.html
2828

@@ -32,13 +32,13 @@ appropriate package. Override this and force the GPU enabled package installatio
3232
.. code-block:: bash
3333
3434
export CONDA_OVERRIDE_CUDA="12.0"
35-
micromamba install "hoomd=4.9.0=*gpu*" "cuda-version=12.0"
35+
micromamba install "hoomd=4.9.1=*gpu*" "cuda-version=12.0"
3636
3737
Similarly, you can force CPU-only package installation with:
3838

3939
.. code-block:: bash
4040
41-
micromamba install "hoomd=4.9.0=*cpu*"
41+
micromamba install "hoomd=4.9.1=*cpu*"
4242
4343
.. note::
4444

hoomd/hpmc/external/user.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ class CPPExternalPotential(ExternalField):
8585
Your code *must* return a value.
8686
8787
.. _VectorMath.h: https://github.com/glotzerlab/hoomd-blue/blob/\
88-
v4.9.0/hoomd/VectorMath.h
88+
v4.9.1/hoomd/VectorMath.h
8989
.. _BoxDim.h: https://github.com/glotzerlab/hoomd-blue/blob/\
90-
v4.9.0/hoomd/BoxDim.h
90+
v4.9.1/hoomd/BoxDim.h
9191
9292
.. rubric:: Example:
9393

hoomd/hpmc/pair/user.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class CPPPotentialBase(AutotunedObject):
7676
HOOMD-blue source code.
7777
7878
.. _VectorMath.h: https://github.com/glotzerlab/hoomd-blue/blob/\
79-
v4.9.0/hoomd/VectorMath.h
79+
v4.9.1/hoomd/VectorMath.h
8080
8181
Note:
8282
Your code *must* return a value.

hoomd/md/AreaConservationMeshForceCompute.cc

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ AreaConservationMeshForceCompute::AreaConservationMeshForceCompute(
3434
if (m_ignore_type)
3535
n_types = 1;
3636

37-
GPUArray<Scalar2> params(n_types, m_exec_conf);
37+
GPUArray<area_conservation_param_t> params(n_types, m_exec_conf);
3838
m_params.swap(params);
3939

4040
GPUArray<Scalar> area(n_types, m_exec_conf);
@@ -47,32 +47,31 @@ AreaConservationMeshForceCompute::~AreaConservationMeshForceCompute()
4747
}
4848

4949
/*! \param type Type of the angle to set parameters for
50-
\param K Stiffness parameter for the force computation
51-
\param A0 desired surface area to maintain for the force computation
50+
\param params Parameters to set
5251
5352
Sets parameters for the potential of a particular mesh type
5453
*/
55-
void AreaConservationMeshForceCompute::setParams(unsigned int type, Scalar K, Scalar A0)
54+
void AreaConservationMeshForceCompute::setParams(unsigned int type,
55+
const area_conservation_param_t& params)
5656
{
5757
if (!m_ignore_type || type == 0)
5858
{
59-
ArrayHandle<Scalar2> h_params(m_params, access_location::host, access_mode::readwrite);
60-
// update the local copy of the memory
61-
h_params.data[type] = make_scalar2(K, A0);
59+
ArrayHandle<area_conservation_param_t> h_params(m_params,
60+
access_location::host,
61+
access_mode::readwrite);
62+
h_params.data[type] = params;
6263

63-
// check for some silly errors a user could make
64-
if (K <= 0)
64+
if (params.k <= 0)
6565
m_exec_conf->msg->warning() << "area: specified K <= 0" << endl;
66-
if (A0 <= 0)
66+
if (params.A0 <= 0)
6767
m_exec_conf->msg->warning() << "area: specified A0 <= 0" << endl;
6868
}
6969
}
7070

7171
void AreaConservationMeshForceCompute::setParamsPython(std::string type, pybind11::dict params)
7272
{
7373
auto typ = m_mesh_data->getMeshBondData()->getTypeByName(type);
74-
auto _params = area_conservation_params(params);
75-
setParams(typ, _params.k, _params.A0);
74+
setParams(typ, area_conservation_param_t(params));
7675
}
7776

7877
pybind11::dict AreaConservationMeshForceCompute::getParams(std::string type)
@@ -85,11 +84,10 @@ pybind11::dict AreaConservationMeshForceCompute::getParams(std::string type)
8584
}
8685
if (m_ignore_type)
8786
typ = 0;
88-
ArrayHandle<Scalar2> h_params(m_params, access_location::host, access_mode::read);
89-
pybind11::dict params;
90-
params["k"] = h_params.data[typ].x;
91-
params["A0"] = h_params.data[typ].y;
92-
return params;
87+
ArrayHandle<area_conservation_param_t> h_params(m_params,
88+
access_location::host,
89+
access_mode::read);
90+
return h_params.data[typ].asDict();
9391
}
9492

9593
/*! Actually perform the force computation
@@ -107,7 +105,9 @@ void AreaConservationMeshForceCompute::computeForces(uint64_t timestep)
107105
ArrayHandle<Scalar4> h_force(m_force, access_location::host, access_mode::overwrite);
108106
ArrayHandle<Scalar> h_virial(m_virial, access_location::host, access_mode::overwrite);
109107
size_t virial_pitch = m_virial.getPitch();
110-
ArrayHandle<Scalar2> h_params(m_params, access_location::host, access_mode::read);
108+
ArrayHandle<area_conservation_param_t> h_params(m_params,
109+
access_location::host,
110+
access_mode::read);
111111
ArrayHandle<Scalar> h_area(m_area, access_location::host, access_mode::read);
112112

113113
ArrayHandle<typename Angle::members_t> h_triangles(
@@ -205,12 +205,13 @@ void AreaConservationMeshForceCompute::computeForces(uint64_t timestep)
205205
else
206206
triN = h_pts.data[triangle_type];
207207

208-
Scalar AreaDiff = h_area.data[triangle_type] - h_params.data[triangle_type].y;
208+
Scalar AreaDiff = h_area.data[triangle_type] - h_params.data[triangle_type].A0;
209209

210-
Scalar energy = h_params.data[triangle_type].x * AreaDiff * AreaDiff
211-
/ (6 * h_params.data[triangle_type].y * triN);
210+
Scalar energy = h_params.data[triangle_type].k * AreaDiff * AreaDiff
211+
/ (6 * h_params.data[triangle_type].A0 * triN);
212212

213-
AreaDiff = h_params.data[triangle_type].x / h_params.data[triangle_type].y * AreaDiff / 2.0;
213+
AreaDiff
214+
= h_params.data[triangle_type].k / h_params.data[triangle_type].A0 * AreaDiff / 2.0;
214215

215216
Fab = AreaDiff * (-nab * rac * s_baac + ds_drab * rab * rac);
216217
Fac = AreaDiff * (-nac * rab * s_baac + ds_drac * rab * rac);

0 commit comments

Comments
 (0)