Software 2: Difference between revisions

From NU HPC Wiki
Jump to navigation Jump to search
No edit summary
m (Admin moved page Software to Software 2 without leaving a redirect)
 
(90 intermediate revisions by the same user not shown)
Line 1: Line 1:
Dear Shabyt users. New software can be installed system-wide at the request of users, provided it meets the following criteria:
This page gives an overview of the software available in NU HPC facilities and explains how to use it.    
* It is either freely available or NU has a site license for it.
* It is compatible with the existing OS environment on Shabyt.
* It can utilize resources available on Shabyt effectively.
For assistance regarding new software packages, please contact Shabyt system administrators at [mailto:hpcadmin@nu.edu.kz hpcadmin@nu.edu.kz].


Moreover please keep in mind that software applications are installed in accordance with priorities.
== Software Installation ==
* Software which can be installed via EasyBuild application falls under this category. List of supported EasyBuild softwares you can find here: [https://docs.easybuild.io/version-specific/supported-software/ EasyBuild]
Software installation on the Shabyt system follows specific criteria to ensure compatibility and effective utilization of resources. Users can request the installation of new software if it meets the following conditions:
* Applications that are crucial for User Groups but cannot be installed through EasyBuild fall under this priority.
 
* Individual user requests. Such requests will be processed only after other priorities have been fulfilled.
* '''Availability and Licensing:''' The software must be freely available or covered by a site license held by NU.
__TOC__
* '''Compatibility:''' It should be compatible with the existing operating system environment on Shabyt to ensure seamless integration and functionality.
Shabyt uses Environment modules to dynamically set up environments for different applications. Module commands set, change, or delete environment variables that are needed for a particular application. The ‘<code>module load</code>‘ command will set ''PATH'', ''LD_LIBRARY_PATH'' and other environment variables such that user may choose a desired version of applications or libraries more easily. More details can be found [https://lmod.readthedocs.io/en/latest/ here].
* '''Resource Utilization:''' The software should be able to effectively utilize the resources available on Shabyt, optimizing performance and efficiency.
===== '''Environment Module commands''' =====
 
For guidance or support regarding the installation of new software packages, users should contact the Shabyt system administrators at hpcadmin@nu.edu.kz.
 
Additionally, software are installed in accordance with priorities.
 
* '''Priority 1:''' Software that can be installed using the EasyBuild application is given first priority. A list of supported EasyBuild software can be found [https://docs.easybuild.io/version-specific/supported-software/#arcashla here].
* '''Priority 2:''' Applications which can't be installed through EasyBuild, but essential for multiple User Groups are prioritized next.
* '''Priority 3:''' Application which can't be installed through EasyBuild, but essential for individual users.
 
It's important to know that this isn't a complete list of all the software in Shabyt system.
== Environment Modules ==
In linux environment variables are values that can change and impact how programs behave on a computer system. They are name-value pairs that all processes can access within a particular user environment or shell session. These variables provide a flexible and convenient method for managing system-wide settings, configuring applications, and customizing system behavior.
 
Shabyt uses Environment modules (also know as LMOD) to dynamically set up environment variables for different software. Module commands set, change, or delete environment variables that are needed for a particular software. The ‘<code>module load</code>‘ command will set ''PATH'', ''LD_LIBRARY_PATH'' and other environment variables such that user may choose a desired version of applications or libraries more easily. More details can be found [https://lmod.readthedocs.io/en/latest/ here].
{| class="wikitable"
{| class="wikitable"
|+
|+Environment module commands
!Command
!Command
!Description
!Description
Line 45: Line 54:
|-
|-
|module purge
|module purge
|
|Unload all currently loaded modules
|}
|}


== Anaconda ==
== Anaconda ==
'''Description:''' "Anaconda" (shortly "conda"), a Python package management, permits the creation of "environments," which are sets of modifiable packages. It accomplishes this by placing them in your residence. This page will take you through conda loading, environment creation, and modification so you may install and utilize any Python packages you require.
'''Description:''' Anaconda, also known as "conda," is a tool for managing Python packages. It helps you create virtual environments for different Python and package versions. You can use Anaconda to install, remove, and update packages within your project environments. For instance you can create virtual environment for game development which requires Pygame with version of Python and you can create environment for machine learning which requires Pytorch with new version of Python.  
 
'''Usage:''' module load Anaconda3/2022.05 


'''Usage:''' Anaconda could be loaded by: module load Anaconda3/2022.05
'''Working with Anaconda environments'''


'''Creating the Conda Environment:''' Every user can create their own environments, and packages that are shared with the system-wide environments will not be reinstalled or copied to your file store; instead, they will be symlinked. This reduces the amount of space required in your /home directory to install numerous Python environments. To build a pristine environment with only Python 3.9 and numpy, execute: <code>conda create -n mynumpy1 python=3.9 numpy</code> To alter an existing environment, such as one of the anaconda installations, you can clone it: <code>conda create --clone mynumpy2 -n mynumpy3</code>
Below is a list of main commands you should use in order to start working with Anaconda.
# To Check available environments, please type: <code>conda env list</code>
# View a list of packages in an environment
#* If the environment is not activated, please type: <code>conda list -n virtualenv</code>
#* If the environment is activated, then type: <code>conda list</code>
# Create Conda environment
#* Create an environment: <code>conda create -n virtualenv</code>
#* Create an environment with a specific Python version: <code>conda create -n virtualenv python=3.12</code>
#* Create an environment to target directory: <code>conda create -p /shared/home/{username}/.conda/envs/virtualenv</code>
# Activate an environment: <code>source activate virtualenv</code>
# Deactivate an environment:  <code>conda deactivate</code>
# Remove an environment
<code>conda remove -n virtualenv --all</code> or <code>conda env remove -n virtualenv</code>


'''Package Installation Within a Conda Environment:''' After creating your own environment, you can install more packages or other versions of existing programs. There are two ways to accomplish this: conda and pip. If a package is accessible through conda, it is strongly advised that you use it to install packages. Using conda, you can search for packages: <code>conda search pandas</code> then download the package by following these steps: <code>conda install pandas</code> When attempting to install packages outside of your environment, you will receive a permission denied message. If this occurs, create or activate an environment you own. If a package is not available via conda, you can search for and install it using pip: <code>pip search colormath pip install colormath</code>
'''Working with packages'''


'''Usage of conda Environments:''' Once the conda module has been loaded, the required conda environments must be loaded or created. See the conda manual for documentation on conda environments. You can load a conda environment with the following: <code>source activate mycondaenv</code> where mycondaenv is the environment's name; unload one with: <code>source deactivate</code> which returns you back to the base environment. You can list all the accessible environments by using: <code>conda env list</code> A set of anaconda environments is provided system-wide; these are installed with the anaconda version number in the environment name and are never updated. Therefore, they will provide a fixed base for alternative environments or for direct use.
Install packages into ''virtualenv'' environment


'''Using Conda in conjunction with the SLURM scheduler:''' Using the Anaconda batch mode To submit jobs to the Slurm job scheduler, you must run your primary application in batch mode from within your Conda environment. There are several stages to take: Create a script for application Create a Slurm script job to execute the application script sbatch is used to submit the job script to the task scheduler. Your application script should provide the necessary sequence of commands for your analysis. A Slurm job script is a Bash shell script of a particular type that the Slurm job scheduler recognizes as a job. Create a batch job submission script like the following and name it myscript.slurm: <code><clippy show="true"></code><syntaxhighlight lang="bash">
* If the environment is not activated, please type: <code>conda --name virtualenv install PACKAGENAME</code>
!/bin/bash
* If the environment is activated, please type: <code>conda install PACKAGENAME</code>
* If you want to install multiple packages at once: <code>conda install pkg1 pkg2 pkg3</code>
* If you need to install package with specific version: <code>conda install numpy=1.15.2</code>


SBATCH --partition=NVIDIA
'''External links''' 
SBATCH --nodes=1
SBATCH --ntasks=1
SBATCH --cpu-per-task=8
SBATCH --mem=16GB
SBATCH --time=1:00:00
</syntaxhighlight><code>module purge eval $(conda shell.bash hook) conda activate myenvironment python script.py</code> </clippy> The following describes each line: Command or Slurm option Description


# !/bin/bash
[https://docs.conda.io/projects/conda/en/latest/ Documentation]


Use BASH to execute the script
[https://docs.conda.io/projects/conda/en/latest/user-guide/getting-started.html User Guide]


# SBATCH
[https://www.youtube.com/watch?v=23aQdrS58e0 Video]


Syntax that allows SLURM to read your requests (ignored by BASH) --partition=NVIDIA Submit job to the NVIDIA partition --nodes=1 Use only one compute node --ntasks=1 Run only one task --cpus-per-task=8 Reserve 8 CPUs for the user --mem=16GB Reserve 16GB of RAM --module purge Purge or clear environment modules --time=1:00:00 Reserve resources for an hour eval $(conda shell.bash hook) Initialize the shell to use Conda conda activate myenvironment Activate your Conda environment, i.e., myenvironment python script.py Use python to run script.py Be sure to alter the requested resources based on your needs, but keep in mind that requesting fewer resources will reduce the waiting time for your work. To fully exploit the resources, particularly the amount of cores, it may be necessary to modify your application script. You can build application scripts and job scripts on your local machine and then move them to the cluster, or you can develop them directly on the cluster using one of the various text editor modules (e.g., nano, micro, vim). Submit the job to the job scheduler using the Slurm's sbatch command: <code>sbatch myscript.slurm</code> To determine the status of your position, enter: <code>myqueue</code> If there is no job status listed, then the job has been finished. The job's findings will be logged and, by default, stored in a plain-text file of the following format: <code>slurm-<jobid>.outin</code> in the identical directory from which the job script was submitted. To access this file's contents, enter: <code>less slurm-<jobid>.out</code> then press q to close the viewer.
[https://docs.conda.io/projects/conda/en/4.6.0/_downloads/52a95608c49671267e40c689e0bc00ca/conda-cheatsheet.pdf Conda Cheat Sheet]


== CUDA ==
== CUDA ==
'''Description:''' Nvidia created the parallel computing platform and programming model known as CUDA for use with its GPUs for general computing (graphics processing units). By utilizing the capability of GPUs for the parallelizable portion of the calculation, CUDA enables developers to accelerate computationally heavy applications.
CUDA (Compute Unified Device Architecture) is a parallel computing platform and application programming interface model created by NVIDIA. It allows to use NVIDIA graphics processing units (GPUs) for general purpose processing.  


'''Usage:''' module load CUDA/11.4.1 To check if CUDA has been loaded, type: <code>nvcc --version</code>
'''Usage:''' module load cuda/11.4.1


To check GPUs on GPU nodes: <code>nvidia-smi --list-gpus</code>
== GCC ==
== GCC ==
The GNU Compiler Collection, commonly known as GCC, is a set of compilers and development tools available for Linux, Windows, various BSDs, and a wide assortment of other operating systems. It includes support primarily for C and C++ and includes Objective-C, Ada, Go, Fortran, and D. The Free Software Foundation (FSF) wrote GCC and released it as completely free (as in libre) software.
The GNU Compiler Collection, commonly known as GCC, is a set of compilers and development tools available for Linux, Windows, various BSDs, and a wide assortment of other operating systems. It includes support primarily for C and C++ and includes Objective-C, Ada, Go, Fortran, and D. The Free Software Foundation (FSF) wrote GCC and released it as completely free (as in libre) software.
Line 92: Line 112:
'''GCC examples'''
'''GCC examples'''


Compiling a program with GCC can be a straightforward matter/<syntaxhighlight lang="bash">
Compiling a program with GCC can be a straightforward matter
gcc hello.c -o hello
 
</syntaxhighlight>Running this command processes the hello.c file and generates a binary called “hello”. Additional parameters can be passed.<syntaxhighlight lang="bash">
<code>gcc hello.c -o hello</code>
gcc hello.c -O3 -o hello
</syntaxhighlight>In this example, the optimization parameter is set to 3, leading to more optimized code generation.


Additional libraries can be included as well.<syntaxhighlight lang="bash">
Running this command processes the hello.c file and generates a binary called “hello”.
gcc hello.c -lncurses -o hello
 
</syntaxhighlight>This example includes the ncurses library.
Additional parameters can be passed.
 
<code>gcc hello.c -O3 -o hello</code>
 
In this example, the optimization parameter is set to 3, leading to more optimized code generation.


More complex compilations are managed by ''Makefiles'' and are invoked with the “make” command.
More complex compilations are managed by ''Makefiles'' and are invoked with the “make” command.


'''Additional information'''
'''External link'''
 
[https://gcc.gnu.org/ Official Page ]
 
== Apptainer ==
Singularity is an open-source application for creating and running software containers, designed primarily for high-performance computing on shared Linux-based computing clusters like CARC systems.
Singularity containers provide a '''custom user space''' and enable portable, reproducible, stable, and secure software environments on Linux systems. A Singularity container bundles a primary application and all of its dependencies into a single image file, which can also include data, scripts, and other files if desired. In addition, Singularity containers have direct access to the Linux kernel on the host system (e.g., Discovery or Endeavour compute nodes), so there is no substantial performance penalty when using a container compared to using natively installed software on the host system.
 
With Singularity, you can:
 
* Install anything you want (based on any Linux operating system)
* Ease installation issues by using pre-built container images
* Ensure the same software stack is used among a research group
* Use the same software stack across Linux systems (e.g., any HPC center or cloud computing service)
 
== Ansys ==
'''Description:''' The ANSYS suite of tools can be used to numerically simulate a wide range of structural and fluid dynamics issues encountered in several engineering, physics, medical, aerospace, and automotive sector applications.
 
'''Usage:''' Loading the ANSYS module module load ansys/2022r1 Launching the workbench is accomplished by: runwb2 The workbench provides access to Fluent, CFX, ICEM, Mechanical APDL/model, and many other languages and models. The appropriate GUIs can be launched outside of the workbench using fluent, cfx5pre, icemcfd, and launcher.


GNU Compiler Collection official page: https://gcc.gnu.org/
== GROMACS ==
'''Description:''' GROningen MAchine for Chemical Simulations (GROMACS) is a free, open-source, molecular dynamics package. GROMACS can simulate the Newtonian equations of motion for systems with hundreds to millions of particles. GROMACS is primarily designed for biochemical molecules like proteins, lipids and nucleic acids that have a lot of complicated bonded interactions, but since GROMACS is extremely fast at calculating the nonbonded interactions (that usually dominate simulations), many groups are also using it for research on non-biological systems, e.g. polymers.


GCC Online documentation: https://gcc.gnu.org/onlinedocs/
'''Usage:''' To load GROMACS software: module load GROMACS/2021.5-foss-2021b-CUDA-11.4.1 The GROMACS executable is either gmx or gmx mpi if an OpenMPI module is used. When you type gmx help commands, a list of gmx commands and their functions will be displayed.

Latest revision as of 04:37, 3 July 2024

This page gives an overview of the software available in NU HPC facilities and explains how to use it.

Software Installation

Software installation on the Shabyt system follows specific criteria to ensure compatibility and effective utilization of resources. Users can request the installation of new software if it meets the following conditions:

  • Availability and Licensing: The software must be freely available or covered by a site license held by NU.
  • Compatibility: It should be compatible with the existing operating system environment on Shabyt to ensure seamless integration and functionality.
  • Resource Utilization: The software should be able to effectively utilize the resources available on Shabyt, optimizing performance and efficiency.

For guidance or support regarding the installation of new software packages, users should contact the Shabyt system administrators at hpcadmin@nu.edu.kz.

Additionally, software are installed in accordance with priorities.

  • Priority 1: Software that can be installed using the EasyBuild application is given first priority. A list of supported EasyBuild software can be found here.
  • Priority 2: Applications which can't be installed through EasyBuild, but essential for multiple User Groups are prioritized next.
  • Priority 3: Application which can't be installed through EasyBuild, but essential for individual users.

It's important to know that this isn't a complete list of all the software in Shabyt system.

Environment Modules

In linux environment variables are values that can change and impact how programs behave on a computer system. They are name-value pairs that all processes can access within a particular user environment or shell session. These variables provide a flexible and convenient method for managing system-wide settings, configuring applications, and customizing system behavior.

Shabyt uses Environment modules (also know as LMOD) to dynamically set up environment variables for different software. Module commands set, change, or delete environment variables that are needed for a particular software. The ‘module load‘ command will set PATH, LD_LIBRARY_PATH and other environment variables such that user may choose a desired version of applications or libraries more easily. More details can be found here.

Environment module commands
Command Description
module avail List of available software
module keyword [word] Search for available modules matching the keyword
module spider [word] Show the details of any modules matching the keyword
module whatis [module] Show the short description about module
module load [package1] [package2] Load the environment for the default version of the modulefile
module load [package]/[version] Load the environment for the specified version of module
module unload [package1] [package2] Unload previously loaded packages
module swap [moduleA] [moduleB] Unload modulefile A and load modulefile B
module list List any currently loaded module(s)
module purge Unload all currently loaded modules

Anaconda

Description: Anaconda, also known as "conda," is a tool for managing Python packages. It helps you create virtual environments for different Python and package versions. You can use Anaconda to install, remove, and update packages within your project environments. For instance you can create virtual environment for game development which requires Pygame with version of Python and you can create environment for machine learning which requires Pytorch with new version of Python.

Usage: module load Anaconda3/2022.05

Working with Anaconda environments

Below is a list of main commands you should use in order to start working with Anaconda.

  1. To Check available environments, please type: conda env list
  2. View a list of packages in an environment
    • If the environment is not activated, please type: conda list -n virtualenv
    • If the environment is activated, then type: conda list
  3. Create Conda environment
    • Create an environment: conda create -n virtualenv
    • Create an environment with a specific Python version: conda create -n virtualenv python=3.12
    • Create an environment to target directory: conda create -p /shared/home/{username}/.conda/envs/virtualenv
  4. Activate an environment: source activate virtualenv
  5. Deactivate an environment: conda deactivate
  6. Remove an environment

conda remove -n virtualenv --all or conda env remove -n virtualenv

Working with packages

Install packages into virtualenv environment

  • If the environment is not activated, please type: conda --name virtualenv install PACKAGENAME
  • If the environment is activated, please type: conda install PACKAGENAME
  • If you want to install multiple packages at once: conda install pkg1 pkg2 pkg3
  • If you need to install package with specific version: conda install numpy=1.15.2

External links

Documentation

User Guide

Video

Conda Cheat Sheet

CUDA

CUDA (Compute Unified Device Architecture) is a parallel computing platform and application programming interface model created by NVIDIA. It allows to use NVIDIA graphics processing units (GPUs) for general purpose processing.

Usage: module load cuda/11.4.1

To check GPUs on GPU nodes: nvidia-smi --list-gpus

GCC

The GNU Compiler Collection, commonly known as GCC, is a set of compilers and development tools available for Linux, Windows, various BSDs, and a wide assortment of other operating systems. It includes support primarily for C and C++ and includes Objective-C, Ada, Go, Fortran, and D. The Free Software Foundation (FSF) wrote GCC and released it as completely free (as in libre) software.

GCC is a toolchain that compiles code, links it with any library dependencies, converts that code to assembly, and then prepares executable files. It follows the standard UNIX design philosophy of using simple tools that perform individual tasks well. The GCC development suite utilizes these discrete tools to compile software.

When you run GCC on a source code file, it first uses a preprocessor to include header files and discard comments. Next, it tokenizes the code, expands macros, detects any compile-time issues, then prepares it for compilation. It is then sent to the compiler, which creates syntax trees of the program’s objects and control flow and uses those to generate assembly code. The assembler then converts this code into the binary executable format of the system. Finally, the linker includes references to any external libraries as needed. The finished product is then executable on the target system.

GCC examples

Compiling a program with GCC can be a straightforward matter

gcc hello.c -o hello

Running this command processes the hello.c file and generates a binary called “hello”.

Additional parameters can be passed.

gcc hello.c -O3 -o hello

In this example, the optimization parameter is set to 3, leading to more optimized code generation.

More complex compilations are managed by Makefiles and are invoked with the “make” command.

External link

Official Page

Apptainer

Singularity is an open-source application for creating and running software containers, designed primarily for high-performance computing on shared Linux-based computing clusters like CARC systems. Singularity containers provide a custom user space and enable portable, reproducible, stable, and secure software environments on Linux systems. A Singularity container bundles a primary application and all of its dependencies into a single image file, which can also include data, scripts, and other files if desired. In addition, Singularity containers have direct access to the Linux kernel on the host system (e.g., Discovery or Endeavour compute nodes), so there is no substantial performance penalty when using a container compared to using natively installed software on the host system.

With Singularity, you can:

  • Install anything you want (based on any Linux operating system)
  • Ease installation issues by using pre-built container images
  • Ensure the same software stack is used among a research group
  • Use the same software stack across Linux systems (e.g., any HPC center or cloud computing service)

Ansys

Description: The ANSYS suite of tools can be used to numerically simulate a wide range of structural and fluid dynamics issues encountered in several engineering, physics, medical, aerospace, and automotive sector applications.

Usage: Loading the ANSYS module module load ansys/2022r1 Launching the workbench is accomplished by: runwb2 The workbench provides access to Fluent, CFX, ICEM, Mechanical APDL/model, and many other languages and models. The appropriate GUIs can be launched outside of the workbench using fluent, cfx5pre, icemcfd, and launcher.

GROMACS

Description: GROningen MAchine for Chemical Simulations (GROMACS) is a free, open-source, molecular dynamics package. GROMACS can simulate the Newtonian equations of motion for systems with hundreds to millions of particles. GROMACS is primarily designed for biochemical molecules like proteins, lipids and nucleic acids that have a lot of complicated bonded interactions, but since GROMACS is extremely fast at calculating the nonbonded interactions (that usually dominate simulations), many groups are also using it for research on non-biological systems, e.g. polymers.

Usage: To load GROMACS software: module load GROMACS/2021.5-foss-2021b-CUDA-11.4.1 The GROMACS executable is either gmx or gmx mpi if an OpenMPI module is used. When you type gmx help commands, a list of gmx commands and their functions will be displayed.