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

Quick start

  1. Install miniforge.

  2. Replace $HOME/miniforge3/.condarc with:

    channel_priority: strict
    channels:
      - file://path/to/conda/channel
      - conda-forge
    
    disallow:
    - openmpi
    - mpich
    - cuda-cudart-dev
    
  3. Install HOOMD-blue:

    mamba install hoomd
    
  4. Load prerequisite modules. For example:

    module load openmpi cuda
    
  5. 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 }} with mamba
  • {{ environment-path }} with $HOME/miniforge3

If you are using a different conda-compatible package manager, use the appropriate {{ package-manager }} and {{ environment-path }}.

Do not install any MPI or GPU enabled packages from the conda-forge channel. The generic MPI and CUDA libraries provided by conda-forge will take precedence and prevent the cluster-specific libraries from operating correctly.

Building packages

Note: Replace {{ package-manager }} with the name of your preferred conda compatible package manager executable.

  1. Install conda-build and boa into your environment:

    {{ package-manager }} install conda-build boa
    
  2. Obtain the glotzerlab-software source code:

    git clone https://github.com/glotzerlab/software
    
  3. Change to the conda directory:

    cd software/conda
    
  4. Load any modules needed to provide compilers, MPI, and CUDA (optional). For example:

    module load gcc openmpi cuda
    
  5. 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-folder is the directory where conda build will write the packages. Set the channel path file:/{{ channel-path }} in .condarc to match (see install).

Installing packages

  1. Configure condarc to use the local HPC resource channel and conda-forge.

    Replace {{ environment-path }}/.condarc with:

    channel_priority: strict
    channels:
    - file:/{{ channel-path }}
    - conda-forge
    disallow:
    - openmpi
    - mpich
    - cuda-cudart-dev
    

    and keep any custom configuration options you would like.

    Note: The disallow section prevents you from accidentally installing MPI and GPU packages from conda-forge.

  2. Install the packages:

    {{ package-manager }} install hoomd mpi4py
    
  3. Load the module versions that match those used to build the package. For example:

    module load openmpi/X.Y.Z cuda/I.J.K
    
  4. 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.