İTÜ UHEM HPC sistemi hakkında sıkça sorulan sorular ve kapsamlı kullanım rehberi. Makine öğrenmesi projeleriniz için ihtiyacınız olan her şey burada.
UHEM, iki ana sunucu kümesinden oluşur. İşinizin türüne göre doğru sunucuya bağlanmanız önemlidir.
sariyer.uhem.itu.edu.tr
: Genel amaçlı giriş (login) ve CPU-yoğun işler için kullanılır. İlk bağlantı noktası burasıdır.altay.uhem.itu.edu.tr
: GPU-yoğun makine öğrenmesi ve hesaplama işleri için optimize edilmiştir.Önce sariyer
'e bağlanın. Burası sisteme ana giriş kapınızdır.
ssh kullanici_adiniz@sariyer.uhem.itu.edu.tr
GPU işleri göndermek için altay
'a geçiş yapabilirsiniz:
ssh kullanici_adiniz@altay.uhem.itu.edu.tr
The UHEM system consists of two distinct server clusters. It's important to connect to the right one for your type of job.
sariyer.uhem.itu.edu.tr
: The general-purpose login node, used for CPU-intensive jobs. This is your first point of entry.altay.uhem.itu.edu.tr
: Optimized for GPU-heavy machine learning and computational tasks.First, connect to sariyer
, your main gateway to the system.
ssh your_username@sariyer.uhem.itu.edu.tr
To submit GPU jobs, you can then connect to altay
:
ssh your_username@altay.uhem.itu.edu.tr
Hesaplama yapmadan önce, kütüphanelerinizi yöneteceğiniz bir çalışma ortamı oluşturmanız gerekir. UHEM'de bunun için en kolay yol Conda kullanmaktır.
module load ANACONDA/Anaconda3-2023.03-python-3.9
source /ari/progs/ANACONDA/Anaconda3-2023.03-python-3.9/etc/profile.d/conda.sh
conda init bash
conda create -n MY_ENV python=3.10
conda activate MY_ENV
pip install torch tensorflow pandas ...
Before running computations, you must create an environment to manage your libraries. The easiest way to do this on UHEM is with Conda.
module load ANACONDA/Anaconda3-2023.03-python-3.9
source /ari/progs/ANACONDA/Anaconda3-2023.03-python-3.9/etc/profile.d/conda.sh
conda init bash
conda create -n MY_ENV python=3.10
conda activate MY_ENV
pip install torch tensorflow pandas ...
UHEM'de hesaplama kaynakları Slurm adlı bir iş zamanlayıcı ile yönetilir. İşlerinizi iki şekilde gönderebilirsiniz: etkileşimli (srun
) veya toplu (sbatch
).
srun
)Kod geliştirme, test etme ve kısa süreli görevler için idealdir. Bu komut size doğrudan bir hesaplama düğümünde bir komut satırı verir.
GPU'lu bir makine talep etmek için (altay sunucusunda):
# 1 adet A100 GPU ve 64 CPU çekirdeği isteme
srun -A -p a100q --gres=gpu:1 -N 1 -n 64 --pty bash -i
# Alternatif: gpu2dq kuyruğunda 1 GPU isteme
srun -A <"project_name"> -p gpu2dq --gres=gpu:1 -N 1 -n 28 --pty bash -i
a100x4q
kuyruğu 4 adet A100 80GB GPU içerir ve 1.5 kat daha fazla kredi harcar. Yalnızca çoklu GPU gerektiren büyük modeller için kullanın.
Computational resources on UHEM are managed by a job scheduler called Slurm. You can run your jobs in two ways: interactively (srun
) or as a batch script (sbatch
).
srun
)Ideal for code development, testing, and short tasks. This command gives you a direct command line on a compute node.
To request a GPU node (on the altay server):
# Request 1 A100 GPU and 64 CPU cores
srun -A "project_name" -p a100q --gres=gpu:1 -N 1 -n 64 --pty bash -i
# Alternative: Request 1 GPU on the gpu2dq partition
srun -A "project_name" -p gpu2dq --gres=gpu:1 -N 1 -n 28 --pty bash -i
a100x4q
partition contains 4x A100 80GB GPUs and costs 1.5 times more credits. Use it only for large models that require multi-GPU training.
sbatch
)Uzun süren eğitimler veya deneyler için en iyi yöntem bir "batch script" kullanmaktır. Bu script, işinizin ayarlarını ve çalıştırılacak komutları içerir.
job.sh
)#!/bin/bash
#SBATCH -A "project_name"
#SBATCH -p gpu2dq
#SBATCH -N 1
#SBATCH -n 64
#SBATCH --gres=gpu:1
#SBATCH --mail-type=ALL
#SBATCH --mail-user=mailadresiniz@itu.edu.tr
# 1. Ortamı ayarla
echo "Ortam ayarları yükleniyor..."
module load ANACONDA/Anaconda3-2023.03-python-3.9
source /ari/progs/ANACONDA/Anaconda3-2023.03-python-3.9/etc/profile.d/conda.sh
module load cuda/cuda-12.1-a100q
conda activate MY_ENV
# 2. İş bilgisini yazdır
isbilgisi
# 3. Proje klasörüne git
cd /ari/users/kullanici_adiniz/PROJE_KLASORU
# 4. Python script'ini çalıştır
echo "Eğitim başlıyor..."
python3 train_model.py \
--learning_rate 1e-4 \
--batch_size 64 \
--output_dir /path/to/output
echo "İş tamamlandı."
Script'i job.sh
olarak kaydedin ve sbatch
komutu ile gönderin:
sbatch job.sh
Slurm işinizi sıraya alacak ve kaynaklar müsait olduğunda çalıştıracaktır.
sbatch
)For long training runs or experiments, the best practice is to use a batch script. This script contains your job's settings and the commands to execute.
job.sh
)#!/bin/bash
#SBATCH -A "project_name"
#SBATCH -p gpu2dq
#SBATCH -N 1
#SBATCH -n 64
#SBATCH --gres=gpu:1
#SBATCH --mail-type=ALL
#SBATCH --mail-user=your.email@itu.edu.tr
# 1. Set up the environment
echo "Loading environment..."
module load ANACONDA/Anaconda3-2023.03-python-3.9
source /ari/progs/ANACONDA/Anaconda3-2023.03-python-3.9/etc/profile.d/conda.sh
module load cuda/cuda-12.1-a100q
conda activate MY_ENV
# 2. Print job information
isbilgisi
# 3. Navigate to your project directory
cd /ari/users/your_username/PROJECT_FOLDER
# 4. Run your Python script
echo "Starting training..."
python3 train_model.py \
--learning_rate 1e-4 \
--batch_size 64 \
--output_dir /path/to/output
echo "Job finished."
Save the script as job.sh
and submit it with the sbatch
command:
sbatch job.sh
Slurm will queue your job and run it when resources become available.
UHEM'de Jupyter Notebook kullanmak için bir "SSH tüneli" kurmanız gerekir. Bu, hesaplama düğümündeki web arayüzünü yerel bilgisayarınıza taşır.
g15
) not alın.# Conda ortamınız aktifken
jupyter lab --no-browser --port=8888
Çıktıdaki token içeren URL'yi kopyalayın.
ssh -L 8888:g15:8888 kullanici_adiniz@altay.uhem.itu.edu.tr
To use Jupyter Notebook on UHEM, you need to set up an "SSH tunnel." This forwards the web interface from the compute node to your local machine.
g15
) when it starts.# With your Conda env active
jupyter lab --no-browser --port=8888
Copy the full URL with the token.
ssh -L 8888:g15:8888 your_username@altay.uhem.itu.edu.tr
spart
isler
isler [İŞ_NO]
isbilgisi
squeue -u $USER
isler
komutunun standart Slurm karşılığıdır.scancel [İŞ_NO]
spart
isler
isler [JOB_ID]
isbilgisi
squeue -u $USER
isler
command.scancel [JOB_ID]
Tensor olarak, UHEM gibi HPC sistemlerinde makine öğrenmesi projelerinin optimizasyonu konusunda uzmanız. Projelerinizi daha verimli hale getirmek için bizimle iletişime geçin.
Ücretsiz Danışmanlık Alın