H5py¶
Important
Discoverer HPC provides public access to the h5py module included in TensorFlow and PyTorch installations.
Accessing h5py¶
To use h5py on Discoverer HPC you should stick to Intel Distribution for Python. To obtain access to h5py you should load either intel.universe.tensorflow
or intel.universe.pytorch
environment modules:
module load intel.universe.tensorflow
or
module load intel.universe.pytorch
Afterwards h5py can be imported by the Intel Python interpreter.
Checking the version¶
The easiest way to check the versions of the h5py and linked HDF5 library is to execute the following Slurm batch script:
#!/bin/bash
#
#SBATCH --partition=cn # Partition name (ask the support team to clarify it)
#SBATCH --job-name=h5py
#SBATCH --time=00:01:00 # WallTime - one minute is more than enough here
#SBATCH --nodes 1 # May vary
#SBATCH --ntasks-per-node 1 # Must be 1
#SBATCH --cpus-per-task 1 # Must be 1
#SBATCH -o slurm.check_h5py_version.out # STDOUT
#SBATCH -e slurm.check_h5py_version.err # STDERR
module purge
module load intel.universe.pytorch
cd $SLURM_SUBMIT_DIR
python -c "import h5py;print('Linked HDF5 library:',h5py.version.hdf5_version)"
python -c "import h5py;print('H5py version:',h5py.version.version)"
To do that, store the script content into a file, for example /discofs/${USER}/check_h5py_version.sbatch
and submit it as a job to the queue:
cd /discofs/${USER}/check_h5py_version.sbatch
sbatch check_h5py_version.sbatch
Then check the content of the file slurm.check_h5py_version.out
to find out which verions of HDF5 and h5py are reported there.
Getting help¶
See Getting help