File size: 1,343 Bytes
a1ee5a0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash

#SBATCH --job-name=n_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=8: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 nequip_env
rm -rf ./results
nequip-train train_config.yaml --warn-unused
nequip-evaluate \
    --train-dir ./results/adsorption/ \
    --dataset-config ./test_config.yaml \
    --metrics-config ./test_config.yaml

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))
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"