Unable to Install hdf5, hdf5-devel and hdf5-static on Rocky Linux 8.7

If you are doing a dnf install on hdf5 packages, you will notice errors like the one below

nothing provides libsz.so.2()(64bit) needed by hdf5-1.10.5-4.el8.x86_64
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

To resolve the issue, you will need to install and enable PowerTools

Step 1: Install DNF plugins package

dnf install dnf-plugins-core

Step 2: Install EPEL

The reason is that some software from its source code requires some dependencies that are available in EPEL

dnf install epel-release

Step 3: Enable PowerTools repository on Rocky Linux 8

dnf config-manager --set-enabled powertools

Step 4: Now try installing HDF5

dnf install hdf5 hdf5-devel hdf5-static

Git clone fatal: Could not read from remote repository.

If you have an error

git clone git@github.com:kittycooldew/ansible_cluster.git
fatal: Could not read from remote repository.

If you encounter an SSH authentication issue, do add your key to the SSH keychain:

ssh-add ~/.ssh/id_rsa

If you encounter an error such as this

Could not open a connection to your authentication agent.

Start the process and add key to SSH Keychain

eval `ssh-agent -s`
ssh-add ~/.ssh/id_rsa

Try the git clone again. It should work


Gaussian Error – $’\r’: command not found

If you see errors like

/var/spool/pbs/mom_priv/jobs/729107.hpc-mn1.SC: line 2: $'\r': command not found
/var/spool/pbs/mom_priv/jobs/729107.hpc-mn1.SC: line 5: $'\r': command not found
/var/spool/pbs/mom_priv/jobs/729107.hpc-mn1.SC: line 8: $'\r': command not found
/var/spool/pbs/mom_priv/jobs/729107.hpc-mn1.SC: line 11: $'\r': command not found
/var/spool/pbs/mom_priv/jobs/729107.hpc-mn1.SC: line 16: $'\r': command not found
/var/spool/pbs/mom_priv/jobs/729107.hpc-mn1.SC: line 19: $'\r': command not found
/var/spool/pbs/mom_priv/jobs/729107.hpc-mn1.SC: line 22: $'\r': command not found

These errors are usually due to Windows-style newline characters that can cause issues. Please use the commands

$ dos2unix yourfile

This will remove the Windows-style newline characters

PackagesNotFoundError and Conda Install

If you are installing package with conda and you are encountering an issue.

PackagesNotFoundError: The following packages are not available from current channels:

- c-compiler
- fortran-compiler
- cxx-compiler

There is a workaround below. IThis is important as it tells conda to also look on the conda-forge channel when you search for packages.

conda config --append channels conda-forge
## Package Plan ##

  environment location: /usr/local/anaconda3-2022/envs/sagemath_env

  added / updated specs:
    - c-compiler
    - cxx-compiler
    - fortran-compiler
    - pkg-config

The following packages will be downloaded:

    package                    |            build
    _libgcc_mutex-0.1          |             main           3 KB
    _openmp_mutex-5.1          |            1_gnu          21 KB
    binutils-2.36.1            |       hdd6e379_2          27 KB  conda-forge
    binutils_impl_linux-64-2.36.1|       h193b22a_2        10.4 MB  conda-forge
    binutils_linux-64-2.36     |      hf3e587d_10          24 KB  conda-forge
    c-compiler-1.5.0           |       h166bdaf_0           5 KB  conda-forge
    cxx-compiler-1.5.0         |       h924138e_0           5 KB  conda-forge
    fortran-compiler-1.5.0     |       h2a4ca65_0           5 KB  conda-forge
    gcc-10.4.0                 |      hb92f740_10          24 KB  conda-forge
    gcc_impl_linux-64-10.4.0   |      h7ee1905_16        46.7 MB  conda-forge
    gcc_linux-64-10.4.0        |      h9215b83_10          25 KB  conda-forge
    gfortran-10.4.0            |      h0c96582_10          24 KB  conda-forge

Basic Introduction to Git (Part 2)

Initialising a Repository in an Existing Directory

If you wish to have a project directory under version control with GIt, do the following

$ cd /home/user/my_project
$ git init

If you wish to add existing files into the version control

$ git add *.sh
$ git add LICENSE
$ git commit --m "Gekko Menu Help Application"
[master (root-commit) c98ae91] Gekko Menu Help Application
 1 file changed, 73 insertions(+)
 create mode 100755 mymenu.sh

You have an initial commit and tracked files. Hooray.

Checking the status of your Files

[user1@node1 menu]$ git status
# On branch master
nothing to commit, working directory clean

This means you have a clean working directory; in other words, none of your tracked files are modified.

Adding new files to your Git Directory

Let’s say you added a new file called check_license_abaqus.sh into the Project Directory, you will have something like

# On branch master
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#       check_license_abaqus.sh
nothing added to commit but untracked files present (use "git add" to track)

To add files

[user1@node1 menu]$ git add check_license_abaqus.sh
[user1@node1 menu]$ git status
# On branch master
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#       new file:   check_license_abaqus.sh

To remove file

[user1@node1 menu]$ git rm check_license_abaqus.sh -f
rm 'check_license_abaqus.sh'
[user1@node1 menu]$ git status
# On branch master
nothing to commit, working directory clean

To see log, you want to use the command

[user1@node1 menu]$ git log
commit xxxxxxxxx
Author: user1 <kmyemail_used_in_Github@hotmail.com>
Date:   Sun Sep 25 23:50:33 2022 +0800

    Gekko Menu Help Application

There are many more usage. For more information, do take a look at 2.3 Git Basics – Viewing the Commit History


  1. 2.2 Git Basics – Recording Changes to the Repository
  2. 2.3 Git Basics – Viewing the Commit History
  3. 2.4 Git Basics – Undoing Things

Basic Introduction to GitHub (Part 1)

GitHub is the largest code-hosting platform in the world. It uses Git as version control and the repository is based on GitHub. Features such as Pull Requests, Project Boards and GitHub are central and found in one place.

Sign up for a Free Account

To start using GitHub, please go to https://github.com/join and follow the instruction

Creating a PAT of SSH Key

A PAT is a string of characters that can be used in place of a password against the GitHub API and on command lone.

You may need to understand the various scopes on GitHub such as repo, admin: repo_hook, users etc. For more information, do take a look at https://docs.github.com/en/developers/apps/building-oauth-apps/scopes-for-oauth-apps#available-scopes

For starters, you may want to go to https://github.com/settings/tokens and click on Generate new token

On Linux, you can generate your SSH key using the email that you have created in your GitHub User Account

[user1@node1 ~]$ ssh-keygen -t rsa -C "myemail_used_in_Github@hotmail.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/home/user1/.ssh/id_rsa):
/home/user1/.ssh/id_rsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/user1/.ssh/id_rsa.
Your public key has been saved in /home/user1/.ssh/id_rsa.pub.
The key fingerprint is:

Adding the SSH Key to the ssh-agent

Although this is not mandatory, adding the SSH Key to the SSH Agent is a good practice that will keep the SSH Key safe. The SSH-agent is an SSH Key Manager that helps to keep the SSH key safe because it protects your SSH keys from being exported. The SSH Agent also saves you from having to type the passphrase you create. every time your SSH key is used.

Before you check, you want to check your ~/.ssh/config first

$ vim ~/.ssh/config
Host * 
AddKeysToAgent yes

At the Terminal,

$ ssh-add ~/.ssh/id_rsa

Copy your SSH Public Key to the field. In your ~/.ssh/config, it should have a .pub extension like id_rsa.pub

Configuring Git

To intialise the Git. Do the following. You may want to take a look at

[user1@node1 ~]$ git config --global user.name "Melvin Soh"
[user1@node1 ~]$ git config --global user.email "kittycool@hotmail.sg"
[user1@node1 ~]$ git config --global init.defaultBranch main
[user1@node1 ~]$ git config --list
credential.helper=netrc -f ~/.netrc.gpg -v

To continue, See Basic Introduction to GitHub (Part 2)


  1. 1.5 Getting Started – Installing Git
  2. 1.6 Getting Started – First-Time Git Setup

Installing CP2K with Nvidia HPCX on Rocky Linux 8.5

What is HPCX?

NVIDIA® HPC-X® is a comprehensive software package that includes Message Passing Interface (MPI), Symmetrical Hierarchical Memory (SHMEM) and Partitioned Global Address Space (PGAS) communications libraries, and various acceleration packages. For more information, do take a look at https://developer.nvidia.com/networking/hpc-x

What is CP2K?

CP2K is a quantum chemistry and solid state physics software package that can perform atomistic simulations of solid state, liquid, molecular, periodic, material, crystal, and biological systems. CP2K provides a general framework for different modeling methods such as DFT using the mixed Gaussian and plane waves approaches GPW and GAPW. Supported theory levels include DFTB, LDA, GGA, MP2, RPA, semi-empirical methods (AM1, PM3, PM6, RM1, MNDO, …), and classical force fields (AMBER, CHARMM, …). CP2K can do simulations of molecular dynamics, metadynamics, Monte Carlo, Ehrenfest dynamics, vibrational analysis, core level spectroscopy, energy minimisation, and transition state optimization using NEB or dimer method. (Detailed overview of features.). For more information, do take a look at https://www.cp2k.org/

Getting the CP2K

git clone --recursive https://github.com/cp2k/cp2k.git cp2k

Unpack hpcx and Optimised OpenMPI Libraries. For more information on installation, do take a look at Installing and Loading HPC-X

Extract hpcx.tbz into your current working directory.

% tar -xvf hpcx.tbz
% cd hpcx
% export HPCX_HOME=$PWD
% module use $HPCX_HOME/modulefiles
% module load hpcx

Use the CP2K Toolchain to Compile for the easiest

% cd cp2k
% cd /usr/local/software/cp2k/tools/toolchain
% ./install_cp2k_toolchain.sh --no-check-certificate --with-openmpi

Compiling the CP2K

==================== generating arch files ====================
arch files can be found in the /usr/local/software/cp2k/tools/toolchain/install/arch subdirectory
Wrote /usr/local/software/cp2k/tools/toolchain/install/arch/local.ssmp
Wrote /usr/local/software/cp2k/tools/toolchain/install/arch/local_static.ssmp
Wrote /usr/local/software/cp2k/tools/toolchain/install/arch/local.sdbg
Wrote /usr/local/software/cp2k/tools/toolchain/install/arch/local_coverage.sdbg
Wrote /usr/local/software/cp2k/tools/toolchain/install/arch/local.psmp
Wrote /usr/local/software/cp2k/tools/toolchain/install/arch/local.pdbg
Wrote /usr/local/software/cp2k/tools/toolchain/install/arch/local_static.psmp
Wrote /usr/local/software/cp2k/tools/toolchain/install/arch/local_warn.psmp
Wrote /usr/local/software/cp2k/tools/toolchain/install/arch/local_coverage.pdbg
========================== usage =========================
Now copy:
  cp /usr/local/software/cp2k/tools/toolchain/install/arch/* to the cp2k/arch/ directory
To use the installed tools and libraries and cp2k version
compiled with it you will first need to execute at the prompt:
  source /usr/local/software/cp2k/tools/toolchain/install/setup
To build CP2K you should change directory:
  cd cp2k/
  make -j 80 ARCH=local VERSION="ssmp sdbg psmp pdbg"

Do exactly on the ending instruction

% cp /usr/local/software/cp2k/tools/toolchain/install/arch/* /usr/local/cp2k/arch
% source /usr/local/software/cp2k/tools/toolchain/install/setup
% cd /usr/local/software/cp2k
% make -j 32 ARCH=local VERSION="ssmp sdbg psmp pdbg"

If you encounter an error during making like the one below, just do an install for liblsan

% /usr/bin/ld: cannot find /usr/lib64/liblsan.so.0.0.0
% dnf install liblsan -y

If you encounter error like the ones below for fftw libraries,

/usr/bin/ld: cannot find -lfftw3_mpi
collect2: error: ld returned 1 exit status

You have to go to the supporting package libraries and do some editing.

% cd /usr/local/software/cp2k/tools/toolchain/install/fftw-3.3.10/lib
% ln -s libfftw3.a libfftw3_mpi.a
% ln -s libfftw3.la libfftw3_mpi.la

Try again

% cd /usr/local/software/cp2k
% make -j 32 ARCH=local VERSION="ssmp sdbg psmp pdbg"

If successful, you should see binaries at /usr/local/software/cp2k/exe/local

Compiling VASP.6.3.0 with GPGPU Capability using Nvidia HPC-SDK on Rocky Linux 8.5

To Compile VASP with GPGPU Capability using Nvidia HPC-SDK. For more information, do take a look at VASP – Install VASP.6.X.X

VASP support several compilers. But we will be focusing on Nvidia HPC-SDK only for this blog. To download the NVIDIA HPC-SDK

To compile Nvidia HPC SDK, do take a look at HPC SDK Documentation

% tar -xpfz <tarfile>.tar.gz

You may want to use modulefiles provided at hpc-sdk if you are using Module Environment

% module use /usr/local/nvidia/hpc_sdk/modulefiles

You should be able to see something like

------------------- /usr/local/nvidia/hpc_sdk/modulefiles ---------------
nvhpc-byo-compiler/22.5  nvhpc-nompi/22.5  nvhpc/22.5

You can untar the VASP.6.3.3. and potpaw_PBE.54

% tar -xvf vasp.6.3.0.tar
% tar -xvf potpaw_PBE.54.tar 

At the installation base of vasp.6.3.0 base

% cp arch/makefile.include.nvhpc_ompi_mkl_omp_acc ./makefile.include

Load the Nvidia GPGPU SDK and compile. If you are using OneAPI Intel Compilers, you can use module use after compilation. It will not be covered in this write-up.

% module use /usr/local/intel/oneapi-2022/modulefiles
% module load nvhpc/22.5
% module load mkl/latest
% make veryclean
% make DEPS=1 -j

If during the make, you encounter the error

/usr/local/nvidia/hpc_sdk/Linux_x86_64/22.5/comm_libs/openmpi/openmpi-3.1.5/bin/.bin/mpif90: error while loading shared libraries: libatomic.so.1: cannot open shared object file: No such file or directory

You can dnf install libatomic

% dnf install libatomic -y

Try Compiling again


  1. Installing VASP.6.X.X

Failover feature “HFSS SBR+Solve” is not available. Request name hfssbr_solve does not exist in the licensing pool.

During usage of ANSYS EM, you may encounter issues like the one below.

Fail to enable feature using current license setting. Note that pro, premium, enterprise licenses are available on your server. To use these licenses check the corresponding UI option. For more information, search "PPE" in the help documentation. Failover feature "HFSS SBR+Solve" is not available. Request name hfssbr_solve does not exist in the licensing pool. No such feature exists. Feature: hfssbr_solveLicensepath: 1055@kangkong.hpc.ntu.edu.sg: FlexNet Licensing error:-5,147

The resolution is to activate the correct product licensing which are not activated by default. See the Pix on how to activate the licensingsee less.