IT wiki

VU MIF STSC

User Tools

Site Tools


en:hpc

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
en:hpc [2026/11/19 14:20] – eduardasen:hpc [2026/11/19 14:21] (current) – old revision restored (2026/10/02 12:41) eduardas
Line 1: Line 1:
-====== First Successful Job (15 Minutes) ======+====== Description of the Equipment ======
  
-This guide walks you through the basic HPC workflow:+A High Performance Computing (HPC) is a specially designed network of computers capable of running applications that can exchange data efficiently.
  
-  - Connect to the HPC system +VU MIF HPC consists of a supercomputer from the clusters (the first number is the actual and available amount):
-  - Understand the difference between login and compute nodes +
-  - Create and submit your first job +
-  - Monitor job execution +
-  - View job results +
-  - Request CPU and memory resources +
-  - Learn how project allocations work +
-  - Run a multi-core Python application +
-  - Verify CPU utilization +
-  - Submit a GPU job+
  
-If you can complete this guide, you are ready to start running your own workloads on the HPC cluster.+^Title ^Nodes ^CPU ^GPU ^RAM        ^HDD    ^Network ^Notes| 
 +^main        ^35/36  ^48  ^0   ^384GiB     ^0      ^1Gbit/s, 2x10Gbit/s, 4xEDR(100Gbit/s) infiniband ^[[https://ark.intel.com/content/www/us/en/ark/products/192447/intel-xeon-gold-6252-processor-35-75m-cache-2-10-ghz.html|CPU]]| 
 +^gpu         ^3/3    ^40  ^8xV100   ^512GB/32GB  ^7TB   ^2x10Gbit/s, 4xEDR(100Gbit/s) infiniband ^[[https://ark.intel.com/content/www/us/en/ark/products/91753/intel-xeon-processor-e5-2698-v4-50m-cache-2-20-ghz.html|CPU]] [[https://en.wikipedia.org/wiki/Nvidia_DGX#DGX-1|NVIDIA DGX-1]]| 
 +^power       ^2/2    ^32  ^4   ^1024GB/32GB ^1.8TB ^2x10Gbit/s, 4xEDR(100Gbit/s) infiniband ^[[https://www.ibm.com/products/power-systems-ac922|IBM Power System AC922]]|
  
-===== Before You Start =====+Total **40/41** nodes, **1912** CPU cores with **17TB** RAM, **32** GPU with **1TB** RAM.
  
-Make sure that:+The processor below = CPU = core - a single core of the processor (with all hyperthreads if they are turned on).
  
-  * You have completed [[hpc:registration|Registration]] +====== Software ======
-  * You have an active HPC account +
-  * You have an SSH client installed +
-  * You can connect to the HPC login node+
  
-Need access first?+In **main** and **gpu** partitions there are installed [[https://docs.qlustar.com/Qlustar/13/HPCstack/hpc-user-manual.html|Qlustar 13]] OS. It is based on Ubuntu 20.04 LTS. In **power** partition there is installed Ubuntu 18.04 LTS.
  
-  * [[hpc:registration|Register for HPC Access]]+You can check the list of OS package with the command ''dpkg -l'' (in login node **hpc** or in **power** nodes).
  
-===== Step 1: Connect to the Cluster =====+===== Singularity =====
  
-Open a terminal and connect to the HPC login node:+With the command [[https://sylabs.io/guides/3.2/user-guide/index.html|singularity]] it is possible to make use of ready-made copies of container files in directories ''/apps/local/hpc'', ''/apps/local/nvidia'', ''/apps/local/intel'', ''/apps/local/lang'' or to download from singularity and docker online repositories. You can also create your own singularity containers using the MIF cloud service.
  
-<code bash> +You can prepare your container with singularity, for example: 
-ssh username@hpc.mif.vu.lt+<code shell> 
 +$ singularity build --sandbox /tmp/python docker://python:3.8 
 +$ singularity exec -w /tmp/python pip install package 
 +$ singularity build python.sif /tmp/python 
 +$ rm -rf /tmp/python
 </code> </code>
  
-Replace ''username'' with your HPC username. 
  
-Verify that you are connected: +To use this container, it is advised to use different directory instead of home directory (for python packages don't mixup with installed to home directory). 
- +<code shell> 
-<code bash> +$ mkdir ~/workdir 
-hostname +$ singularity exec -H ~/workdir:$HOME python.sif python3 ...
-pwd+
 </code> </code>
  
-You should see the hostname of the login node and your home directory path.+Similarly, you can use R, Julia or other containers that do not require root privileges to install packages.
  
-<note important> +If you want to add OS packages to the singularity container, you need root/superuser privileges. With fakeroot, we simulate them, and copy the required library ''libfakeroot-sysv.so'' into the container, for example: 
-Your SLURM account is created automatically after your first successful login. This process may take up to 5 minutes. +<code shell> 
- +$ singularity build --sandbox /tmp/python docker://ubuntu:18.04 
-Until the account is created, job submission may fail with account-related errors. +$ cp /libfakeroot-sysv.so /tmp/python/ 
-</note> +$ fakeroot -l /libfakeroot-sysv.so singularity exec -w /tmp/python apt-get update 
- +$ fakeroot -l /libfakeroot-sysv.so singularity exec -w /tmp/python apt-get install python3.8 ... 
-For detailed instructions see: +$ fakeroot -l /libfakeroot-sysv.so singularity exec -w /tmp/python apt-get clean 
- +$ rm -rf /tmp/python/libfakeroot-sysv.so /tmp/python/var/lib/apt/lists (you can clean up more of what you don't need) 
-  * [[hpc:connection|Connection]] +$ singularity build python.sif /tmp/python 
- +$ rm -rf /tmp/python
-===== Step 2: Understanding Login Nodes and Compute Nodes ===== +
- +
-Unlike a personal computer, computational workloads are not normally executed directly from the login node. Instead, jobs are submitted to SLURM, which schedules them on available compute nodes. +
- +
-The login node is intended for: +
- +
-  * Editing files +
-  * Compiling code +
-  * Managing data +
-  * Preparing and submitting jobs +
- +
-The compute nodes are used for: +
- +
-  * CPU-intensive calculations +
-  * Simulations +
-  * Data analysis +
-  * Machine learning and AI workloads +
- +
-<note important> +
-Do not run computationally intensive applications directly on the login node. Submit them through SLURM so they can be executed on the appropriate compute resources. +
-</note> +
- +
-===== Step 3: Create a Working Directory ===== +
- +
-Create a directory for this tutorial: +
- +
-<code bash> +
-mkdir getting_started +
-cd getting_started+
 </code> </code>
  
-Verify your location:+===== Hadoop =====
  
-<code bash> +There are ready-made scripts to run your **hadoop** tasks using the [[https://github.com/LLNL/magpie|Magpie]] set in the directory ''/apps/local/bigdata''.
-pwd +
-</code>+
  
-===== Step 4: Create Your First Job Script =====+===== JupyterHub =====
  
-Create a new file:+With [[https://hpc.mif.vu.lt/hub/|JupyterHub]] you can run calculations with the python command line in a web browser and use the [[https://jupyter.org|JupyterLab]] environment. If you install your own JupyterLab environment in your home directory, you need to install the additional ''batchspawner'' package - this will start your environment, for example:
  
-<code bash> +<code shell> 
-nano hello.sh+$ python3.7 -m pip install --upgrade pip setuptools wheel 
 +$ python3.7 -m pip install --ignore-installed batchspawner jupyterlab
 </code> </code>
  
-Paste the following content: +Alternatively, you can use a container that you made via JupyterHub. In that container, you need to install the ''batchswapner'' and ''jupyterlab'' packages, and to create a script ''~/.local/bin/batchspawner-singleuser'' with execution permissions (''chmod +x ~/.local/bin/batchspawner-singleuser''). 
- +<code shell> 
-<code bash> +#!/bin/sh 
-#!/bin/bash +exec singularity exec --nv myjupyterlab.sif batchspawner-singleuser "$@"
-#SBATCH --job-name=hello +
-#SBATCH --partition=main +
-#SBATCH --output=hello.out +
-#SBATCH --time=00:01:00 +
- +
-echo "Hello from HPC!" +
-hostname +
-date+
 </code> </code>
  
-Save the file and exit the editor.+====== Registration ======
  
-===== Step 5: Submit the Job =====+  * **For VU MIF network users** - HPC can be used without additional registration if the available resources are enough (monthly limit - **2000 CPU-h and 100 GPU-h**). Once this limit has been reached, you can request more by filling in [[https://forms.office.com/Pages/ResponsePage.aspx?id=ghrFgo1UykO8-b9LfrHQEidLsh79nRJAvOP_wV9sgmdUM0ZMR1FINFg3TzVaNlhDSEhUN1A3QTlVUC4u|ITOAC service request form]]. 
  
-Submit the script to the scheduler:+  * **For users of the VU computer network** - you must fill in the [[https://forms.office.com/Pages/ResponsePage.aspx?id=ghrFgo1UykO8-b9LfrHQEidLsh79nRJAvOP_wV9sgmdUM0ZMR1FINFg3TzVaNlhDSEhUN1A3QTlVUC4u|ITOAC service request form]] to get access to MIF HPC. After the confirmation of your request, you must create your account in [[https://hpc.mif.vu.lt|Waldur portal]]. More details read [[waldur|here]].
  
-<code bash> +  * **For other users (non-members of the VU community)** - you must fill in the [[https://forms.office.com/Pages/ResponsePage.aspx?id=ghrFgo1UykO8-b9LfrHQEidLsh79nRJAvOP_wV9sgmdUMDE1QUo3Slo3UVYwTjM4TDMyTEdZT0tSNi4u|ITOAC service request form]] to get access to MIF HPC. After the confirmation of your request, you must come to VU MIF Didlaukio str. 47, Room 302/304 to receive your login credentials. Please arranged the exact time by phone + 370 5219 5005. With these credentials you are able to create an account in [[https://hpc.mif.vu.lt|Waldur portal]]. More details read [[waldur|here]].
-sbatch hello.sh +
-</code>+
  
-Example output:+====== Connection ======
  
-<code> +You need to use SSH applications (ssh, putty, winscp, mobaxterm) and Kerberos or SSH key authentication to connect to **HPC**.
-Submitted batch job 123456 +
-</code>+
  
-The returned number is your Job ID.+If **Kerberos** is used:
  
-===== Step 6: Monitor the Job =====+  * Log in to the Linux environment in a VU MIF classroom or public terminal with your VU MIF username and password or login to **uosis.mif.vu.lt** with your VU MIF username and password using **ssh** or **putty**. 
 +  * Check if you have a valid Kerberos key (ticket) with the **klist** command. If the key is not available or has expired, the **kinit** command must be used. 
 +  * Connect to the **hpc** node with the command **ssh hpc** (password must not be required).
  
-Check the status of your jobs:+If **SSH keys** are used (e.g. if you need to copy big files): 
 +  * If you don't have SSH keys, you can find instructions on how to create them in a Windows environment **[[en:duk:ssh_key|here]]** 
 +  *     Before you can use this method, you need to log in with Kerberos at least once. Then create a ''~/.ssh'' directory in the HPC file system and put your **ssh public key** (in OpenSSH format) into the ''~/.ssh/authorized_keys'' file. 
 +  *     Connect with **ssh**, **sftp**, **scp**, **putty**, **winscp** or any other **ssh** protocol supported software to **hpc.mif.vu.lt** with your **ssh private key**, specifying your VU MIF user name. It should not require a login password, but may require your ssh private key password.
  
-<code bash> +The **first time** you connect, you **will not** be able to run **SLURM jobs** for the first **5 minutes**. After that, SLURM account will be created.
-squeue -u $USER +
-</code>+
  
-When the job disappears from the queue, it has finished.+====== Lustre - Shared File System ======
  
-===== Step 7: View the Results =====+VU MIF HPC shared file system is available in the directory ''/scratch/lustre''.
  
-Display the output file:+The system creates directory ''/scratch/lustre/home/username'' for each HPC user, where **username** is the HPC username.
  
-<code bash> +The files in this file system are equally accessible on all compute nodes and on the **hpc** node.
-cat hello.out +
-</code>+
  
-Example output:+Please use these directories only for their purpose and clean them up after calculations.
  
-<code> +====== HPC Partition ======
-Hello from HPC! +
-compute01 +
-Mon Nov 17 14:32:05 EET 2026 +
-</code>+
  
-Congratulations! You have successfully executed your first HPC job.+^Partition ^Time limit ^RAM    ^Notes| 
 +^main             ^7d            ^7000MB  ^CPU cluster| 
 +^gpu              ^48h           ^12000MB ^GPU cluster| 
 +^power            ^48h           ^2000MB  ^IBM Power9 cluster|
  
-===== Step 8: Request Resources for a Job =====+The time limit for tasks is **2h** in all partitions if it has not been specified. The table shows the maximum time limit.
  
-Real HPC workloads usually require specific CPU, memory, and runtime allocations. These resources are requested using SLURM directives.+The **RAM** column gives the amount of RAM allocated to each reserved **CPU** core.
  
-Create a new script:+====== Batch Processing of Tasks (SLURM) ======
  
-<code bash> +To use computing resources of the HPC, you need to create task scenarios (sh or csh). 
-nano resources.sh +
-</code>+
  
-Paste the following content:+Example:
  
-<code bash>+<code shell mpi-test-job.sh>
 #!/bin/bash #!/bin/bash
-#SBATCH --job-name=resources-demo +#SBATCH -p main 
-#SBATCH --partition=main +#SBATCH -n4 
-#SBATCH --cpus-per-task=4 +module load openmpi 
-#SBATCH --mem=4G +mpicc -o mpi-test mpi-test.c 
-#SBATCH --time=00:05:00 +mpirun mpi-test
-#SBATCH --output=resources.out +
- +
-echo "Job ID:" +
-echo $SLURM_JOB_ID +
- +
-echo "" +
-echo "Partition:" +
-echo $SLURM_JOB_PARTITION +
- +
-echo "" +
-echo "Allocated CPUs:" +
-echo $SLURM_CPUS_PER_TASK +
- +
-echo "" +
-echo "Finished."+
 </code> </code>
  
-Submit the job:+After submission and confirmation of your application to the ITOAC services, you need to create a user at https://hpc.mif.vu.lt/. The created user will be included in the relevant project, which will have a certain amount of resources. In order to use the project resources for calculations, you need to provide your allocation number. Below is an example with the allocation parameter "alloc_xxxx_project" (not applicable for VU MIF users, VU MIF users do not have to specify the --account parameter).
  
-<code bash> +<code shell mpi-test-job.sh>
-sbatch resources.sh +
-</code> +
- +
-===== Understanding Resource Requests ===== +
- +
-^ Directive ^ Description ^ +
-| ''--partition=main'' | Run the job in the standard CPU partition | +
-| ''--partition=gpu'' | Run the job in the GPU partition | +
-| ''--cpus-per-task=4'' | Request 4 CPU cores | +
-| ''--mem=4G'' | Request 4 GB of RAM | +
-| ''--time=00:05:00'' | Request up to 5 minutes of runtime | +
-| ''--output=resources.out'' | Save output to a file | +
- +
-<note tip> +
-Most CPU workloads should use the ''main'' partition. +
- +
-GPU workloads should use the ''gpu'' partition. +
-</note> +
- +
-<note tip> +
-If no runtime limit is specified, SLURM uses a default limit of 2 hours. However, specifying a realistic runtime is recommended because it helps the scheduler start jobs more efficiently. +
-</note> +
- +
-<note tip> +
-Request only the resources you actually need. Smaller jobs generally start faster and help ensure fair sharing of cluster resources. +
-</note> +
- +
-===== Check the Job Output ===== +
- +
-Once the job completes: +
- +
-<code bash> +
-cat resources.out +
-</code> +
- +
-===== Step 9: Using Project Allocations ===== +
- +
-Some users are assigned project allocations that provide additional CPU, GPU, memory, or storage resources. +
- +
-If your project administrator provides an allocation name, add it to your job script: +
- +
-<code bash>+
 #!/bin/bash #!/bin/bash
-#SBATCH --job-name=project-demo +#SBATCH --account=alloc_xxxx_projektas 
-#SBATCH --partition=main +#SBATCH -p main 
-#SBATCH --account=alloc_xxxx_project +#SBATCH -n4 
-#SBATCH --cpus-per-task=4 +#SBATCH --time=minutes 
-#SBATCH --mem=8G +module load openmpi 
-#SBATCH --time=01:00:00 +mpicc -o mpi-test mpi-test.c 
- +mpirun mpi-test
-hostname+
 </code> </code>
  
-The allocation name determines which project's resources are used to run the job. 
  
-<note important> +It contains instructions for the task performer as special comments.
-VU MIF users using the default allocation do NOT need to specify the ''--account'' parameter.+
  
-Only users associated with a project allocation should use the ''--account'' directive. + -p short - which queue to send to (main, gpu, power).
-</note>+
  
-Example:+ -n4 - how many processors to reserve (**NOTE:** if you set the number of cores to be used to x, but actually use fewer cores programmatically, the accounting will still count all the x "requested" cores, so we recommend to calculate this in advance).
  
-<code bash> +The initial running directory of the task is the current directory (**pwd**) on the login node from where the task is run, unless it was changed to another directory by the -D parameter. For the initial running directory, use the HPC shared filesystem directories **/scratch/lustre**, as it must exist on the compute node and the job output file **slurm-JOBID.out** is created there, unless redirected by -o or -i (for these it is advisable to use the shared filesystem as well).
-#SBATCH --account=alloc_xxxx_project +
-</code>+
  
-===== Step 10: Run a Multi-Core Python Job =====+The generated script is sent with the command //sbatch//,
  
-Python is one of the most commonly used programming languages on HPC systems. This example performs a matrix multiplication, a common operation in scientific computing, machine learning, and data analysis.+''$ sbatch mpi-test-job''
  
-==== Create a Python Script ====+which returns the number of the submitted job **JOBID**.
  
-Create a file named ''matrix.py'':+The status of a pending or ongoing task can be checked with the command //squeue//
  
-<code bash> +''$ squeue -j JOBID''
-nano matrix.py +
-</code>+
  
-Paste:+With the //scancel// command it is possible to cancel the running of a task or to remove it from the queue
  
-<code python> +''$ scancel JOBID''
-import os +
-import numpy as np +
-from time import perf_counter+
  
-cpus = os.environ.get("SLURM_CPUS_PER_TASK", "unknown")+If you forgot your tasks **JOBID**, you can check them with the command //squeue//
  
-print(f"CPU cores allocated by SLURM: {cpus}")+''$ squeue''
  
-size = 2000+Completed tasks are no longer displayed in **squeue**.
  
-print(f"Creating two {size}x{size} matrices...")+If the specified number of processors is not available, your task is added to the queue. It will remain in the queue until a sufficient number of processors become available or until you remove it with **scancel**.
  
-a = np.random.rand(size, size) +The **output** of the running job is recorded in the file **slurm-JOBID.out**. The error output is written to the same file unless you specified somewhere else. The file names can be changed with the **sbatch** command parameters -o (specify the output file) and -e (specify the error file).
-b = np.random.rand(size, size)+
  
-start = perf_counter() +More about SLURM opportunities you can read [[https://slurm.schedmd.com/quickstart.html|Quick Start User Guide]].
-c = a @ b +
-end = perf_counter()+
  
-print("Matrix multiplication completed") +====== Interactive Tasks (SLURM) ======
-print(f"Result shape: {c.shape}") +
-print(f"Execution time: {end - start:.2f} seconds") +
-</code>+
  
-==== Create a SLURM Job Script ====+Interactive tasks can be done with the //srun// command:
  
-Create a new file: +<code> 
- +$ srun --pty $SHELL
-<code bash> +
-nano python-job.sh+
 </code> </code>
  
-Paste:+The above command will connect you to the compute node environment assigned to SLURM and allow you to directly run and debug programs on it.
  
-<code bash> +After the commands are done disconnect from the compute node with the command
-#!/bin/bash +
-#SBATCH --job-name=python-demo +
-#SBATCH --partition=main +
-#SBATCH --cpus-per-task=4 +
-#SBATCH --mem=2G +
-#SBATCH --time=00:05:00 +
-#SBATCH --output=python-demo.out+
  
-export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK +<code> 
-export OPENBLAS_NUM_THREADS=$SLURM_CPUS_PER_TASK +$ exit
-export MKL_NUM_THREADS=$SLURM_CPUS_PER_TASK +
- +
-python3 matrix.py +
-</code> +
- +
-Submit the job: +
- +
-<code bash> +
-sbatch python-job.sh +
-</code> +
- +
-==== Check the Results ==== +
- +
-After the job finishes: +
- +
-<code bash> +
-cat python-demo.out+
 </code> </code>
  
-Example output:+If you want to run graphical programs, you need to connect to **ssh -X** to **uosis.mif.vu.lt** and **hpc**:
  
 <code> <code>
-CPU cores allocated by SLURM: 4 +$ ssh -X uosis.mif.vu.lt 
-Creating two 2000x2000 matrices... +$ ssh -X hpc 
-Matrix multiplication completed +$ srun --pty $SHELL
-Result shape: (2000, 2000) +
-Execution time: 1.82 seconds+
 </code> </code>
  
-==== Optional: Load a Python Module ==== +In **power** cluster interactive tasks can be performed with
- +
-Depending on the cluster software environment, a specific Python version may need to be loaded first: +
- +
-<code bash> +
-module avail Python +
-</code> +
- +
-Load one of the available versions shown by the system: +
- +
-<code bash> +
-module load Python/<version> +
-</code> +
- +
-Verify: +
- +
-<code bash> +
-python3 --version +
-</code> +
- +
-===== Step 11: Verify CPU Usage ===== +
- +
-While a job is running, you can monitor resource utilization with: +
- +
-<code bash> +
-sstat -j JOBID.batch --format=JobID,AveCPU,AveRSS,MaxRSS +
-</code> +
- +
-Example:+
  
 <code> <code>
-       JobID     AveCPU     AveRSS     MaxRSS +$ srun -p power --mpi=none --pty $SHELL
------------- ---------- ---------- ---------- +
-123456.batch   00:00:01      500M      620M+
 </code> </code>
  
-Where:+====== GPU Tasks (SLURM) ======
  
-^ Field ^ Description ^ +To use GPU you need to specify additionally <code>--gres gpu:N</code> where N is desired GPU amount.
-| ''AveCPU'' | Average CPU time consumed by job tasks | +
-| ''AveRSS'' | Average memory usage | +
-| ''MaxRSS'' | Maximum memory usage |+
  
-You can identify your Job ID with: +With ''nvidia-smi'' in the task you can check the GPU amount that was dedicated.
- +
-<code bash> +
-squeue -u $USER +
-</code> +
- +
-==== Compare Elapsed Time and CPU Time ==== +
- +
-After the job finishes: +
- +
-<code bash> +
-sacct -j JOBID --format=JobID,AllocCPUS,Elapsed,CPUTime +
-</code> +
- +
-Example:+
  
 +Example of an interactive task with 1 GPU:
 <code> <code>
-JobID          AllocCPUS    Elapsed    CPUTime +$ srun -p gpu --gres gpu --pty $SHELL
------------- ---------- ---------- ---------- +
-123456                4   00:00:02   00:00:07+
 </code> </code>
  
-^ Field ^ Description ^ +====== Introduction to OpenMPI ======
-| ''AllocCPUS'' | Number of allocated CPU cores | +
-| ''Elapsed'' | Wall-clock runtime (real time) | +
-| ''CPUTime'' | Total CPU time used by all allocated CPU cores | +
- +
-==== How to Interpret the Results ==== +
- +
-Single-threaded application:+
  
 +Ubuntu 18.04 LTS is the packet of **2.1.1** OpenMPI version.
 +To use the newer version **4.0.1** you need to use
 <code> <code>
-AllocCPUS = 4 +module load openmpi/4.0
-Elapsed   = 00:00:10 +
-CPUTime   = 00:00:10+
 </code> </code>
 +before running MPI commands.
  
-The application used approximately one CPU core, even though four cores were allocated.+===== MPI Compiling Programs =====
  
-Multi-threaded application:+An example of a simple MPI program is in the directory ''/scratch/lustre/test/openmpi''. **mpicc** (**mpiCC**, **mpif77**, **mpif90**, **mpifort**) is a framework for C (C++, F77, F90, Fortran) compilers that automatically adds the necessary **MPI** include and library files to the command line.
  
 <code> <code>
-AllocCPUS = 4 +$ mpicc -o foo foo.c 
-Elapsed   = 00:00:10 +$ mpif77 -o foo foo.f 
-CPUTime   = 00:00:38+$ mpif90 -o foo foo.f
 </code> </code>
 +===== Implementation of MPI Programmes =====
  
-The application actively used multiple CPU cores.+MPI programs are started with **mpirun** or **mpiexec**. You can learn more about them with the **man mpirun** or **man mpiexec** command.
  
-In an ideal case, a fully utilized four-core job running for ten seconds would show:+A simple (SPMD) program can be started with the following mpirun command line.
  
 <code> <code>
-Elapsed   = 00:00:10 +$ mpirun foo
-CPUTime   = 00:00:40+
 </code> </code>
  
-<note tip> +All allocated processors will be used according to the number ordered. If you want to use less, you can specify the -np quantity parameter in **mpirun**. It is not recommended to use less CPU than reserved for a longer time period, as unused CPUs remain free.
-A quick way to verify that your application is using multiple CPU cores is to compare ''CPUTime'' with ''Elapsed''. If ''CPUTime'' is several times larger than ''Elapsed'', the workload is utilizing multiple CPU cores concurrently. +
-</note>+
  
-<note tip> +**ATTENTION** It is strictly forbidden to use more CPU than you have reserved, as this may affect the performance of other tasks.
-Requesting multiple CPU cores with:+
  
-#SBATCH --cpus-per-task=4+Find more information on [[https://www.open-mpi.org|OpenMPI]].
  
-does not automatically make an application run in parallel. The application must also support multithreading and be configured to use the allocated cores. +====== Task Efficiency ======
-</note>+
  
-===== Step 12: Submit a GPU Job =====+  * Please use at least 50% of the ordered CPU quantity. 
 +  * Using more CPUs than ordered will not improve performance, as your task will only be able to use the CPUs ordered. 
 +  * If you use the ''--mem=X'' parameter, the task can reserve more **CPUs** in proportion to the amount of memory it wants. For example: if you order ''--mem=14000'' in the **main** queue, at least 2 CPUs will be reserved, unless other parameters specify more. If your task uses less than this, it will be an ineffective use of resources. In addition, it may run slower because it may use other memory than the executing CPU.
  
-To run a job on a GPU node:+====== The Limits of Resources ======
  
-<code bash> +If your tasks don't start because of **AssocGrpCPUMinutesLimit** or **AssocGrpGRESMinutes**, you need to check if there are any unused CPU/GPU resources left from your monthly limit.
-nano gpu-demo.sh +
-</code>+
  
-Paste:+//The first way to see how much resources are used://
  
-<code bash> +<code> 
-#!/bin/bash +sreport -T cpu,mem,gres/gpu cluster AccountUtilizationByUser Start=0101 End=0131 User=USERNAME
-#SBATCH --job-name=gpu-demo +
-#SBATCH --partition=gpu +
-#SBATCH --gres=gpu:1 +
-#SBATCH --cpus-per-task=4 +
-#SBATCH --mem=16G +
-#SBATCH --time=01:00:00 +
- +
-nvidia-smi+
 </code> </code>
  
-Submit the job:+Where the **USERNAME** - is your MIF user name. **Start** and **End** show the start and end days of the current month. You can specify them also by ''$(date +%m01)'' and ''$(date +%m31)''.
  
-<code bash> +**NOTE** Usage of resources is given in minutes, divide the number by 60 to get hours.
-sbatch gpu-demo.sh +
-</code>+
  
-The command ''nvidia-smi'' displays information about the GPU allocated to the job.+//The second way to see how much resources are used://
  
-Users working within a project allocation may also need: +<code> 
- +sshare -l -A USERNAME_mif -p -o GrpTRESRaw,GrpTRESMins,TRESRunMins
-<code bash> +
-#SBATCH --account=alloc_xxxx_project+
 </code> </code>
  
-==== Interactive GPU Session ==== +Where **USERNAME** is your MIF user name. Or specify the account whose usage you want to see in **-A**. The data is also displayed in minutes:  
- +  * **GrpTRESRaw** - how much is used.  
-To start an interactive shell on a GPU node: +  * **GrpTRESMins** - what is the limit.  
- +  * **GGRTRESRunMins** - the remaining resources for tasks that are still running.
-<code bash> +
-srun -p gpu --gres=gpu:1 --pty $SHELL +
-</code> +
- +
-After the session starts: +
- +
-<code bash> +
-nvidia-smi +
-</code> +
- +
-Interactive sessions are useful for testing software, debugging, and experimenting before submitting batch jobs. +
- +
-===== Useful Commands ===== +
- +
-^ Command ^ Purpose ^ +
-| ''pwd'' | Show current directory | +
-| ''ls'' | List files | +
-| ''cd'' | Change directory | +
-| ''sbatch job.sh'' | Submit a job | +
-| ''squeue -u $USER'' | View your jobs | +
-| ''sacct -j JOBID'' | View completed job information | +
-| ''sstat -j JOBID.batch'' | Monitor resource usage of a running job | +
-| ''scancel JOBID'' | Cancel a job | +
-| ''cat file'' | Display file contents | +
- +
-===== Typical Resource Requests ===== +
- +
-^ Workload ^ Partition ^ CPUs ^ Memory ^ GPUs ^ +
-| Learning and testing | main | 1-2 | 1-4 GB | None | +
-| Data analysis | main | 4-8 | 8-32 GB | Optional | +
-| Scientific simulations | main | 8-64 | 16-128 GB | Optional | +
-| Machine learning and AI | gpu | 4-16 | 16-64 GB | 1 or more | +
- +
-===== Next Steps ===== +
- +
-You now know how to: +
- +
-  * Connect to the HPC cluster +
-  * Create job scripts +
-  * Submit jobs +
-  * Monitor job execution +
-  * Verify resource utilization +
-  * Run Python applications +
-  * Use project allocations +
-  * Submit GPU jobs +
- +
-Continue with: +
- +
-  * [[hpc:lustre|Shared File System (Lustre)]] +
-  * [[hpc:slurm|Batch Job Execution (SLURM)]] +
-  * [[hpc:resources|Resource Allocations and Project Requests]] +
- +
-===== Common Problems ===== +
- +
-==== Permission denied ==== +
- +
-Verify that: +
- +
-  * Your account has been activated +
-  * You are using the correct username +
-  * Your SSH credentials are correct +
- +
-==== sbatch: command not found ==== +
- +
-You are probably running the command on your local computer instead of the HPC login node. +
- +
-==== Invalid account or account/partition combination specified ==== +
- +
-Possible causes: +
- +
-  * Your SLURM account is still being created. +
-  * The specified allocation does not exist. +
-  * You do not have permission to use the specified allocation. +
- +
-==== Job remains in PENDING state ==== +
- +
-Resources may currently be unavailable. +
- +
-Check your jobs: +
- +
-<code bash> +
-squeue -u $USER +
-</code> +
- +
-==== GPU job does not start ==== +
- +
-Verify that: +
- +
-  * The job uses ''--partition=gpu'' +
-  * The job requests GPUs using ''--gres=gpu:N'' +
-  * GPU resources are available +
-  * Your allocation includes GPU access +
- +
-==== Python command not found ==== +
- +
-Verify that Python is installed in the environment or load the appropriate Python module: +
- +
-<code bash> +
-module avail Python +
-</code>+
  
-===== Where to Go Next =====+** 
 +How are monthly limits assigned?** 
  
-Recommended learning path:+Once an application has been submitted to get more CPU or GPU hours, a decision is usually made within 5 business days. The monthly limit is increased on the day the decision is made in the current month, minus the limit already used up that month. For example, if a user who has used 100 GPU-h requests that the limits be increased to 600 GPU-h per month, they will be granted an additional 500 GPU-h for that month. The following month, the user will again have 600 GPU-h, so the unused balance from the previous month is not carried over to the following month. 
 +====== The Links ======
  
-  - [[hpc:registration|Register for HPC Access]] +  * [[waldur|HPC Waldur portal description]] 
-  - [[hpc:connection|Connection]] +  * [[https://mif.vu.lt/lt3/en/about/structure/it-research-center#ordering|ITOAC service ordering]] 
-  - [[hpc:getting_started|First Successful Job]] +  * [[https://slurm.schedmd.com/quickstart.html|Quick Start User Guide (SLURM)]] 
-  - [[hpc:lustre|Shared File System (Lustre)]] +  * [[https://docs.qlustar.com/Qlustar/11.0/HPCstack/hpc-user-manual.html|HPC User Manual (Qlustar)]] 
-  - [[hpc:slurm|Batch Job Execution (SLURM)]] +  * [[http://www.mcs.anl.gov/research/projects/mpi/|MPI standart]] 
-  - [[hpc:resources|Resource Allocations and Project Requests]] +  * [[pagalba@mif.vu.lt]] - registration of the **HPC** problems.
-  - [[hpc:waldur|Waldur User Guide]]+
  
----- 
  
-<note> 
-This guide was prepared and updated by the VU MIF HPC team with the assistance of Microsoft Copilot. All procedures and examples should be validated against the current HPC environment, software stack, and operational policies. 
-</note> 
en/hpc.txt · Last modified: by eduardas

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki