This is an introduction of how to run machine learning applications on ZIH systems.
For machine learning purposes, we recommend to use the partitions
The compute nodes of the partition ML are built on the base of Power9 architecture from IBM. The system was created for AI challenges, analytics and working with data-intensive workloads and accelerated databases.
The main feature of the nodes is the ability to work with the NVIDIA Tesla V100 GPU with NV-Link support that allows a total bandwidth with up to 300 GB/s. Each node on the partition ML has 6x Tesla V-100 GPUs. You can find a detailed specification of the partition in our Power9 documentation.
The partition ML is based on the Power9 architecture, which means that the software built
for x86_64 will not work on this partition. Also, users need to use the modules which are
specially build for this architecture (from
On the partition ML load the module environment:
marie@ml$ module load modenv/ml The following have been reloaded with a version change: 1) modenv/scs5 => modenv/ml
There are tools provided by IBM, that work on partition ML and are related to AI tasks. For more information see our Power AI documentation.
Another partition for machine learning tasks is Alpha. It is mainly dedicated to
ScaDS.AI topics. Each node on Alpha has 2x AMD EPYC CPUs, 8x NVIDIA A100-SXM4
GPUs, 1 TB RAM and 3.5 TB local space (
/tmp) on an NVMe device. You can find more details of the
partition in our Alpha Centauri documentation.
On the partition alpha load the module environment:
marie@alpha$ module load modenv/hiera The following have been reloaded with a version change: 1) modenv/ml => modenv/hiera
On partition Alpha, the most recent modules are build in
hiera. Alternative modules might be
Machine Learning via Console¶
Python and Virtual Environments¶
Python users should use a virtual environment when conducting machine learning tasks via console.
For more details on machine learning or data science with Python see data analytics with Python.
R also supports machine learning via console. It does not require a virtual environment due to a different package management.
For more details on machine learning or data science with R see data analytics with R.
Machine Learning with Jupyter¶
The Jupyter Notebook is an open-source web application that allows you to create documents containing live code, equations, visualizations, and narrative text. JupyterHub allows to work with machine learning frameworks (e.g. TensorFlow or PyTorch) on ZIH systems and to run your Jupyter notebooks on HPC nodes.
After accessing JupyterHub, you can start a new session and configure it. For machine learning purposes, select either partition Alpha or ML and the resources, your application requires.
Machine Learning with Containers¶
Some machine learning tasks require using containers. In the HPC domain, the Singularity container system is a widely used tool. Docker containers can also be used by Singularity. You can find further information on working with containers on ZIH systems in our containers documentation.
There are two sources for containers for Power9 architecture with TensorFlow and PyTorch on the board:
ppc64ledocker container for TensorFlow.
- PowerAI container: Official Docker container with TensorFlow, PyTorch and many other packages.
You could find other versions of software in the container on the "tag" tab on the docker web page of the container.
In the following example, we build a Singularity container with TensorFlow from the DockerHub and start it:
marie@ml$ singularity build my-ML-container.sif docker://ibmcom/tensorflow-ppc64le #create a container from the DockerHub with the last TensorFlow version [...] marie@ml$ singularity run --nv my-ML-container.sif #run my-ML-container.sif container supporting the Nvidia's GPU. You can also work with your container by: singularity shell, singularity exec [...]
Additional Libraries for Machine Learning¶
The following NVIDIA libraries are available on all nodes:
For optimal NCCL performance it is recommended to set the NCCL_MIN_NRINGS environment variable during execution. You can try different values but 4 should be a pretty good starting point.
marie@compute$ export NCCL_MIN_NRINGS=4
The following HPC related software is installed on all nodes:
|IBM Spectrum MPI||
|IBM XLC Compiler||
|IBM XLF Compiler||
Datasets for Machine Learning¶
There are many different datasets designed for research purposes. If you would like to download some of them, keep in mind that many machine learning libraries have direct access to public datasets without downloading it, e.g. TensorFlow Datasets. If you still need to download some datasets use datamover machine.
The ImageNet Dataset¶
The ImageNet project is a large visual database designed for use in visual object recognition
software research. In order to save space in the filesystem by avoiding to have multiple duplicates
of this lying around, we have put a copy of the ImageNet database (ILSVRC2012 and ILSVR2017) under
/scratch/imagenet which you can use without having to download it again. For the future, the
ImageNet dataset will be available in
Warm Archive. ILSVR2017 also includes a dataset
for recognition objects from a video. Please respect the corresponding