#!/bin/bash #SBATCH --job-name=m_16_2k # 作业名称 #SBATCH --account=PAS2490 # Project ID #SBATCH --nodes=1 # 节点数 #SBATCH --ntasks-per-node=1 # 每个节点的任务数 #SBATCH --cpus-per-task=16 # 每个任务使用的 CPU 核心数 #SBATCH --gpus-per-node=1 # GPU per node #SBATCH --mem=200G # 内存限制 #SBATCH --time=80:00:00 # 作业运行时间限制 #SBATCH --mail-type=BEGIN,END,FAIL #SBATCH --mail-user=uceckz0@ucl.ac.uk convert_to_seconds() { date -d "${1//_/ }" +%s } start_time=$(date +%Y-%m-%d_%H:%M:%S) echo "Train start time: $start_time" source $HOME/miniconda3/etc/profile.d/conda.sh conda activate mace_env m -rf ./checkpoints rm -rf ./logs rm -rf ./results rm -f valid_indices_123.txt mace_run_train \ --name="MACE_model" \ --train_file="../trainset.xyz" \ --num_workers=16 \ --valid_fraction=0.25 \ --test_file="../testset.xyz" \ --config_type_weights='{"Default":1.0}' \ --E0s='{1:-13.663181292231226, 6:-1029.2809654211628, 7:-1484.1187695035828, 8:-2042.0330099956639, 30:-500.123456789}' \ --lr=0.0001 \ --model="MACE" \ --hidden_irreps='128x0e + 128x1o' \ --r_max=5.0 \ --batch_size=10 \ --max_num_epochs=500 \ --swa \ --ema \ --ema_decay=0.99 \ --amsgrad \ --restart_latest \ --device=cuda \ end_time=$(date +%Y-%m-%d_%H:%M:%S) echo "Train end time: $end_time" start_seconds=$(convert_to_seconds "$start_time") end_seconds=$(convert_to_seconds "$end_time") time_difference=$((end_seconds - start_seconds)) echo "Training duration: $time_difference seconds" duration_h=$((time_difference / 3600)) duration_m=$(((time_difference % 3600) / 60)) duration_s=$((time_difference % 60)) echo "Training duration: ${duration_h}h ${duration_m}m ${duration_s}s"