Software installation
1. Software compilation process (recommended)
The current supercomputing platform has two compilation environments, covering Intel and GNU compilers, which can be loaded using the module command.
If required for every session, add the configuration to the .bashrc file in the user's home directory to automatically load the compilation environment upon login.
The general software compilation process is as follows:
(1) Preparation
Before configuring the build, consult official documentation to determine the required build environment, dependency libraries, software components to install, and the installation path.
(2) Configuration
Software configuration information is stored in a configure file generated by the autoconf tool. Run the script with the --help or -h flag to view specific build parameters for the software.
a. Standard usage: execute ./configure --prefix=folder to specify the installation path using the --prefix flag.
b. If compiling with Intel compilers, use F77=ifort FC=ifort CC=icc CXX=icpc ./configure --prefix=folder to specify the compilers.
(3) Compilation
Use the make command to compile. Typically, use the -j flag to specify the number of threads (defaults to the number of machine cores if omitted). You can run make directly or use make -j <thread_count> for multi-threaded acceleration.
(4) Installation
After make completes without errors, run make install to install the software into the directory specified by the prefix parameter in configure.
For simple source programs, the compiler can first generate object files, which are then linked to produce the executable.
2. Python Environment Installation and Usage (Conda Tool)
The cluster's default Python environment is version 2.7, which lacks relevant dependency packages. If you require specific Python dependencies or a newer Python version, it is recommended to create your own Python environment and install the necessary packages (note that only a 3.9 environment is available via modules).
1. Populate the .condarc file in the home directory by executing the following command:
cat > ~/.condarc << "EOF"
channels:
- defaults
show_channel_urls: true
default_channels:
- https://mirrors.shanhe.com/anaconda/pkgs/main
- https://mirrors.shanhe.com/anaconda/pkgs/r
- https://mirrors.shanhe.com/anaconda/pkgs/msys2
custom_channels:
bioconda: https://mirrors.shanhe.com/anaconda/cloud
conda-forge: https://mirrors.shanhe.com/anaconda/cloud
ssl_verify: false
EOF
2. Load the Conda environment
module load conda3
3. Create a Conda environment
conda create -n python39 python=3.9
# -n: Set the name of the new environment
# python=3.9 specifies the Python version for the new environment; this parameter is optional
# You can also use the -y flag to skip the installation confirmation prompt.
4. Using Conda
# Activate and load the Python environment
conda activate python39
# conda installation command
conda install gatk
# Install a specific version
# conda install <package_name>=<version_number>
conda install gatk=3.7
# conda search for required packages
conda search gatk
# Update a specific package
conda update gatk
# Uninstall a specific package
conda remove gatk
5. Initialize the Conda environment for the account
# Configure conda environment creation and automatic account loading
# Add the following command to the ~/.bashrc file
module load conda3
conda activate python39
Appendix: Installing software using the pip command
# The following example demonstrates installing the numpy library via pip
pip install numpy -i https://mirrors.shanhe.com/simple --trusted-host mirrors.shanhe.com
3. Binary Installation (Not Recommended)
If you have the necessary privileges, you can install software using binary methods, such as the yum and rpm commands.
0. Prerequisite: Add host
vi /etc/hosts
### Append the line 10.251.102.1 mirrors.shanhe.com
10.251.102.1 mirrors.shanhe.com
## Save and exit: :wq
1. CentOS 7 Yum Source Configuration
# Modify the file /etc/yum.repos.d/CentOS-Base.repo
# Replace with the following content
[base]
name=CentOS-$releasever - Base - mirrors.shanhe.com
failovermethod=priority
baseurl=http://10.251.102.1/centos/$releasever/os/$basearch/
gpgcheck=0
enabled=1
[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
baseurl=http://10.251.102.1/epel/7/$basearch
failovermethod=priority
enabled=1
gpgcheck=0
3. Perform operations using the yum command
# 1. List all available updates: yum check-update
# 2. Update all packages: yum update
# 3. Install a specific package: yum install <package_name>
# 4. Update a specific package: yum update <package_name>
# 5. List all installable packages: yum list
# 6. Remove a package: yum remove <package_name>
# 7. Search for packages: yum search <keyword>