Glotzerlab software
glotzerlab-software deploys software developed by the Glotzer group at the University of Michigan to HPC resources via conda packages. Use glotzerlab-software to install an MPI and GPU enabled build of HOOMD-blue and related packages on a HPC resource.
Use the standard conda-forge provided HOOMD-blue (mamba install hoomd with
no special configuration) for serial execution on individual workstations.
Resources
- Documentation: Tutorial, usage information, and list of supported HPC resources.
- glotzerlab-software discussion board: Ask the glotzerlab-software user community for help.
- HOOMD-blue: The general-purpose particle simulation toolkit that glotzerlab-software packages.
Quick start
-
Install miniforge.
-
Replace
$HOME/miniforge3/.condarcwith:channel_priority: strict channels: - file://path/to/conda/channel - conda-forge disallow: - openmpi - mpich - cuda-cudart-dev -
Install HOOMD-blue:
mamba install hoomd -
Load prerequisite modules. For example:
module load openmpi cuda -
Execute Python scripts with MPI and GPU support. For example:
srun -n 8 python3 script.py
You can confirm that the correct package was installed with mamba list hoomd. The full package
build will contain the cluster name and a gpu or cpu suffix. For example:
# Name Version Build Channel
hoomd X.Y.Z cluster_gpu_py311h1b32822_0 file://path/to/conda/channel
Contributing
Contributions are welcomed via pull requests. Please report bugs and suggest feature
enhancements via the issue tracker. See ARCHITECTURE.md for information on how the
repository is structured, including how to modify the containers.
Conda packages
glotzerlab-software provides conda formatted packages built with cluster-specific MPI and CUDA libraries. Use it to add MPI- and GPU-enabled builds of the following software packages to your conda-compatible environments on HPC resources:
- hoomd
- mpi4py
Important: These packages are built for ABI compatibility with packages on the conda-forge channel. Ensure that you have no packages installed from the default channel before proceeding.
miniforge provides a conda-compatible environment pre-configured to install packages only from conda-forge. When you install miniforge with default options, replace:
{{ package-manager }}withmamba{{ environment-path }}with$HOME/miniforge3
If you are using a different conda-compatible package manager, use the appropriate
{{ package-manager }} and {{ environment-path }}.
Building packages
Note: Replace
{{ package-manager }}with the name of your preferred conda compatible package manager executable.
-
Install
conda-buildandboainto your environment:{{ package-manager }} install conda-build boa -
Obtain the glotzerlab-software source code:
git clone https://github.com/glotzerlab/software -
Change to the
condadirectory:cd software/conda -
Load any modules needed to provide compilers, MPI, and CUDA (optional). For example:
module load gcc openmpi cuda -
Build the packages:
./build.sh hoomd mpi4py \ --skip-existing \ --variants "{'cluster': ['{{ cluster-name }}'], 'device': ['gpu'], 'gpu_platform': ['CUDA']}" \ --output-folder {{ channel-path }}
Note: The
output-folderis the directory whereconda buildwill write the packages. Set the channel pathfile:/{{ channel-path }}in.condarcto match (see install).
Installing packages
-
Configure condarc to use the local HPC resource channel and conda-forge.
Replace
{{ environment-path }}/.condarcwith:channel_priority: strict channels: - file:/{{ channel-path }} - conda-forge disallow: - openmpi - mpich - cuda-cudart-devand keep any custom configuration options you would like.
Note: The
disallowsection prevents you from accidentally installing MPI and GPU packages from conda-forge. -
Install the packages:
{{ package-manager }} install hoomd mpi4py -
Load the module versions that match those used to build the package. For example:
module load openmpi/X.Y.Z cuda/I.J.K -
Execute Python scripts. Use your HPC resource scheduler to request compute nodes and use the resources's MPI launcher. For example:
srun -n 8 python3 script.py
Tip: After initial installation and setup is complete, you can update packages to their latest versions with
{{package-manager}} update --all.
License
Glotzerlab-software is available under the following license:
glotzerlab-software Open Source Software License Copyright (c) 2018-2024 The Regents of
the University of Michigan All rights reserved.
glotzerlab-software may contain modifications ("Contributions") provided, and to which
copyright is held, by various Contributors who have granted The Regents of the
University of Michigan the right to modify and/or distribute such Contributions.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Development of glotzerlab-software is led by the Glotzer Group at the University of Michigan.
Copyright © 2024 The Regents of the University of Michigan.